From 49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Thu, 01 May 2003 23:06:29 +0000 Subject: more work on a higher level listview interface --- (limited to 'libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp') 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 ) :QVBox( parent, name, f ) { lv = new ONamedListView( this ); + lv->setRootIsDecorated( true ); lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); item->setText( "Column2", "ModifiedText" ); item->setText( "Column5", "ThisColumnDoesNotExits" ); + + new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); + new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); + new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); + item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); + new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); + new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); + + new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); + new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); + new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); + item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); + item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); + item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); + + if ( lv->find( 3, "Mickey", 3 ) ) + qDebug( "found Mickey :-)" ); + else + qDebug( "did not found Mickey :-(" ); + + if ( lv->find( 3, "Minni", 0 ) ) + qDebug( "found Minni :-)" ); + else + qDebug( "did not found Minni :-(" ); + } OListViewDemo::~OListViewDemo() -- cgit v0.9.0.2