summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/olistview.cpp6
-rw-r--r--libopie2/opieui/olistview.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index 8f290d3..ec503dd 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -52,4 +52,5 @@ OListView::OListView( QWidget *parent, const char *name )
m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine );
m_fullWidth = true;
+ connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
}
@@ -128,4 +129,9 @@ void OListView::setColumnSeparator( const QPen& p )
}
+void OListView::expand(QListViewItem *item)
+{
+ ((OListViewItem*)item)->expand();
+}
+
OListViewItem* OListView::childFactory()
{
diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h
index 109e309..a00b43a 100644
--- a/libopie2/opieui/olistview.h
+++ b/libopie2/opieui/olistview.h
@@ -123,4 +123,10 @@ class OListView: public QListView
#endif
+protected slots:
+ /**
+ * expand the current OListViewItem
+ */
+ void expand(QListViewItem*);
+
private:
QColor m_alternateBackground;
@@ -221,4 +227,9 @@ class OListViewItem: public QListViewItem
#endif
+ /**
+ * expand the the item
+ */
+ virtual void expand(){};
+
private:
bool m_known;