-rw-r--r-- | libopie2/opieui/olistview.h | 71 |
1 files changed, 63 insertions, 8 deletions
diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h index a00b43a..59b0973 100644 --- a/libopie2/opieui/olistview.h +++ b/libopie2/opieui/olistview.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | =. (C) 2003-2004 Michael 'Mickey' Lauer <mickey@vanille.de> | |
4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | .=l. | 4 | .=l. |
6 | .>+-= | 5 | .>+-= |
@@ -52,5 +51,5 @@ class OListViewItem; | |||
52 | * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. | 51 | * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. |
53 | * | 52 | * |
54 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 53 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
55 | */ | 54 | */ |
56 | class OListView: public QListView | 55 | class OListView: public QListView |
@@ -123,9 +122,19 @@ class OListView: public QListView | |||
123 | #endif | 122 | #endif |
124 | 123 | ||
125 | protected slots: | 124 | public slots: |
126 | /** | 125 | /** |
126 | * Expand all items | ||
127 | */ | ||
128 | void expand(); | ||
129 | /** | ||
130 | * Collapse all items | ||
131 | */ | ||
132 | void collapse(); | ||
133 | |||
134 | protected slots: | ||
135 | /** | ||
127 | * expand the current OListViewItem | 136 | * expand the current OListViewItem |
128 | */ | 137 | */ |
129 | void expand(QListViewItem*); | 138 | void expand(QListViewItem*); |
130 | 139 | ||
131 | private: | 140 | private: |
@@ -154,4 +163,5 @@ QDataStream& operator>>( QDataStream& stream, OListView& listview ); | |||
154 | class OListViewItem: public QListViewItem | 163 | class OListViewItem: public QListViewItem |
155 | { | 164 | { |
165 | friend class OCheckListItem; | ||
156 | public: | 166 | public: |
157 | /** | 167 | /** |
@@ -251,4 +261,49 @@ QDataStream& operator>>( QDataStream& stream, OListViewItem& item ); | |||
251 | #endif // QT_NO_DATASTREAM | 261 | #endif // QT_NO_DATASTREAM |
252 | 262 | ||
263 | |||
264 | /*====================================================================================== | ||
265 | * OCheckListItem | ||
266 | *======================================================================================*/ | ||
267 | |||
268 | class OCheckListItem : public QCheckListItem | ||
269 | { | ||
270 | public: | ||
271 | |||
272 | OCheckListItem( QCheckListItem *parent, const QString &text, | ||
273 | Type = Controller ); | ||
274 | OCheckListItem( QListViewItem *parent, const QString &text, | ||
275 | Type = Controller ); | ||
276 | OCheckListItem( QListView *parent, const QString &text, | ||
277 | Type = Controller ); | ||
278 | OCheckListItem( QListViewItem *parent, const QString &text, | ||
279 | const QPixmap & ); | ||
280 | OCheckListItem( QListView *parent, const QString &text, | ||
281 | const QPixmap & ); | ||
282 | ~OCheckListItem(); | ||
283 | /** | ||
284 | * @returns the background color of the list item. | ||
285 | */ | ||
286 | const QColor& backgroundColor(); | ||
287 | /** | ||
288 | * @returns true, if the item is at an odd position and | ||
289 | * thus have to be painted with the alternate background color. | ||
290 | */ | ||
291 | bool isAlternate(); | ||
292 | /** | ||
293 | * @note: Reimplemented for internal purposes - the API is not affected | ||
294 | * | ||
295 | */ | ||
296 | void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); | ||
297 | /** | ||
298 | * Perform object initialization. | ||
299 | */ | ||
300 | void init(); | ||
301 | |||
302 | private: | ||
303 | bool m_known; | ||
304 | bool m_odd; | ||
305 | }; | ||
306 | |||
307 | |||
253 | /*====================================================================================== | 308 | /*====================================================================================== |
254 | * ONamedListView | 309 | * ONamedListView |
@@ -262,5 +317,5 @@ class ONamedListViewItem; | |||
262 | * This class provides a higher-level interface to an OListView. | 317 | * This class provides a higher-level interface to an OListView. |
263 | * | 318 | * |
264 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 319 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
265 | */ | 320 | */ |
266 | class ONamedListView: public OListView | 321 | class ONamedListView: public OListView |
@@ -311,5 +366,5 @@ class ONamedListView: public OListView | |||
311 | * This class provides a higher-level interface to an OListViewItem. | 366 | * This class provides a higher-level interface to an OListViewItem. |
312 | * | 367 | * |
313 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 368 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
314 | */ | 369 | */ |
315 | class ONamedListViewItem: public OListViewItem | 370 | class ONamedListViewItem: public OListViewItem |