summaryrefslogtreecommitdiff
Unidiff
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
@@ -51,6 +51,7 @@ OListView::OListView( QWidget *parent, const char *name )
51 m_alternateBackground = QColor( 238, 246, 255 ); 51 m_alternateBackground = QColor( 238, 246, 255 );
52 m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine ); 52 m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine );
53 m_fullWidth = true; 53 m_fullWidth = true;
54 connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
54} 55}
55 56
56OListView::~OListView() 57OListView::~OListView()
@@ -127,6 +128,11 @@ void OListView::setColumnSeparator( const QPen& p )
127 repaint(); 128 repaint();
128} 129}
129 130
131void OListView::expand(QListViewItem *item)
132{
133 ((OListViewItem*)item)->expand();
134}
135
130OListViewItem* OListView::childFactory() 136OListViewItem* OListView::childFactory()
131{ 137{
132 return new OListViewItem( this ); 138 return new OListViewItem( this );
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
@@ -122,6 +122,12 @@ class OListView: public QListView
122 virtual void serializeFrom( QDataStream& s ); 122 virtual void serializeFrom( QDataStream& s );
123#endif 123#endif
124 124
125protected slots:
126 /**
127 * expand the current OListViewItem
128 */
129 void expand(QListViewItem*);
130
125 private: 131 private:
126 QColor m_alternateBackground; 132 QColor m_alternateBackground;
127 bool m_fullWidth; 133 bool m_fullWidth;
@@ -220,6 +226,11 @@ class OListViewItem: public QListViewItem
220 virtual void serializeFrom( QDataStream& s ); 226 virtual void serializeFrom( QDataStream& s );
221 #endif 227 #endif
222 228
229 /**
230 * expand the the item
231 */
232 virtual void expand(){};
233
223 private: 234 private:
224 bool m_known; 235 bool m_known;
225 bool m_odd; 236 bool m_odd;