author | mickeyl <mickeyl> | 2003-05-01 23:06:29 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-01 23:06:29 (UTC) |
commit | 49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6 (patch) (unidiff) | |
tree | 503a7fe9fba8e297b15c07398fbf2ee215294f1c /libopie2/examples/opieui/olistviewdemo | |
parent | 8266da96576ad43a768da37000cef4e8eba000ac (diff) | |
download | opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.zip opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.gz opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.bz2 |
more work on a higher level listview interface
Diffstat (limited to 'libopie2/examples/opieui/olistviewdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp | 26 |
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 | |||
@@ -40,13 +40,39 @@ | |||
40 | OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) | 40 | 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 | ||
51 | OListViewDemo::~OListViewDemo() | 77 | OListViewDemo::~OListViewDemo() |
52 | { | 78 | { |