summaryrefslogtreecommitdiff
path: root/libopie2/opieui/olistview.cpp
Unidiff
Diffstat (limited to 'libopie2/opieui/olistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/olistview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index 0ee2fde..38670b4 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -15,48 +15,53 @@
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; Library General Public License for more 18..}^=.=       =       ; Library General Public License for more
19++=   -.     .`     .: details. 19++=   -.     .`     .: details.
20 :     =  ...= . :.=- 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU 21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with 22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB. 23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation, 24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, 25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30/* QT */ 30/* QT */
31 31
32#include <qpixmap.h> 32#include <qpixmap.h>
33 33
34/* OPIE */ 34/* OPIE */
35 35
36#include <opie2/odebug.h> 36#include <opie2/odebug.h>
37#include <opie2/olistview.h> 37#include <opie2/olistview.h>
38 38
39using namespace Opie::Core;
40
41
42namespace Opie {
43namespace Ui {
39/*====================================================================================== 44/*======================================================================================
40 * OListView 45 * OListView
41 *======================================================================================*/ 46 *======================================================================================*/
42 47
43OListView::OListView( QWidget *parent, const char *name ) 48OListView::OListView( QWidget *parent, const char *name )
44 :QListView( parent, name ) 49 :QListView( parent, name )
45{ 50{
46 //FIXME: get from global settings and calculate ==> see oglobalsettings.* 51 //FIXME: get from global settings and calculate ==> see oglobalsettings.*
47 52
48 m_alternateBackground = QColor( 238, 246, 255 ); 53 m_alternateBackground = QColor( 238, 246, 255 );
49 m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine ); 54 m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine );
50 m_fullWidth = true; 55 m_fullWidth = true;
51 connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*))); 56 connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
52} 57}
53 58
54OListView::~OListView() 59OListView::~OListView()
55{ 60{
56} 61}
57 62
58void OListView::setFullWidth( bool fullWidth ) 63void OListView::setFullWidth( bool fullWidth )
59{ 64{
60 m_fullWidth = m_fullWidth; 65 m_fullWidth = m_fullWidth;
61 #if QT_VERSION > 290 66 #if QT_VERSION > 290
62 header()->setStretchEnabled( fullWidth, columns()-1 ); 67 header()->setStretchEnabled( fullWidth, columns()-1 );
@@ -734,24 +739,26 @@ void ONamedListViewItem::setText( const QString& column, const QString& text )
734 //FIXME: I will optimize later by using a hash map. 739 //FIXME: I will optimize later by using a hash map.
735 int col = ( (ONamedListView*) listView() )->findColumn( column ); 740 int col = ( (ONamedListView*) listView() )->findColumn( column );
736 if ( col != -1 ) 741 if ( col != -1 )
737 OListViewItem::setText( col, text ); 742 OListViewItem::setText( col, text );
738 else 743 else
739 qWarning( "ONamedListViewItem::setText(): Warning! Columntext '%s' not found.", (const char*) column ); 744 qWarning( "ONamedListViewItem::setText(): Warning! Columntext '%s' not found.", (const char*) column );
740} 745}
741 746
742 747
743ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const 748ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const
744{ 749{
745 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse ); 750 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse );
746} 751}
747 752
748 753
749ONamedListViewItem* ONamedListViewItem::find( const QString& column, const QString& text, int recurse ) const 754ONamedListViewItem* ONamedListViewItem::find( const QString& column, const QString& text, int recurse ) const
750{ 755{
751 int col = ( (ONamedListView*) listView() )->findColumn( column ); 756 int col = ( (ONamedListView*) listView() )->findColumn( column );
752 if ( col != -1 ) 757 if ( col != -1 )
753 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), col, text, recurse ); 758 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), col, text, recurse );
754 else 759 else
755 return 0; 760 return 0;
756} 761}
757 762
763}
764}