-rw-r--r-- | libopie2/opieui/olistview.cpp | 6 |
1 files changed, 6 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 | |||
@@ -42,24 +42,25 @@ | |||
42 | /*====================================================================================== | 42 | /*====================================================================================== |
43 | * OListView | 43 | * OListView |
44 | *======================================================================================*/ | 44 | *======================================================================================*/ |
45 | 45 | ||
46 | OListView::OListView( QWidget *parent, const char *name ) | 46 | OListView::OListView( QWidget *parent, const char *name ) |
47 | :QListView( parent, name ) | 47 | :QListView( parent, name ) |
48 | { | 48 | { |
49 | //FIXME: get from global settings and calculate ==> see oglobalsettings.* | 49 | //FIXME: get from global settings and calculate ==> see oglobalsettings.* |
50 | 50 | ||
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 | ||
56 | OListView::~OListView() | 57 | OListView::~OListView() |
57 | { | 58 | { |
58 | } | 59 | } |
59 | 60 | ||
60 | void OListView::setFullWidth( bool fullWidth ) | 61 | void OListView::setFullWidth( bool fullWidth ) |
61 | { | 62 | { |
62 | m_fullWidth = m_fullWidth; | 63 | m_fullWidth = m_fullWidth; |
63 | #if QT_VERSION > 290 | 64 | #if QT_VERSION > 290 |
64 | header()->setStretchEnabled( fullWidth, columns()-1 ); | 65 | header()->setStretchEnabled( fullWidth, columns()-1 ); |
65 | #endif | 66 | #endif |
@@ -118,24 +119,29 @@ void OListView::setAlternateBackground( const QColor &c ) | |||
118 | 119 | ||
119 | const QPen& OListView::columnSeparator() const | 120 | const QPen& OListView::columnSeparator() const |
120 | { | 121 | { |
121 | return m_columnSeparator; | 122 | return m_columnSeparator; |
122 | } | 123 | } |
123 | 124 | ||
124 | void OListView::setColumnSeparator( const QPen& p ) | 125 | void OListView::setColumnSeparator( const QPen& p ) |
125 | { | 126 | { |
126 | m_columnSeparator = p; | 127 | m_columnSeparator = p; |
127 | repaint(); | 128 | repaint(); |
128 | } | 129 | } |
129 | 130 | ||
131 | void OListView::expand(QListViewItem *item) | ||
132 | { | ||
133 | ((OListViewItem*)item)->expand(); | ||
134 | } | ||
135 | |||
130 | OListViewItem* OListView::childFactory() | 136 | OListViewItem* OListView::childFactory() |
131 | { | 137 | { |
132 | return new OListViewItem( this ); | 138 | return new OListViewItem( this ); |
133 | } | 139 | } |
134 | 140 | ||
135 | #ifndef QT_NO_DATASTREAM | 141 | #ifndef QT_NO_DATASTREAM |
136 | void OListView::serializeTo( QDataStream& s ) const | 142 | void OListView::serializeTo( QDataStream& s ) const |
137 | { | 143 | { |
138 | #warning Caution... the binary format is still under construction... | 144 | #warning Caution... the binary format is still under construction... |
139 | qDebug( "storing OListView..." ); | 145 | qDebug( "storing OListView..." ); |
140 | 146 | ||
141 | // store number of columns and the labels | 147 | // store number of columns and the labels |