summaryrefslogtreecommitdiff
path: root/libopie2/examples
Unidiff
Diffstat (limited to 'libopie2/examples') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/olistviewdemo/.cvsignore8
-rw-r--r--libopie2/examples/opieui/olistviewdemo/main.cpp26
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp54
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.h51
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro (copied from libopie2/examples/opieui/oversatileviewdemo/opieui.pro)8
-rw-r--r--libopie2/examples/opieui/opieui.pro3
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro (renamed from libopie2/examples/opieui/oversatileviewdemo/opieui.pro)0
7 files changed, 145 insertions, 5 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/.cvsignore b/libopie2/examples/opieui/olistviewdemo/.cvsignore
new file mode 100644
index 0000000..1317f7e
--- a/dev/null
+++ b/libopie2/examples/opieui/olistviewdemo/.cvsignore
@@ -0,0 +1,8 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6moc
7obj
8
diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp
new file mode 100644
index 0000000..a93f361
--- a/dev/null
+++ b/libopie2/examples/opieui/olistviewdemo/main.cpp
@@ -0,0 +1,26 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#include "olistviewdemo.h"
17#include <opie2/oapplication.h>
18
19int main( int argc, char **argv )
20{
21 OApplication a( argc, argv, "OListViewDemo" );
22 OListViewDemo e;
23 a.showMainWidget(&e);
24 return a.exec();
25}
26
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
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
new file mode 100644
index 0000000..8a5986a
--- a/dev/null
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
@@ -0,0 +1,51 @@
1/*
2                 This file is part of the Opie Project
3
4              Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
5 =.
6 .=l.
7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29
30*/
31
32#ifndef OLISTVIEWDEMO_H
33#define OLISTVIEWDEMO_H
34
35#include <qvbox.h>
36#include <opie2/olistview.h>
37
38class OListViewDemo: public QVBox
39{
40 Q_OBJECT
41
42 public:
43 OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 );
44 virtual ~OListViewDemo();
45
46 private:
47 ONamedListView* lv;
48
49};
50
51#endif
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro
index 8ad5fc9..aabe733 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro
+++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro
@@ -1,14 +1,12 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on debug 2CONFIG = qt warn_on debug
3HEADERS = opieuidemo.h \ 3HEADERS = olistviewdemo.h
4 oversatileviewdemo.h 4SOURCES = olistviewdemo.cpp \
5SOURCES = opieuidemo.cpp \
6 oversatileviewdemo.cpp \
7 main.cpp 5 main.cpp
8INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
9DEPENDPATH += $(OPIEDIR)/include 7DEPENDPATH += $(OPIEDIR)/include
10LIBS += -lopieui2 -lopiecore2 8LIBS += -lopieui2 -lopiecore2
11TARGET = opieuidemo 9TARGET = olistviewdemo
12MOC_DIR = moc 10MOC_DIR = moc
13OBJECTS_DIR = obj 11OBJECTS_DIR = obj
14 12
diff --git a/libopie2/examples/opieui/opieui.pro b/libopie2/examples/opieui/opieui.pro
new file mode 100644
index 0000000..b52f013
--- a/dev/null
+++ b/libopie2/examples/opieui/opieui.pro
@@ -0,0 +1,3 @@
1TEMPLATE = subdirs
2SUBDIRS = olistviewdemo oversatileviewdemo
3
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro
index 8ad5fc9..8ad5fc9 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro
+++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro