summaryrefslogtreecommitdiff
path: root/libopie2/examples
authormickeyl <mickeyl>2003-05-01 23:06:29 (UTC)
committer mickeyl <mickeyl>2003-05-01 23:06:29 (UTC)
commit49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6 (patch) (unidiff)
tree503a7fe9fba8e297b15c07398fbf2ee215294f1c /libopie2/examples
parent8266da96576ad43a768da37000cef4e8eba000ac (diff)
downloadopie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.zip
opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.gz
opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.bz2
more work on a higher level listview interface
Diffstat (limited to 'libopie2/examples') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
index 31bda9d..5ba7b69 100644
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
@@ -41,11 +41,37 @@ OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
41 :QVBox( parent, name, f ) 41 :QVBox( parent, name, f )
42{ 42{
43 lv = new ONamedListView( this ); 43 lv = new ONamedListView( this );
44 lv->setRootIsDecorated( true );
44 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); 45 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) );
45 46
46 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 47 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
47 item->setText( "Column2", "ModifiedText" ); 48 item->setText( "Column2", "ModifiedText" );
48 item->setText( "Column5", "ThisColumnDoesNotExits" ); 49 item->setText( "Column5", "ThisColumnDoesNotExits" );
50
51 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
52 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
53 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) );
54 item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) );
55 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
56 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
57
58 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
59 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
60 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
61 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) );
62 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) );
63 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) );
64
65 if ( lv->find( 3, "Mickey", 3 ) )
66 qDebug( "found Mickey :-)" );
67 else
68 qDebug( "did not found Mickey :-(" );
69
70 if ( lv->find( 3, "Minni", 0 ) )
71 qDebug( "found Minni :-)" );
72 else
73 qDebug( "did not found Minni :-(" );
74
49} 75}
50 76
51OListViewDemo::~OListViewDemo() 77OListViewDemo::~OListViewDemo()