summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui
authormickeyl <mickeyl>2003-05-01 14:00:37 (UTC)
committer mickeyl <mickeyl>2003-05-01 14:00:37 (UTC)
commit95e533a6ac257d3b95cd8905660008fb7dcd33f1 (patch) (side-by-side diff)
treec671954f59eaa70db2285f9abe49fd8b4512dd12 /libopie2/examples/opieui
parent1d721ddb247e9000e29fba3150e0cce5f59f543e (diff)
downloadopie-95e533a6ac257d3b95cd8905660008fb7dcd33f1.zip
opie-95e533a6ac257d3b95cd8905660008fb7dcd33f1.tar.gz
opie-95e533a6ac257d3b95cd8905660008fb7dcd33f1.tar.bz2
- restructure opieui example directory
- start work on ONamedListViewItem providing a slightly higher level interface
Diffstat (limited to 'libopie2/examples/opieui') (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 @@
+Makefile*
+moc*
+*moc
+*.o
+~*
+moc
+obj
+
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 @@
+/**********************************************************************
+** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
+**
+** This file is part of Opie Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+**********************************************************************/
+
+#include "olistviewdemo.h"
+#include <opie2/oapplication.h>
+
+int main( int argc, char **argv )
+{
+ OApplication a( argc, argv, "OListViewDemo" );
+ OListViewDemo e;
+ a.showMainWidget(&e);
+ return a.exec();
+}
+
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 @@
+/*
+                 This file is part of the Opie Project
+
+              Copyright (C) 2003 Michael 'Mickey' Lauer
+ <mickey@tm.informatik.uni-frankfurt.de>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "olistviewdemo.h"
+#include <opie2/olistview.h>
+
+#include <qstring.h>
+#include <qpixmap.h>
+#include <qlistview.h>
+
+OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
+ :QVBox( parent, name, f )
+{
+ lv = new ONamedListView( this );
+ 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" );
+}
+
+OListViewDemo::~OListViewDemo()
+{
+}
+
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 @@
+/*
+                 This file is part of the Opie Project
+
+              Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef OLISTVIEWDEMO_H
+#define OLISTVIEWDEMO_H
+
+#include <qvbox.h>
+#include <opie2/olistview.h>
+
+class OListViewDemo: public QVBox
+{
+ Q_OBJECT
+
+ public:
+ OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 );
+ virtual ~OListViewDemo();
+
+ private:
+ ONamedListView* lv;
+
+};
+
+#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 @@
TEMPLATE = app
CONFIG = qt warn_on debug
-HEADERS = opieuidemo.h \
- oversatileviewdemo.h
-SOURCES = opieuidemo.cpp \
- oversatileviewdemo.cpp \
+HEADERS = olistviewdemo.h
+SOURCES = olistviewdemo.cpp \
main.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lopieui2 -lopiecore2
-TARGET = opieuidemo
+TARGET = olistviewdemo
MOC_DIR = moc
OBJECTS_DIR = obj
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 @@
+TEMPLATE = subdirs
+SUBDIRS = olistviewdemo oversatileviewdemo
+
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