author | mickeyl <mickeyl> | 2004-03-05 21:36:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-05 21:36:58 (UTC) |
commit | b9d58b616102970872129b5bc2f55569910f5c03 (patch) (side-by-side diff) | |
tree | 593b40cce6f3da75593c90bff337b9b9c5092f7e /libopie2/opieui/olistview.h | |
parent | 4a18103940564be8585af8121203561e16f0a32c (diff) | |
download | opie-b9d58b616102970872129b5bc2f55569910f5c03.zip opie-b9d58b616102970872129b5bc2f55569910f5c03.tar.gz opie-b9d58b616102970872129b5bc2f55569910f5c03.tar.bz2 |
add OCheckListItem
change my email address
-rw-r--r-- | libopie2/opieui/olistview.h | 65 |
1 files changed, 60 insertions, 5 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 @@ -2,4 +2,3 @@ This file is part of the Opie Project - - =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> + =. (C) 2003-2004 Michael 'Mickey' Lauer <mickey@vanille.de> .=l. @@ -53,3 +52,3 @@ class OListViewItem; * - * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> + * @author Michael 'Mickey' Lauer <mickey@vanille.de> */ @@ -124,2 +123,12 @@ class OListView: public QListView + public slots: + /** + * Expand all items + */ + void expand(); + /** + * Collapse all items + */ + void collapse(); + protected slots: @@ -155,2 +164,3 @@ class OListViewItem: public QListViewItem { + friend class OCheckListItem; public: @@ -252,2 +262,47 @@ QDataStream& operator>>( QDataStream& stream, OListViewItem& item ); + +/*====================================================================================== + * OCheckListItem + *======================================================================================*/ + +class OCheckListItem : public QCheckListItem +{ + public: + + OCheckListItem( QCheckListItem *parent, const QString &text, + Type = Controller ); + OCheckListItem( QListViewItem *parent, const QString &text, + Type = Controller ); + OCheckListItem( QListView *parent, const QString &text, + Type = Controller ); + OCheckListItem( QListViewItem *parent, const QString &text, + const QPixmap & ); + OCheckListItem( QListView *parent, const QString &text, + const QPixmap & ); + ~OCheckListItem(); + /** + * @returns the background color of the list item. + */ + const QColor& backgroundColor(); + /** + * @returns true, if the item is at an odd position and + * thus have to be painted with the alternate background color. + */ + bool isAlternate(); + /** + * @note: Reimplemented for internal purposes - the API is not affected + * + */ + void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); + /** + * Perform object initialization. + */ + void init(); + + private: + bool m_known; + bool m_odd; +}; + + /*====================================================================================== @@ -263,3 +318,3 @@ class ONamedListViewItem; * - * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> + * @author Michael 'Mickey' Lauer <mickey@vanille.de> */ @@ -312,3 +367,3 @@ class ONamedListView: public OListView * - * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> + * @author Michael 'Mickey' Lauer <mickey@vanille.de> */ |