summaryrefslogtreecommitdiff
path: root/libopie2/opieui/olistview.h
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/olistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/olistview.h71
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
@@ -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,7 +123,17 @@ class OListView: public QListView
-protected slots:
- /**
+ public slots:
+ /**
+ * Expand all items
+ */
+ void expand();
+ /**
+ * Collapse all items
+ */
+ void collapse();
+
+ protected slots:
+ /**
* expand the current OListViewItem
*/
- void expand(QListViewItem*);
+ void expand(QListViewItem*);
@@ -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>
*/