author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdeui/kjanuswidget.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kdeui/kjanuswidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kjanuswidget.h | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/microkde/kdeui/kjanuswidget.h b/microkde/kdeui/kjanuswidget.h index 6d3f23d..72465ea 100644 --- a/microkde/kdeui/kjanuswidget.h +++ b/microkde/kdeui/kjanuswidget.h | |||
@@ -20,10 +20,16 @@ | |||
20 | #ifndef _KJANUS_WIDGET_H_ | 20 | #ifndef _KJANUS_WIDGET_H_ |
21 | #define _KJANUS_WIDGET_H_ | 21 | #define _KJANUS_WIDGET_H_ |
22 | 22 | ||
23 | #include <qptrlist.h> | 23 | #include <q3ptrlist.h> |
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qmap.h> | 25 | #include <qmap.h> |
26 | #include <qgrid.h> | 26 | #include <q3grid.h> |
27 | //Added by qt3to4: | ||
28 | #include <QShowEvent> | ||
29 | #include <Q3Frame> | ||
30 | #include <QPixmap> | ||
31 | #include <QLabel> | ||
32 | #include <QEvent> | ||
27 | #include <klistbox.h> | 33 | #include <klistbox.h> |
28 | 34 | ||
29 | /*US | 35 | /*US |
@@ -38,12 +44,12 @@ | |||
38 | 44 | ||
39 | class KSeparator; | 45 | class KSeparator; |
40 | class KListView; | 46 | class KListView; |
41 | class QWidgetStack; | 47 | class Q3WidgetStack; |
42 | class QLabel; | 48 | class QLabel; |
43 | class QTabWidget; | 49 | class QTabWidget; |
44 | class QListViewItem; | 50 | class Q3ListViewItem; |
45 | class QVBox; | 51 | class Q3VBox; |
46 | class QHBox; | 52 | class Q3HBox; |
47 | 53 | ||
48 | /** | 54 | /** |
49 | * Provides a number of ready to use layouts (faces). It is used | 55 | * Provides a number of ready to use layouts (faces). It is used |
@@ -102,7 +108,7 @@ class KJanusWidget : public QWidget | |||
102 | class IconListBox : public KListBox | 108 | class IconListBox : public KListBox |
103 | { | 109 | { |
104 | public: | 110 | public: |
105 | IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 ); | 111 | IconListBox( QWidget *parent=0, const char *name=0, Qt::WFlags f=0 ); |
106 | void updateMinimumHeight(); | 112 | void updateMinimumHeight(); |
107 | void updateWidth(); | 113 | void updateWidth(); |
108 | void invalidateHeight(); | 114 | void invalidateHeight(); |
@@ -193,7 +199,7 @@ class KJanusWidget : public QWidget | |||
193 | * | 199 | * |
194 | * @return The widget or 0 if the face in not Plain. | 200 | * @return The widget or 0 if the face in not Plain. |
195 | */ | 201 | */ |
196 | virtual QFrame *plainPage(); | 202 | virtual Q3Frame *plainPage(); |
197 | 203 | ||
198 | /** | 204 | /** |
199 | * Add a new page when the class is used in TreeList, IconList or Tabbed | 205 | * Add a new page when the class is used in TreeList, IconList or Tabbed |
@@ -214,7 +220,7 @@ class KJanusWidget : public QWidget | |||
214 | * @return The empty page or 0 if the face is not TreeList, IconList or | 220 | * @return The empty page or 0 if the face is not TreeList, IconList or |
215 | * Tabbed. | 221 | * Tabbed. |
216 | */ | 222 | */ |
217 | virtual QFrame *addPage(const QString &item,const QString &header=QString::null, | 223 | virtual Q3Frame *addPage(const QString &item,const QString &header=QString::null, |
218 | const QPixmap &pixmap=QPixmap() ); | 224 | const QPixmap &pixmap=QPixmap() ); |
219 | 225 | ||
220 | /** | 226 | /** |
@@ -231,7 +237,7 @@ class KJanusWidget : public QWidget | |||
231 | * Deleting the returned frame will cause the listitem or tab to be | 237 | * Deleting the returned frame will cause the listitem or tab to be |
232 | * removed (you can re-add a page with the same name later. | 238 | * removed (you can re-add a page with the same name later. |
233 | **/ | 239 | **/ |
234 | virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null, | 240 | virtual Q3Frame *addPage(const QStringList &items, const QString &header=QString::null, |
235 | const QPixmap &pixmap=QPixmap() ); | 241 | const QPixmap &pixmap=QPixmap() ); |
236 | 242 | ||
237 | /** | 243 | /** |
@@ -253,7 +259,7 @@ class KJanusWidget : public QWidget | |||
253 | * | 259 | * |
254 | * @return The empty page or 0 if the face is not TreeList, IconList or | 260 | * @return The empty page or 0 if the face is not TreeList, IconList or |
255 | * Tabbed. */ | 261 | * Tabbed. */ |
256 | virtual QVBox *addVBoxPage( const QString &item, | 262 | virtual Q3VBox *addVBoxPage( const QString &item, |
257 | const QString &header=QString::null, | 263 | const QString &header=QString::null, |
258 | const QPixmap &pixmap=QPixmap() ); | 264 | const QPixmap &pixmap=QPixmap() ); |
259 | 265 | ||
@@ -269,7 +275,7 @@ class KJanusWidget : public QWidget | |||
269 | * Deleting the returned frame will cause the listitem or tab to be | 275 | * Deleting the returned frame will cause the listitem or tab to be |
270 | * removed (you can re-add a page with the same name later. | 276 | * removed (you can re-add a page with the same name later. |
271 | **/ | 277 | **/ |
272 | virtual QVBox *addVBoxPage( const QStringList &items, | 278 | virtual Q3VBox *addVBoxPage( const QStringList &items, |
273 | const QString &header=QString::null, | 279 | const QString &header=QString::null, |
274 | const QPixmap &pixmap=QPixmap() ); | 280 | const QPixmap &pixmap=QPixmap() ); |
275 | 281 | ||
@@ -293,7 +299,7 @@ class KJanusWidget : public QWidget | |||
293 | * @return The empty page or 0 if the face is not TreeList, IconList or | 299 | * @return The empty page or 0 if the face is not TreeList, IconList or |
294 | * Tabbed. | 300 | * Tabbed. |
295 | */ | 301 | */ |
296 | virtual QHBox *addHBoxPage( const QString &itemName, | 302 | virtual Q3HBox *addHBoxPage( const QString &itemName, |
297 | const QString &header=QString::null, | 303 | const QString &header=QString::null, |
298 | const QPixmap &pixmap=QPixmap() ); | 304 | const QPixmap &pixmap=QPixmap() ); |
299 | 305 | ||
@@ -309,7 +315,7 @@ class KJanusWidget : public QWidget | |||
309 | * Deleting the returned frame will cause the listitem or tab to be | 315 | * Deleting the returned frame will cause the listitem or tab to be |
310 | * removed (you can re-add a page with the same name later. | 316 | * removed (you can re-add a page with the same name later. |
311 | **/ | 317 | **/ |
312 | virtual QHBox *addHBoxPage( const QStringList &items, | 318 | virtual Q3HBox *addHBoxPage( const QStringList &items, |
313 | const QString &header=QString::null, | 319 | const QString &header=QString::null, |
314 | const QPixmap &pixmap=QPixmap() ); | 320 | const QPixmap &pixmap=QPixmap() ); |
315 | 321 | ||
@@ -337,7 +343,7 @@ class KJanusWidget : public QWidget | |||
337 | * Tabbed. | 343 | * Tabbed. |
338 | */ | 344 | */ |
339 | //US changed Orientation into Direction for compatibility | 345 | //US changed Orientation into Direction for compatibility |
340 | virtual QGrid *addGridPage( int n, QGrid::Direction dir, | 346 | virtual Q3Grid *addGridPage( int n, Qt::Orientation dir, |
341 | const QString &itemName, | 347 | const QString &itemName, |
342 | const QString &header=QString::null, | 348 | const QString &header=QString::null, |
343 | const QPixmap &pixmap=QPixmap() ); | 349 | const QPixmap &pixmap=QPixmap() ); |
@@ -355,7 +361,7 @@ class KJanusWidget : public QWidget | |||
355 | * removed (you can re-add a page with the same name later. | 361 | * removed (you can re-add a page with the same name later. |
356 | **/ | 362 | **/ |
357 | //US changed Orientation into Direction for compatibility | 363 | //US changed Orientation into Direction for compatibility |
358 | virtual QGrid *addGridPage( int n, QGrid::Direction dir, | 364 | virtual Q3Grid *addGridPage( int n, Qt::Orientation dir, |
359 | const QStringList &items, | 365 | const QStringList &items, |
360 | const QString &header=QString::null, | 366 | const QString &header=QString::null, |
361 | const QPixmap &pixmap=QPixmap() ); | 367 | const QPixmap &pixmap=QPixmap() ); |
@@ -517,38 +523,38 @@ class KJanusWidget : public QWidget | |||
517 | private slots: | 523 | private slots: |
518 | bool slotShowPage(); | 524 | bool slotShowPage(); |
519 | //US not yet implemented void slotFontChanged(); | 525 | //US not yet implemented void slotFontChanged(); |
520 | void slotItemClicked(QListViewItem *it); | 526 | void slotItemClicked(Q3ListViewItem *it); |
521 | void pageGone( QObject *obj); // signal from the added page's "destroyed" signal | 527 | void pageGone( QObject *obj); // signal from the added page's "destroyed" signal |
522 | void slotReopen(QListViewItem *item); | 528 | void slotReopen(Q3ListViewItem *item); |
523 | 529 | ||
524 | protected: | 530 | protected: |
525 | bool showPage( QWidget *w ); | 531 | bool showPage( QWidget *w ); |
526 | void addPageWidget( QFrame *page, const QStringList &items, | 532 | void addPageWidget( Q3Frame *page, const QStringList &items, |
527 | const QString &header, const QPixmap &pixmap ); | 533 | const QString &header, const QPixmap &pixmap ); |
528 | void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page); | 534 | void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page); |
529 | QWidget *FindParent(); | 535 | QWidget *FindParent(); |
530 | 536 | ||
531 | private: | 537 | private: |
532 | bool mValid; | 538 | bool mValid; |
533 | 539 | ||
534 | // Obsolete members. Remove in KDE 4. | 540 | // Obsolete members. Remove in KDE 4. |
535 | QPtrList<QWidget> *mPageList; | 541 | Q3PtrList<QWidget> *mPageList; |
536 | QStringList *mTitleList; | 542 | QStringList *mTitleList; |
537 | 543 | ||
538 | int mFace; | 544 | int mFace; |
539 | KListView *mTreeList; | 545 | KListView *mTreeList; |
540 | IconListBox *mIconList; | 546 | IconListBox *mIconList; |
541 | QWidgetStack *mPageStack; | 547 | Q3WidgetStack *mPageStack; |
542 | QLabel *mTitleLabel; | 548 | QLabel *mTitleLabel; |
543 | QTabWidget *mTabControl; | 549 | QTabWidget *mTabControl; |
544 | QFrame *mPlainPage; | 550 | Q3Frame *mPlainPage; |
545 | QWidget *mSwallowPage; | 551 | QWidget *mSwallowPage; |
546 | QWidget *mActivePageWidget; | 552 | QWidget *mActivePageWidget; |
547 | KSeparator *mTitleSep; | 553 | KSeparator *mTitleSep; |
548 | //US QSplitter::ResizeMode mTreeListResizeMode; | 554 | //US QSplitter::ResizeMode mTreeListResizeMode; |
549 | bool mShowIconsInTreeList; | 555 | bool mShowIconsInTreeList; |
550 | QMap<QListViewItem *, QWidget *> mTreeListToPageStack; | 556 | QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack; |
551 | QMap<QListBoxItem *, QWidget *> mIconListToPageStack; | 557 | QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack; |
552 | QMap<QString, QPixmap> mFolderIconMap; | 558 | QMap<QString, QPixmap> mFolderIconMap; |
553 | QMap<QString, QStringList> mChildrenNames; | 559 | QMap<QString, QStringList> mChildrenNames; |
554 | QMap<QString, QWidget *> mChildPages; | 560 | QMap<QString, QWidget *> mChildPages; |