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.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
new file mode 100644
index 0000000..31bda9d
--- a/dev/null
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
@@ -0,0 +1,54 @@
1/*
2                 This file is part of the Opie Project
3
4              Copyright (C) 2003 Michael 'Mickey' Lauer
5 <mickey@tm.informatik.uni-frankfurt.de>
6 =.
7 .=l.
8           .>+-=
9 _;:,     .>    :=|. This program is free software; you can
10.> <`_,   >  .   <= redistribute it and/or modify it under
11:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
12.="- .-=="i,     .._ License as published by the Free Software
13 - .   .-<_>     .<> Foundation; either version 2 of the License,
14     ._= =}       : or (at your option) any later version.
15    .%`+i>       _;_.
16    .i_,=:_.      -<s. This program is distributed in the hope that
17     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
18    : ..    .:,     . . . without even the implied warranty of
19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
21..}^=.=       =       ; Library General Public License for more
22++=   -.     .`     .: details.
23 :     =  ...= . :.=-
24 -.   .:....=;==+<; You should have received a copy of the GNU
25  -_. . .   )=.  = Library General Public License along with
26    --        :-=` this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation,
28 Inc., 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA.
30
31*/
32
33#include "olistviewdemo.h"
34#include <opie2/olistview.h>
35
36#include <qstring.h>
37#include <qpixmap.h>
38#include <qlistview.h>
39
40OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
41 :QVBox( parent, name, f )
42{
43 lv = new ONamedListView( this );
44 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) );
45
46 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
47 item->setText( "Column2", "ModifiedText" );
48 item->setText( "Column5", "ThisColumnDoesNotExits" );
49}
50
51OListViewDemo::~OListViewDemo()
52{
53}
54