summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
Unidiff
Diffstat (limited to 'libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
index 5ba7b69..7834b3b 100644
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
@@ -16,48 +16,50 @@
16    .i_,=:_.      -<s. This program is distributed in the hope that 16    .i_,=:_.      -<s. This program is distributed in the hope that
17     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 17     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
18    : ..    .:,     . . . without even the implied warranty of 18    : ..    .:,     . . . without even the implied warranty of
19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
21..}^=.=       =       ; Library General Public License for more 21..}^=.=       =       ; Library General Public License for more
22++=   -.     .`     .: details. 22++=   -.     .`     .: details.
23 :     =  ...= . :.=- 23 :     =  ...= . :.=-
24 -.   .:....=;==+<; You should have received a copy of the GNU 24 -.   .:....=;==+<; You should have received a copy of the GNU
25  -_. . .   )=.  = Library General Public License along with 25  -_. . .   )=.  = Library General Public License along with
26    --        :-=` this library; see the file COPYING.LIB. 26    --        :-=` this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation, 27 If not, write to the Free Software Foundation,
28 Inc., 59 Temple Place - Suite 330, 28 Inc., 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA. 29 Boston, MA 02111-1307, USA.
30 30
31*/ 31*/
32 32
33#include "olistviewdemo.h" 33#include "olistviewdemo.h"
34#include <opie2/olistview.h> 34#include <opie2/olistview.h>
35 35
36#include <qstring.h> 36#include <qstring.h>
37#include <qpixmap.h> 37#include <qpixmap.h>
38#include <qlistview.h> 38#include <qlistview.h>
39 39
40using namespace Opie::Ui;
41
40OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) 42OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
41 :QVBox( parent, name, f ) 43 :QVBox( parent, name, f )
42{ 44{
43 lv = new ONamedListView( this ); 45 lv = new ONamedListView( this );
44 lv->setRootIsDecorated( true ); 46 lv->setRootIsDecorated( true );
45 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); 47 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) );
46 48
47 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 49 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
48 item->setText( "Column2", "ModifiedText" ); 50 item->setText( "Column2", "ModifiedText" );
49 item->setText( "Column5", "ThisColumnDoesNotExits" ); 51 item->setText( "Column5", "ThisColumnDoesNotExits" );
50 52
51 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 53 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
52 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 54 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
53 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); 55 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) );
54 item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); 56 item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) );
55 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 57 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
56 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); 58 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
57 59
58 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); 60 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
59 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); 61 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
60 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); 62 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
61 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); 63 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) );
62 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); 64 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) );
63 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); 65 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) );