summaryrefslogtreecommitdiff
path: root/libopie2/opieui/olistview.cpp
Unidiff
Diffstat (limited to 'libopie2/opieui/olistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/olistview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index 67b4b83..4386e0e 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -60,50 +60,50 @@ OListView::~OListView()
60{ 60{
61} 61}
62 62
63void OListView::setFullWidth( bool fullWidth ) 63void OListView::setFullWidth( bool fullWidth )
64{ 64{
65 m_fullWidth = fullWidth; 65 m_fullWidth = fullWidth;
66 #if QT_VERSION > 290 66 #if QT_VERSION >= 0x030000
67 header()->setStretchEnabled( fullWidth, columns()-1 ); 67 header()->setStretchEnabled( fullWidth, columns()-1 );
68 #endif 68 #endif
69} 69}
70 70
71bool OListView::fullWidth() const 71bool OListView::fullWidth() const
72{ 72{
73 return m_fullWidth; 73 return m_fullWidth;
74} 74}
75 75
76int OListView::addColumn( const QString& label, int width ) 76int OListView::addColumn( const QString& label, int width )
77{ 77{
78 int result = QListView::addColumn( label, width ); 78 int result = QListView::addColumn( label, width );
79 #if QT_VERSION > 290 79 #if QT_VERSION >= 0x030000
80 if (m_fullWidth) { 80 if (m_fullWidth) {
81 header()->setStretchEnabled( false, columns()-2 ); 81 header()->setStretchEnabled( false, columns()-2 );
82 header()->setStretchEnabled( true, columns()-1 ); 82 header()->setStretchEnabled( true, columns()-1 );
83 } 83 }
84 #endif 84 #endif
85 return result; 85 return result;
86} 86}
87 87
88int OListView::addColumn( const QIconSet& iconset, const QString& label, int width ) 88int OListView::addColumn( const QIconSet& iconset, const QString& label, int width )
89{ 89{
90 int result = QListView::addColumn( iconset, label, width ); 90 int result = QListView::addColumn( iconset, label, width );
91 #if QT_VERSION > 290 91 #if QT_VERSION >= 0x030000
92 if (m_fullWidth) { 92 if (m_fullWidth) {
93 header()->setStretchEnabled( false, columns()-2 ); 93 header()->setStretchEnabled( false, columns()-2 );
94 header()->setStretchEnabled( true, columns()-1 ); 94 header()->setStretchEnabled( true, columns()-1 );
95 } 95 }
96 #endif 96 #endif
97 return result; 97 return result;
98} 98}
99 99
100void OListView::removeColumn( int index ) 100void OListView::removeColumn( int index )
101{ 101{
102 QListView::removeColumn(index); 102 QListView::removeColumn(index);
103 #if QT_VERSION > 290 103 #if QT_VERSION >= 0x030000
104 if ( m_fullWidth && index == columns() ) 104 if ( m_fullWidth && index == columns() )
105 { 105 {
106 header()->setStretchEnabled( true, columns()-1 ); 106 header()->setStretchEnabled( true, columns()-1 );
107 } 107 }
108 #endif 108 #endif
109} 109}