author | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
commit | 6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff) | |
tree | 4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui/oversatileview.h | |
parent | 8e28911f7199f4450ac5eef09482069f9b9caea2 (diff) | |
download | opie-6d08277737e22b7a1527124623f3571969073ddf.zip opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2 |
Move XML class to internal PIM
Add namespaces!!!
Opie::Core and Opie::Core::Private
Opie::Net and Opie::Net::Private
Opie::Ui and Opie::Ui::Private
Opie::MM and Opie::MM::Private
Opie::DB and Opie::DB::Private
PIM classes are not yet converted because we will do other work
on it as well
Diffstat (limited to 'libopie2/opieui/oversatileview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/oversatileview.h | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 8af21dc..61b61db 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h | |||
@@ -45,7 +45,6 @@ | |||
45 | class QHeader; | 45 | class QHeader; |
46 | class QIconSet; | 46 | class QIconSet; |
47 | class QIconViewItem; | 47 | class QIconViewItem; |
48 | class OListView; | ||
49 | class QListViewItem; | 48 | class QListViewItem; |
50 | class QPopupMenu; | 49 | class QPopupMenu; |
51 | class QString; | 50 | class QString; |
@@ -54,10 +53,14 @@ class QString; | |||
54 | class QIconDragItem; | 53 | class QIconDragItem; |
55 | #endif | 54 | #endif |
56 | 55 | ||
56 | namespace Opie { | ||
57 | namespace Ui { | ||
58 | class OListView; | ||
59 | |||
57 | class OVersatileView : public QWidgetStack | 60 | class OVersatileView : public QWidgetStack |
58 | { | 61 | { |
59 | Q_OBJECT | 62 | Q_OBJECT |
60 | 63 | ||
61 | friend class OVersatileViewItem; | 64 | friend class OVersatileViewItem; |
62 | 65 | ||
63 | //==============================================================================================// | 66 | //==============================================================================================// |
@@ -69,23 +72,23 @@ class OVersatileView : public QWidgetStack | |||
69 | ~OVersatileView(); | 72 | ~OVersatileView(); |
70 | 73 | ||
71 | QPopupMenu* contextMenu() const; | 74 | QPopupMenu* contextMenu() const; |
72 | 75 | ||
73 | void setSynchronization( bool sync ); | 76 | void setSynchronization( bool sync ); |
74 | bool synchronization(); | 77 | bool synchronization(); |
75 | 78 | ||
76 | enum ViewMode { Tree = 0, Icons }; | 79 | enum ViewMode { Tree = 0, Icons }; |
77 | int viewMode(); | 80 | int viewMode(); |
78 | 81 | ||
79 | QIconView* iconView() const; | 82 | QIconView* iconView() const; |
80 | OListView* listView() const; | 83 | OListView* listView() const; |
81 | 84 | ||
82 | enum WarningPolicy { None = 0, Warn, WarnReturn }; | 85 | enum WarningPolicy { None = 0, Warn, WarnReturn }; |
83 | 86 | ||
84 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode | 87 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode |
85 | bool warningPolicy() const; | 88 | bool warningPolicy() const; |
86 | 89 | ||
87 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); | 90 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); |
88 | 91 | ||
89 | public slots: | 92 | public slots: |
90 | void setViewMode( int mode ); | 93 | void setViewMode( int mode ); |
91 | void setIconViewMode(); | 94 | void setIconViewMode(); |
@@ -94,15 +97,15 @@ class OVersatileView : public QWidgetStack | |||
94 | protected: | 97 | protected: |
95 | virtual bool isValidViewMode( int mode ) const; | 98 | virtual bool isValidViewMode( int mode ) const; |
96 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); | 99 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); |
97 | 100 | ||
98 | private: | 101 | private: |
99 | int _viewmode; | 102 | int _viewmode; |
100 | bool _synchronization; | 103 | bool _synchronization; |
101 | mutable int _warningpolicy; | 104 | mutable int _warningpolicy; |
102 | 105 | ||
103 | OListView* _listview; | 106 | OListView* _listview; |
104 | QIconView* _iconview; | 107 | QIconView* _iconview; |
105 | 108 | ||
106 | QPixmap _treeleaf; | 109 | QPixmap _treeleaf; |
107 | QPixmap _treeopened; | 110 | QPixmap _treeopened; |
108 | QPixmap _treeclosed; | 111 | QPixmap _treeclosed; |
@@ -110,19 +113,19 @@ class OVersatileView : public QWidgetStack | |||
110 | QPixmap _iconleaf; | 113 | QPixmap _iconleaf; |
111 | QPixmap _iconopened; | 114 | QPixmap _iconopened; |
112 | QPixmap _iconclosed; | 115 | QPixmap _iconclosed; |
113 | 116 | ||
114 | QPopupMenu* _contextmenu; | 117 | QPopupMenu* _contextmenu; |
115 | 118 | ||
116 | int _iconstyle; | 119 | int _iconstyle; |
117 | int _treestyle; | 120 | int _treestyle; |
118 | 121 | ||
119 | private slots: | 122 | private slots: |
120 | 123 | ||
121 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); | 124 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); |
122 | void contextMenuRequested( QIconViewItem*, const QPoint& ); | 125 | void contextMenuRequested( QIconViewItem*, const QPoint& ); |
123 | 126 | ||
124 | // type converting signal forwarders | 127 | // type converting signal forwarders |
125 | 128 | ||
126 | void selectionChanged( QListViewItem * ); | 129 | void selectionChanged( QListViewItem * ); |
127 | void currentChanged( QListViewItem * ); | 130 | void currentChanged( QListViewItem * ); |
128 | void clicked( QListViewItem * ); | 131 | void clicked( QListViewItem * ); |
@@ -130,7 +133,7 @@ class OVersatileView : public QWidgetStack | |||
130 | void doubleClicked( QListViewItem * ); | 133 | void doubleClicked( QListViewItem * ); |
131 | void returnPressed( QListViewItem * ); | 134 | void returnPressed( QListViewItem * ); |
132 | void onItem( QListViewItem * ); | 135 | void onItem( QListViewItem * ); |
133 | 136 | ||
134 | void selectionChanged( QIconViewItem * ); | 137 | void selectionChanged( QIconViewItem * ); |
135 | void currentChanged( QIconViewItem * ); | 138 | void currentChanged( QIconViewItem * ); |
136 | void clicked( QIconViewItem * ); | 139 | void clicked( QIconViewItem * ); |
@@ -138,14 +141,14 @@ class OVersatileView : public QWidgetStack | |||
138 | void doubleClicked( QIconViewItem * ); | 141 | void doubleClicked( QIconViewItem * ); |
139 | void returnPressed( QIconViewItem * ); | 142 | void returnPressed( QIconViewItem * ); |
140 | void onItem( QIconViewItem * ); | 143 | void onItem( QIconViewItem * ); |
141 | 144 | ||
142 | void expanded( QListViewItem * item ); // QListView | 145 | void expanded( QListViewItem * item ); // QListView |
143 | void collapsed( QListViewItem * item ); // QListView | 146 | void collapsed( QListViewItem * item ); // QListView |
144 | 147 | ||
145 | signals: | 148 | signals: |
146 | 149 | ||
147 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); | 150 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); |
148 | 151 | ||
149 | /*#ifndef QT_NO_DRAGANDDROP | 152 | /*#ifndef QT_NO_DRAGANDDROP |
150 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 153 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
151 | #endif | 154 | #endif |
@@ -173,11 +176,11 @@ public: | |||
173 | Right | 176 | Right |
174 | }; | 177 | }; |
175 | */ | 178 | */ |
176 | 179 | ||
177 | // | 180 | // |
178 | // only in QListView | 181 | // only in QListView |
179 | // | 182 | // |
180 | 183 | ||
181 | int treeStepSize() const; // QListView | 184 | int treeStepSize() const; // QListView |
182 | virtual void setTreeStepSize( int ); // QListView | 185 | virtual void setTreeStepSize( int ); // QListView |
183 | 186 | ||
@@ -226,7 +229,7 @@ public: | |||
226 | 229 | ||
227 | void setShowSortIndicator( bool show ); // QListView | 230 | void setShowSortIndicator( bool show ); // QListView |
228 | bool showSortIndicator() const; // QListView | 231 | bool showSortIndicator() const; // QListView |
229 | 232 | ||
230 | int index( const OVersatileViewItem *item ) const; // QIconView | 233 | int index( const OVersatileViewItem *item ) const; // QIconView |
231 | 234 | ||
232 | public slots: | 235 | public slots: |
@@ -240,9 +243,9 @@ public: | |||
240 | // only in QIconView | 243 | // only in QIconView |
241 | // | 244 | // |
242 | 245 | ||
243 | public: | 246 | public: |
244 | uint count() const; // QIconView | 247 | uint count() const; // QIconView |
245 | 248 | ||
246 | OVersatileViewItem *firstItem() const; // QIconView | 249 | OVersatileViewItem *firstItem() const; // QIconView |
247 | OVersatileViewItem *lastItem() const; // QIconView | 250 | OVersatileViewItem *lastItem() const; // QIconView |
248 | 251 | ||
@@ -287,7 +290,7 @@ public: | |||
287 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView | 290 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView |
288 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView | 291 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView |
289 | virtual void updateContents(); // QIconView | 292 | virtual void updateContents(); // QIconView |
290 | 293 | ||
291 | signals: | 294 | signals: |
292 | /*#ifndef QT_NO_DRAGANDDROP | 295 | /*#ifndef QT_NO_DRAGANDDROP |
293 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 296 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
@@ -322,7 +325,7 @@ public: | |||
322 | virtual void selectAll( bool select ); | 325 | virtual void selectAll( bool select ); |
323 | virtual void clearSelection(); | 326 | virtual void clearSelection(); |
324 | virtual void invertSelection(); | 327 | virtual void invertSelection(); |
325 | 328 | ||
326 | void ensureItemVisible( const OVersatileViewItem * ); | 329 | void ensureItemVisible( const OVersatileViewItem * ); |
327 | virtual void repaintItem( const OVersatileViewItem * ) const; | 330 | virtual void repaintItem( const OVersatileViewItem * ) const; |
328 | 331 | ||
@@ -344,16 +347,16 @@ public: | |||
344 | 347 | ||
345 | void doubleClicked( OVersatileViewItem * ); | 348 | void doubleClicked( OVersatileViewItem * ); |
346 | void returnPressed( OVersatileViewItem * ); | 349 | void returnPressed( OVersatileViewItem * ); |
347 | 350 | ||
348 | void onItem( OVersatileViewItem * ); | 351 | void onItem( OVersatileViewItem * ); |
349 | void onViewport(); | 352 | void onViewport(); |
350 | 353 | ||
351 | //==============================================================================================// | 354 | //==============================================================================================// |
352 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures | 355 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures |
353 | //==============================================================================================// | 356 | //==============================================================================================// |
354 | 357 | ||
355 | /* | 358 | /* |
356 | 359 | ||
357 | public: | 360 | public: |
358 | virtual void insertItem( OVersatileViewItem * ); // QListView | 361 | virtual void insertItem( OVersatileViewItem * ); // QListView |
359 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView | 362 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView |
@@ -368,27 +371,29 @@ public: | |||
368 | virtual void sort( bool ascending = TRUE ); // QIconView | 371 | virtual void sort( bool ascending = TRUE ); // QIconView |
369 | 372 | ||
370 | */ | 373 | */ |
371 | 374 | ||
372 | signals: | 375 | signals: |
373 | void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView | 376 | void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView |
374 | void clicked( OVersatileViewItem *, const QPoint & ); // QIconView | 377 | void clicked( OVersatileViewItem *, const QPoint & ); // QIconView |
375 | 378 | ||
376 | void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView | 379 | void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView |
377 | void pressed( OVersatileViewItem *, const QPoint & ); // QIconView | 380 | void pressed( OVersatileViewItem *, const QPoint & ); // QIconView |
378 | 381 | ||
379 | void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 382 | void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView |
380 | void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView | 383 | void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView |
381 | 384 | ||
382 | void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 385 | void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView |
383 | void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView | 386 | void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView |
384 | 387 | ||
385 | void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView | 388 | void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView |
386 | void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 389 | void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView |
387 | 390 | ||
388 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView | 391 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView |
389 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 392 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView |
390 | 393 | ||
391 | }; | 394 | }; |
392 | 395 | ||
396 | } | ||
397 | } | ||
393 | #endif | 398 | #endif |
394 | 399 | ||