summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-01-29 14:23:27 (UTC)
committer mickeyl <mickeyl>2005-01-29 14:23:27 (UTC)
commit20b3de56573b9e86c6b6041faf684adc8cbb2a45 (patch) (unidiff)
treee0d91c84dee46d1cce3b0d68fd2c10c3dd7ce3a1
parent555b999359a5aad999eaaf48632ce85f25125b85 (diff)
downloadopie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.zip
opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.gz
opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.bz2
examples to where they belong
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opieui/olistviewdemo/.cvsignore (renamed from libopie2/examples/opieui/olistviewdemo/.cvsignore)0
-rw-r--r--examples/opieui/osplitter_example/.cvsignore (renamed from libopie2/examples/opieui/osplitter_example/.cvsignore)0
-rw-r--r--examples/opieui/oversatileviewdemo/.cvsignore (renamed from libopie2/examples/.cvsignore)0
-rw-r--r--examples/opieui/owidgetstack_example/.cvsignore (renamed from libopie2/examples/opieui/owidgetstack_example/.cvsignore)0
-rw-r--r--libopie2/examples/config.in6
-rw-r--r--libopie2/examples/examples.pro12
-rw-r--r--libopie2/examples/opiecore/.cvsignore6
-rw-r--r--libopie2/examples/opiecore/oconfigdemo/.cvsignore8
-rw-r--r--libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp32
-rw-r--r--libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro18
-rw-r--r--libopie2/examples/opiecore/odebugdemo/.cvsignore8
-rw-r--r--libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp142
-rw-r--r--libopie2/examples/opiecore/odebugdemo/odebugdemo.pro17
-rw-r--r--libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore8
-rw-r--r--libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp15
-rw-r--r--libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro14
-rw-r--r--libopie2/examples/opiecore/okeyconfigmanager/README1
-rw-r--r--libopie2/examples/opiecore/onotifydemo/.cvsignore6
-rw-r--r--libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp144
-rw-r--r--libopie2/examples/opiecore/onotifydemo/onotifydemo.pro18
-rw-r--r--libopie2/examples/opiecore/opiecore.pro2
-rw-r--r--libopie2/examples/opiecore/oplugins/.cvsignore3
-rw-r--r--libopie2/examples/opiecore/oplugins/oplugins.cpp47
-rw-r--r--libopie2/examples/opiecore/oplugins/oplugins.pro11
-rw-r--r--libopie2/examples/opiecore/oprocessdemo/.cvsignore7
-rw-r--r--libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp13
-rw-r--r--libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro12
-rw-r--r--libopie2/examples/opiedb/.cvsignore6
-rw-r--r--libopie2/examples/opiedb/opiedb.pro3
-rw-r--r--libopie2/examples/opiedb/sqltest/.cvsignore7
-rw-r--r--libopie2/examples/opiedb/sqltest/main.cpp62
-rw-r--r--libopie2/examples/opiedb/sqltest/spaltenweise.cpp43
-rw-r--r--libopie2/examples/opiedb/sqltest/spaltenweise.pro13
-rw-r--r--libopie2/examples/opiedb/sqltest/sqltest.pro17
-rw-r--r--libopie2/examples/opiedb/sqltest/test.osql4
-rw-r--r--libopie2/examples/opiedb/sqltest/test2.osql5
-rw-r--r--libopie2/examples/opiedb/sqltest/zeilenweise.cpp86
-rw-r--r--libopie2/examples/opiedb/sqltest/zeilenweise.pro13
-rw-r--r--libopie2/examples/opiemm/.cvsignore6
-rw-r--r--libopie2/examples/opiemm/opiemm.pro3
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/.cvsignore7
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp66
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro12
-rw-r--r--libopie2/examples/opienet/.cvsignore6
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/.cvsignore8
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp234
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro19
-rw-r--r--libopie2/examples/opienet/onetworkdemo/.cvsignore8
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp176
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro12
-rw-r--r--libopie2/examples/opienet/opienet.pro3
-rw-r--r--libopie2/examples/opieui/.cvsignore6
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro12
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp128
-rw-r--r--libopie2/examples/opieui/okeyconfigwidget/testwidget.h40
-rw-r--r--libopie2/examples/opieui/olistviewdemo/main.cpp29
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp86
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.h51
-rw-r--r--libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro23
-rw-r--r--libopie2/examples/opieui/opieui.pro5
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.cpp34
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.h19
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.pro13
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp81
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.h51
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.pro12
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/.cvsignore6
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/1.pngbin1969 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/1small.pngbin708 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/2.pngbin2333 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/2small.pngbin875 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/3.pngbin2009 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/3small.pngbin921 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/4.pngbin2076 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/4small.pngbin762 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/5.pngbin2266 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/5small.pngbin743 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/6.pngbin2491 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/6small.pngbin894 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/folder_closed.pngbin675 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/folder_closed32.pngbin2105 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/folder_opened.pngbin743 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/folder_opened32.pngbin2112 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/leaf.pngbin717 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/leaf32.pngbin1904 -> 0 bytes
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/main.cpp32
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp203
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h60
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp160
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h77
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro17
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp133
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h27
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro13
-rw-r--r--libopie2/libopie2.pro2
95 files changed, 1 insertions, 2688 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/.cvsignore b/examples/opieui/olistviewdemo/.cvsignore
index 3983e82..3983e82 100644
--- a/libopie2/examples/opieui/olistviewdemo/.cvsignore
+++ b/examples/opieui/olistviewdemo/.cvsignore
diff --git a/libopie2/examples/opieui/osplitter_example/.cvsignore b/examples/opieui/osplitter_example/.cvsignore
index e4ebfe9..e4ebfe9 100644
--- a/libopie2/examples/opieui/osplitter_example/.cvsignore
+++ b/examples/opieui/osplitter_example/.cvsignore
diff --git a/libopie2/examples/.cvsignore b/examples/opieui/oversatileviewdemo/.cvsignore
index 8f7300c..8f7300c 100644
--- a/libopie2/examples/.cvsignore
+++ b/examples/opieui/oversatileviewdemo/.cvsignore
diff --git a/libopie2/examples/opieui/owidgetstack_example/.cvsignore b/examples/opieui/owidgetstack_example/.cvsignore
index 4911782..4911782 100644
--- a/libopie2/examples/opieui/owidgetstack_example/.cvsignore
+++ b/examples/opieui/owidgetstack_example/.cvsignore
diff --git a/libopie2/examples/config.in b/libopie2/examples/config.in
deleted file mode 100644
index e9e8946..0000000
--- a/libopie2/examples/config.in
+++ b/dev/null
@@ -1,6 +0,0 @@
1 config LIBOPIE2EXAMPLES
2 boolean "libopie2 examples"
3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB && LIBOPIE2NET && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM
5 comment "the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim, libopie2ui and libopie2mm"
6 depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB && LIBOPIE2NET && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM)
diff --git a/libopie2/examples/examples.pro b/libopie2/examples/examples.pro
deleted file mode 100644
index 192c1f5..0000000
--- a/libopie2/examples/examples.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1TEMPLATE = subdirs
2unix:SUBDIRS = opieui opienet opiecore opiemm opiedb
3
4
5!contains( platform, x11 ) {
6 include( $(OPIEDIR)/include.pro )
7}
8
9contains( platform, x11 ) {
10 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
11}
12
diff --git a/libopie2/examples/opiecore/.cvsignore b/libopie2/examples/opiecore/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opiecore/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opiecore/oconfigdemo/.cvsignore b/libopie2/examples/opiecore/oconfigdemo/.cvsignore
deleted file mode 100644
index db3635b..0000000
--- a/libopie2/examples/opiecore/oconfigdemo/.cvsignore
+++ b/dev/null
@@ -1,8 +0,0 @@
1oconfigdemo
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp
deleted file mode 100644
index 2ee4a65..0000000
--- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp
+++ b/dev/null
@@ -1,32 +0,0 @@
1#include <opie2/oapplication.h>
2#include <opie2/oconfig.h>
3#include <qpe/config.h>
4
5using namespace Opie::Core;
6
7int main( int argc, char** argv )
8{
9 OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" );
10
11 OConfigGroupSaver c1( app->config(), "MyGroup" );
12 app->config()->writeEntry( "AnEntry", "InMyGroup" );
13 {
14 OConfigGroupSaver c2( c1.config(), "AnotherGroup" );
15 app->config()->writeEntry( "AnEntry", "InAnotherGroup" );
16 } // closing the scope returns to the last group
17
18 app->config()->writeEntry( "AnotherEntry", "InMyGroup" );
19
20 // do more stuff ...
21
22 // in this (special) case it is necessary to manually call OConfig::write() (see below)
23 app->config()->write();
24
25 // can't delete the app when using the OConfigGroupSaver on top level scope,
26 // because the destructor of the OConfigGroupSaver needs an application object
27 //delete app; // destructor deletes config which writes changes back to disk
28
29 return 0;
30
31}
32
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro
deleted file mode 100644
index b29c106..0000000
--- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro
+++ b/dev/null
@@ -1,18 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = oconfigdemo.cpp
5
6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lopiecore2
9TARGET = oconfigdemo
10
11!contains( platform, x11 ) {
12 include( $(OPIEDIR)/include.pro )
13}
14
15contains( platform, x11 ) {
16 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
17}
18
diff --git a/libopie2/examples/opiecore/odebugdemo/.cvsignore b/libopie2/examples/opiecore/odebugdemo/.cvsignore
deleted file mode 100644
index 731667d..0000000
--- a/libopie2/examples/opiecore/odebugdemo/.cvsignore
+++ b/dev/null
@@ -1,8 +0,0 @@
1odebugdemo
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
deleted file mode 100644
index b046d28..0000000
--- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
+++ b/dev/null
@@ -1,142 +0,0 @@
1/* QT */
2
3#include <qvbox.h>
4#include <qhbox.h>
5#include <qvbuttongroup.h>
6#include <qhbuttongroup.h>
7#include <qlineedit.h>
8#include <qradiobutton.h>
9#include <qpushbutton.h>
10
11/* OPIE */
12
13#include <qpe/config.h>
14
15#include <opie2/odebug.h>
16#include <opie2/oapplication.h>
17#include <opie2/oglobal.h>
18#include <opie2/oglobalsettings.h>
19
20using namespace Opie::Core;
21
22class DemoApp : public OApplication
23{
24Q_OBJECT
25public:
26 DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 debug demo" )
27 {
28 // you have access to your OApplication object via oApp
29 odebug << "Process-wide OApplication object @ " << oApp << "" << oendl;
30
31 // you have access to global settings via OGlobalSettings
32 int mode = OGlobalSettings::debugMode();
33
34 QVBox* vbox = new QVBox();
35 setMainWidget( vbox );
36
37 g = new QVButtonGroup( "Output Strategy", vbox );
38 QRadioButton* r0 = new QRadioButton( "file", g );
39 QRadioButton* r1 = new QRadioButton( "messagebox", g );
40 QRadioButton* r2 = new QRadioButton( "stderr", g );
41 QRadioButton* r3 = new QRadioButton( "syslog", g );
42 QRadioButton* r4 = new QRadioButton( "socket", g );
43 g->insert( r0, 0 );
44 g->insert( r1, 1 );
45 g->insert( r2, 2 );
46 g->insert( r3, 3 );
47 g->insert( r4, 4 );
48 g->setRadioButtonExclusive( true );
49 connect( g, SIGNAL( clicked(int) ), this, SLOT( chooseMethod(int) ) );
50
51 if ( mode != -1 ) g->setButton( mode );
52
53 QHButtonGroup* hbox = new QHButtonGroup( "Extra Output Information", vbox );
54 e = new QLineEdit( hbox );
55 QPushButton* pb = new QPushButton( hbox );
56
57 connect( e, SIGNAL( returnPressed() ), this, SLOT( updateDebugOutput() ) );
58 connect( pb, SIGNAL( clicked() ), this, SLOT( updateDebugOutput() ) );
59
60 // show the additional debug mode dependent output information
61 e->setText( OGlobalSettings::debugOutput() );
62
63 // buttos
64 QPushButton* info = new QPushButton( "Emit Debug(Info) Output!", vbox );
65 connect( info, SIGNAL( clicked() ), this, SLOT( emitInfoOutput() ) );
66 QPushButton* warn = new QPushButton( "Emit a Warning Output!", vbox );
67 connect( warn, SIGNAL( clicked() ), this, SLOT( emitWarningOutput() ) );
68 QPushButton* error = new QPushButton( "Emit an Error Output!", vbox );
69 connect( error, SIGNAL( clicked() ), this, SLOT( emitErrorOutput() ) );
70 QPushButton* fatal = new QPushButton( "Emit a Fatal Output!", vbox );
71 connect( fatal, SIGNAL( clicked() ), this, SLOT( emitFatalOutput() ) );
72
73 QPushButton* tb = new QPushButton( "Emit a Fatal Backtrace!", vbox );
74 connect( tb, SIGNAL( clicked() ), this, SLOT( emitTBOutput() ) );
75
76 info->show();
77 warn->show();
78 error->show();
79 fatal->show();
80 tb->show();
81 g->show();
82 hbox->show();
83 e->show();
84 vbox->show();
85 showMainWidget( vbox );
86 }
87
88public slots:
89 void chooseMethod(int method)
90 {
91 m = method;
92 odebug << "choosing method: " << method << "" << oendl;
93 OConfig* g = OGlobal::config();
94 g->setGroup( "General" );
95 g->writeEntry( "debugMode", m );
96 e->setText( OGlobalSettings::debugOutput() );
97 g->write();
98 }
99 void updateDebugOutput()
100 {
101 OConfig* g = OGlobal::config();
102 g->setGroup( "General" );
103 g->writeEntry( "debugOutput"+QString::number(OGlobalSettings::debugMode()), e->text() );
104 g->write();
105 }
106 void emitInfoOutput()
107 {
108 odebug << "This is a debug message" << oendl;
109 }
110 void emitWarningOutput()
111 {
112 owarn << "This is a warning message" << oendl;
113 }
114 void emitErrorOutput()
115 {
116 oerr << "This is an errror message" << oendl;
117 }
118 void emitFatalOutput()
119 {
120 ofatal << "This is a fatal message" << oendl;
121 }
122 void emitTBOutput()
123 {
124 ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n
125 }
126
127private:
128 QButtonGroup* g;
129 int m;
130 QLineEdit* e;
131};
132
133int main( int argc, char** argv )
134{
135 DemoApp* app = new DemoApp( argc, argv );
136 app->exec();
137
138 return 0;
139
140}
141
142#include "odebugdemo.moc"
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro b/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro
deleted file mode 100644
index e06053c..0000000
--- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro
+++ b/dev/null
@@ -1,17 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = odebugdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2
8TARGET = odebugdemo
9
10!contains( platform, x11 ) {
11 include( $(OPIEDIR)/include.pro )
12}
13
14contains( platform, x11 ) {
15 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
16}
17
diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore b/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore
deleted file mode 100644
index d564c61..0000000
--- a/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore
+++ b/dev/null
@@ -1,8 +0,0 @@
1oglobalsettingsdemo
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp
deleted file mode 100644
index 37bcf13..0000000
--- a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp
+++ b/dev/null
@@ -1,15 +0,0 @@
1#include <opie2/oglobalsettings.h>
2#include <stdio.h>
3
4using namespace Opie::Core;
5
6int main( int argc, char** argv )
7{
8 printf( "current debugmode seems to be '%d'\n", OGlobalSettings::debugMode() );
9 printf( "output information for this mode is '%s'\n", (const char*) OGlobalSettings::debugOutput() );
10
11 return 0;
12
13}
14
15//#include "moc/oconfigdemo.moc"
diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro
deleted file mode 100644
index d7bed05..0000000
--- a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro
+++ b/dev/null
@@ -1,14 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = oglobalsettingsdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2
8TARGET = oglobalsettingsdemo
9MOC_DIR = moc
10OBJECTS_DIR = obj
11
12include( $(OPIEDIR)/include.pro )
13
14
diff --git a/libopie2/examples/opiecore/okeyconfigmanager/README b/libopie2/examples/opiecore/okeyconfigmanager/README
deleted file mode 100644
index 327b7c2..0000000
--- a/libopie2/examples/opiecore/okeyconfigmanager/README
+++ b/dev/null
@@ -1 +0,0 @@
1See opieui/okeyconfigwidget for an example of possible usage \ No newline at end of file
diff --git a/libopie2/examples/opiecore/onotifydemo/.cvsignore b/libopie2/examples/opiecore/onotifydemo/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opiecore/onotifydemo/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp b/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp
deleted file mode 100644
index b9ff9db..0000000
--- a/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp
+++ b/dev/null
@@ -1,144 +0,0 @@
1/* OPIE */
2#include <opie2/odebug.h>
3#include <opie2/oapplication.h>
4#include <opie2/ofiledialog.h>
5#include <opie2/olistview.h>
6#include <opie2/ofilenotify.h>
7using namespace Opie::Core;
8using namespace Opie::Ui;
9
10/* QT */
11#include <qcheckbox.h>
12#include <qvbox.h>
13#include <qhbox.h>
14#include <qhbuttongroup.h>
15#include <qvbuttongroup.h>
16#include <qmessagebox.h>
17#include <qpushbutton.h>
18
19class DemoApp : public OApplication
20{
21 Q_OBJECT
22public:
23 DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 notify demo" )
24 {
25
26 QVBox* vbox = new QVBox();
27 setMainWidget( vbox );
28
29 l = new OListView( vbox );
30 l->addColumn( "Notification Path" );
31 l->addColumn( "Trigger Type" );
32 l->addColumn( "Trigger Mask" );
33 l->setColumnAlignment( 1, AlignCenter );
34 l->setColumnAlignment( 2, AlignCenter );
35
36 QHBox* hbox = new QHBox( vbox );
37
38 g2 = new QVButtonGroup( "Specify Trigger Type", hbox );
39 //QCheckBox* c1 = new QCheckBox( "Multi", g2 );
40 QCheckBox* c2 = new QCheckBox( "Access", g2 );
41 QCheckBox* c3 = new QCheckBox( "Modify", g2 );
42 QCheckBox* c4 = new QCheckBox( "Create", g2 );
43 QCheckBox* c5 = new QCheckBox( "Delete", g2 );
44 QCheckBox* c6 = new QCheckBox( "Rename", g2 );
45 QCheckBox* c7 = new QCheckBox( "Attrib", g2 );
46 g2->insert( c2, Access );
47 g2->insert( c3, Modify );
48 g2->insert( c4, Create );
49 g2->insert( c5, Delete );
50 g2->insert( c6, Rename );
51 g2->insert( c7, Attrib );
52 connect( g2, SIGNAL( pressed(int) ), this, SLOT( modifierClicked(int) ) );
53
54 g1 = new QVButtonGroup( "Add/Remove", hbox );
55 QPushButton* plus1 = new QPushButton( "Add\n&Single", g1 );
56 QPushButton* plus2 = new QPushButton( "Add\n&Multi", g1 );
57 QPushButton* minus = new QPushButton( "&Remove\nIt!", g1 );
58 g1->insert( plus1, 0 );
59 g1->insert( plus2, 1 );
60 g1->insert( minus, 2 );
61 connect( plus1, SIGNAL( clicked() ), this, SLOT( addSingle() ) );
62 connect( plus2, SIGNAL( clicked() ), this, SLOT( addMulti() ) );
63 connect( minus, SIGNAL( clicked() ), this, SLOT( delTrigger() ) );
64
65 g1->show();
66 g2->show();
67 l->show();
68 hbox->show();
69 vbox->show();
70 showMainWidget( vbox );
71 }
72
73public:
74 void addTrigger( bool multi = false )
75 {
76 if ( !m )
77 {
78 QMessageBox::warning( 0, "Add Trigger", "<p>Can't add trigger without at least one selected trigger type</p>", "&Sorry", 0 );
79 return;
80 }
81
82 QString filename = OFileDialog::getOpenFileName( OFileSelector::ExtendedAll );
83 if ( !filename.isEmpty() )
84 {
85 odebug << "Filename = " << filename << oendl;
86
87 int fntype = m;
88 if ( multi ) fntype |=(int) Multi;
89
90 QString modifier = QString().sprintf( " = 0x%08x", fntype );
91 new OListViewItem( l, filename, multi ? "MULTI" : "SINGLE", modifier );
92 if ( !multi )
93 OFileNotification::singleShot( filename, this, SLOT( trigger() ), (OFileNotificationType) fntype );
94 else
95 OFileNotification::singleShot( filename, this, SLOT( trigger() ), (OFileNotificationType) fntype );
96 }
97 else
98 {
99 odebug << "cancelled." << oendl;
100 }
101 }
102
103public slots:
104 void modifierClicked( int modifier ) { m = static_cast<OFileNotificationType>( (int)m ^ int(modifier) ); };
105 void addSingle() { addTrigger(); };
106 void addMulti() { addTrigger( true ); };
107
108 void delTrigger()
109 {
110 QListViewItem* item = l->selectedItem();
111 if ( !item )
112 {
113 QMessageBox::warning( 0, "Del Trigger", "<p>No trigger selected!</p>", "&Sorry", 0 );
114 return;
115 }
116 else
117 {
118 QString filename( item->text( 0 ) );
119 odebug << "Filename = " << filename << oendl;
120 }
121 }
122
123 void trigger()
124 {
125 owarn << "FIRE!" << oendl;
126 }
127
128private:
129 OListView* l;
130 QButtonGroup* g1;
131 QButtonGroup* g2;
132 OFileNotificationType m;
133};
134
135int main( int argc, char** argv )
136{
137 DemoApp* app = new DemoApp( argc, argv );
138 app->exec();
139
140 return 0;
141
142}
143
144#include "moc/onotifydemo.moc"
diff --git a/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro b/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro
deleted file mode 100644
index d2c9138..0000000
--- a/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro
+++ b/dev/null
@@ -1,18 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = onotifydemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 -lopieui2
8TARGET = onotifydemo
9
10!contains( platform, x11 ) {
11 include( $(OPIEDIR)/include.pro )
12}
13
14contains( platform, x11 ) {
15 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
16}
17
18MOC_DIR = moc
diff --git a/libopie2/examples/opiecore/opiecore.pro b/libopie2/examples/opiecore/opiecore.pro
deleted file mode 100644
index 39ffd3b..0000000
--- a/libopie2/examples/opiecore/opiecore.pro
+++ b/dev/null
@@ -1,2 +0,0 @@
1TEMPLATE = subdirs
2unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo oprocessdemo oplugins
diff --git a/libopie2/examples/opiecore/oplugins/.cvsignore b/libopie2/examples/opiecore/oplugins/.cvsignore
deleted file mode 100644
index 514e011..0000000
--- a/libopie2/examples/opiecore/oplugins/.cvsignore
+++ b/dev/null
@@ -1,3 +0,0 @@
1oplugins
2Makefile
3.moc
diff --git a/libopie2/examples/opiecore/oplugins/oplugins.cpp b/libopie2/examples/opiecore/oplugins/oplugins.cpp
deleted file mode 100644
index 26623be..0000000
--- a/libopie2/examples/opiecore/oplugins/oplugins.cpp
+++ b/dev/null
@@ -1,47 +0,0 @@
1/*
2 * You may copy, modify and or distribute without any limitation
3 */
4#include <opie2/odebug.h>
5#include <opie2/opluginloader.h>
6
7#include <opie2/todayplugininterface.h>
8
9using Opie::Core::OPluginItem;
10using Opie::Core::OGenericPluginLoader;
11using Opie::Core::OPluginLoader;
12
13void debugLst( const OPluginItem::List& lst ) {
14 for ( OPluginItem::List::ConstIterator it = lst.begin(); it != lst.end(); ++it )
15 odebug << "Name " << (*it).name() << " " << (*it).path() << " " << (*it).position() << oendl;
16}
17
18
19int main( void ) {
20 OGenericPluginLoader loader( "today", true );
21 loader.setAutoDelete( true );
22
23 odebug << "IS in Safe Mode" << loader.isInSafeMode() << oendl;
24
25 OPluginItem::List lst = loader.allAvailable( true );
26 debugLst( lst );
27
28 lst = loader.filtered( true );
29 debugLst( lst );
30
31 for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) {
32 QUnknownInterface* iface = loader.load( *it, IID_TodayPluginInterface );
33 }
34
35 OPluginLoader loader2("today",true);
36 OPluginItem::List lst2 = loader2.allAvailable( true );
37 debugLst( lst2 );
38
39 for( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ){
40 TodayPluginInterface* iface = loader2.load<TodayPluginInterface>( *it, IID_TodayPluginInterface );
41 }
42
43
44 /*
45 * now it's autodelete so cleaned up for us
46 */
47}
diff --git a/libopie2/examples/opiecore/oplugins/oplugins.pro b/libopie2/examples/opiecore/oplugins/oplugins.pro
deleted file mode 100644
index 03f8e4d..0000000
--- a/libopie2/examples/opiecore/oplugins/oplugins.pro
+++ b/dev/null
@@ -1,11 +0,0 @@
1TEMPLATE = app
2CONFIG += qt warn_on
3
4SOURCES = oplugins.cpp
5
6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDSPATH += $(OPIEDIR)/include
8
9LIBS += -lopiecore2
10
11include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opiecore/oprocessdemo/.cvsignore b/libopie2/examples/opiecore/oprocessdemo/.cvsignore
deleted file mode 100644
index ab9cb4d..0000000
--- a/libopie2/examples/opiecore/oprocessdemo/.cvsignore
+++ b/dev/null
@@ -1,7 +0,0 @@
1oprocessdemo
2Makefile*
3moc*
4*moc
5*.o
6~*
7
diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp
deleted file mode 100644
index c5fc328..0000000
--- a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp
+++ b/dev/null
@@ -1,13 +0,0 @@
1#include <opie2/oprocess.h>
2#include <stdio.h>
3
4using namespace Opie::Core;
5
6int main( int argc, char** argv )
7{
8 printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) );
9 printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) );
10
11 return 0;
12}
13
diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro
deleted file mode 100644
index 7efc614..0000000
--- a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = oprocessdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2
8TARGET = oprocessdemo
9
10include( $(OPIEDIR)/include.pro )
11
12
diff --git a/libopie2/examples/opiedb/.cvsignore b/libopie2/examples/opiedb/.cvsignore
deleted file mode 100644
index 972e959..0000000
--- a/libopie2/examples/opiedb/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6obj
diff --git a/libopie2/examples/opiedb/opiedb.pro b/libopie2/examples/opiedb/opiedb.pro
deleted file mode 100644
index 85fa6db..0000000
--- a/libopie2/examples/opiedb/opiedb.pro
+++ b/dev/null
@@ -1,3 +0,0 @@
1TEMPLATE = subdirs
2SUBDIRS = sqltest
3
diff --git a/libopie2/examples/opiedb/sqltest/.cvsignore b/libopie2/examples/opiedb/sqltest/.cvsignore
deleted file mode 100644
index 3290247..0000000
--- a/libopie2/examples/opiedb/sqltest/.cvsignore
+++ b/dev/null
@@ -1,7 +0,0 @@
1sqltest
2Makefile*
3moc*
4*moc
5*.o
6~*
7obj
diff --git a/libopie2/examples/opiedb/sqltest/main.cpp b/libopie2/examples/opiedb/sqltest/main.cpp
deleted file mode 100644
index f4338e9..0000000
--- a/libopie2/examples/opiedb/sqltest/main.cpp
+++ b/dev/null
@@ -1,62 +0,0 @@
1/*
2 =. This file is part of the Opie Project
3 .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org>
4 .>+-=
5 _;:, .> :=|. This library is free software; you can
6.> <`_, > . <= redistribute it and/or modify it under
7:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
8.="- .-=="i, .._ License as published by the Free Software
9 - . .-<_> .<> Foundation; either version 2 of the License,
10 ._= =} : or (at your option) any later version.
11 .%`+i> _;_.
12 .i_,=:_. -<s. This library is distributed in the hope that
13 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
14 : .. .:, . . . without even the implied warranty of
15 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
16 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.= = ; Library General Public License for more
18++= -. .` .: details.
19 : = ...= . :.=-
20 -. .:....=;==+<; You should have received a copy of the GNU
21 -_. . . )=. = Library General Public License along with
22 -- :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29/* OPIE */
30#include <opie2/osqlmanager.h>
31#include <opie2/osqlquery.h>
32#include <opie2/osqldriver.h>
33#include <opie2/osqlresult.h>
34#include <opie2/odebug.h>
35
36#include <qpe/qpeapplication.h>
37
38/* QT */
39#include <qdir.h>
40
41using namespace Opie::DB;
42int main( int argc, char* argv[] ) {
43
44QPEApplication app( argc, argv );
45OSQLManager man;
46man.registerPath( QDir::currentDirPath() );
47OSQLBackEnd::ValueList list = man.queryBackEnd();
48
49OSQLDriver *driver = man.standard();
50 owarn << "testmain" + driver->id() << oendl;
51 driver->setUrl("/home/ich/test2vhgytry");
52 if ( driver->open() ) {
53 owarn << "could open" << oendl;
54 }else
55 owarn << "wasn't able to open" << oendl;
56 OSQLRawQuery raw("select * from t2" );
57 OSQLResult res = driver->query( &raw );
58
59 OSQLRawQuery raw2( "insert into t2 VALUES(ROWID,'Meine Mutter') ");
60 res = driver->query(&raw2);
61
62};
diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp
deleted file mode 100644
index c11724c..0000000
--- a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp
+++ b/dev/null
@@ -1,43 +0,0 @@
1#include <qdir.h>
2
3#include <qpe/qpeapplication.h>
4#include <opie2/osqlmanager.h>
5#include <opie2/osqlquery.h>
6#include <opie2/osqldriver.h>
7#include <opie2/osqlresult.h>
8
9using namespace Opie::DB;
10
11int main( int argc, char* argv[] ) {
12
13 QPEApplication app( argc, argv );
14 OSQLManager man;
15 man.registerPath( QDir::currentDirPath() );
16 OSQLBackEnd::ValueList list = man.queryBackEnd();
17
18 OSQLDriver *driver = man.standard();
19 owarn << "testmain" + driver->id() << oendl;
20 driver->setUrl("/home/ich/spaltenweise");
21 if ( driver->open() ) {
22 owarn << "could open" << oendl;
23 }else
24 owarn << "wasn't able to open" << oendl;
25 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist("
26 "uid,categories,completed,"
27 "progress,summary,HasDate,"
28 "DateDay,DateMonth,DateYear,"
29 "priority,description)" );
30
31 OSQLResult res = driver->query( raw );
32 delete raw;
33 for (int i = 0; i< 10000; i++ ) {
34 int uid = i;
35 OSQLRawQuery raw("insert into todolist VALUES("+
36 QString::number(uid)+ ",'-122324;-12132',1,100,"+
37 "'Summary234-"+QString::number(uid)+"',1,5,8,2002,1,"+
38 "'Description\n12344')");
39 OSQLResult res = driver->query( &raw );
40
41 }
42 return 0;
43};
diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.pro b/libopie2/examples/opiedb/sqltest/spaltenweise.pro
deleted file mode 100644
index 0335d16..0000000
--- a/libopie2/examples/opiedb/sqltest/spaltenweise.pro
+++ b/dev/null
@@ -1,13 +0,0 @@
1 TEMPLATE= app
2 CONFIG = qt warn_on
3 HEADERS =
4 SOURCES = spaltenweise.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6 DEPENDPATH+= $(OPIEDIR)/include
7LIBS += -lqpe -lopiedb2
8 TARGET = spaltenweise
9
10
11
12
13include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opiedb/sqltest/sqltest.pro b/libopie2/examples/opiedb/sqltest/sqltest.pro
deleted file mode 100644
index a4eee6b..0000000
--- a/libopie2/examples/opiedb/sqltest/sqltest.pro
+++ b/dev/null
@@ -1,17 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = main.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lqpe -lopiedb2 -lsqlite3
8TARGET = sqltest
9
10include( $(OPIEDIR)/include.pro )
11
12!isEmpty( LIBSQLITE_INC_DIR ) {
13 INCLUDEPATH = $$LIBSQLITE_INC_DIR $$INCLUDEPATH
14}
15!isEmpty( LIBSQLITE_LIB_DIR ) {
16 LIBS = -L$$LIBSQLITE_LIB_DIR $$LIBS
17}
diff --git a/libopie2/examples/opiedb/sqltest/test.osql b/libopie2/examples/opiedb/sqltest/test.osql
deleted file mode 100644
index 340e4f2..0000000
--- a/libopie2/examples/opiedb/sqltest/test.osql
+++ b/dev/null
@@ -1,4 +0,0 @@
1Name = Test1
2Vendor = Zecke
3License = ZPL
4Preference = 15
diff --git a/libopie2/examples/opiedb/sqltest/test2.osql b/libopie2/examples/opiedb/sqltest/test2.osql
deleted file mode 100644
index 952c99b..0000000
--- a/libopie2/examples/opiedb/sqltest/test2.osql
+++ b/dev/null
@@ -1,5 +0,0 @@
1Name = Test2
2Vendor = Schaf
3License = SPL
4Preference = 15
5Default = 0
diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp
deleted file mode 100644
index 126e797..0000000
--- a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp
+++ b/dev/null
@@ -1,86 +0,0 @@
1#include <qdir.h>
2
3#include <qpe/qpeapplication.h>
4#include <opie2/osqlmanager.h>
5#include <opie2/osqlquery.h>
6#include <opie2/osqldriver.h>
7#include <opie2/osqlresult.h>
8
9using namespace Opie::DB;
10
11int main( int argc, char* argv[] ) {
12
13QPEApplication app( argc, argv );
14OSQLManager man;
15man.registerPath( QDir::currentDirPath() );
16OSQLBackEnd::ValueList list = man.queryBackEnd();
17
18OSQLDriver *driver = man.standard();
19 owarn << "testmain" + driver->id() << oendl;
20 driver->setUrl("/home/ich/zeilenweise");
21 if ( driver->open() ) {
22 owarn << "could open" << oendl;
23 }else
24 owarn << "wasn't able to open" << oendl;
25 OSQLRawQuery raw2("BEGIN TRANSACTION");
26 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(uid,key,value)");
27 OSQLResult res = driver->query( &raw2 );
28 res = driver->query( raw );
29 delete raw;
30 for (int i = 0; i< 10000; i++ ) {
31 int uid = i;
32 OSQLRawQuery *raw;
33 raw = new OSQLRawQuery("insert into todolist VALUES("+QString::number(uid)+",'Categories',"+"'-122324;-12132')");
34 OSQLResult res = driver->query(raw );
35 delete raw;
36
37 raw = new OSQLRawQuery("insert into todolist VALUES("+QString::number(uid) +
38 ",'Completed',1)" );
39 res = driver->query(raw );
40 delete raw;
41
42 raw = new OSQLRawQuery("insert into todolist VALUES("+
43 QString::number(uid)+",'Progress',100)" );
44 res = driver->query( raw );
45 delete raw;
46
47 raw = new OSQLRawQuery("insert into todolist VALUES("+
48 QString::number(uid)+",'Summary',"+
49 "'Summary234-"+ QString::number(uid) + "')");
50 res = driver->query( raw );
51 delete raw;
52
53 raw = new OSQLRawQuery("insert into todolist VALUES("+
54 QString::number(uid)+",'HasDate',1)");
55 res = driver->query( raw );
56 delete raw;
57
58 raw = new OSQLRawQuery("insert into todolist VALUES("+
59 QString::number(uid)+",'DateDay',5)");
60 res = driver->query( raw );
61 delete raw;
62
63 raw = new OSQLRawQuery("insert into todolist VALUES("+
64 QString::number(uid)+",'DateMonth',8)");
65 res = driver->query( raw );
66 delete raw;
67
68 raw = new OSQLRawQuery("insert into todolist VALUES("+
69 QString::number(uid)+",'DateYear',2002)");
70 res = driver->query( raw );
71 delete raw;
72
73 raw = new OSQLRawQuery("insert into todolist VALUES("+
74 QString::number(uid)+",'Priority',1)");
75 res = driver->query( raw );
76 delete raw;
77
78 raw = new OSQLRawQuery("insert into todolist VALUES("+
79 QString::number(uid)+",'Description','" +
80 QString::number(uid) + "Description\n12344')");
81 res = driver->query( raw );
82 delete raw;
83 }
84 OSQLRawQuery raw3("COMMIT");
85 res = driver->query(&raw3 );
86};
diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.pro b/libopie2/examples/opiedb/sqltest/zeilenweise.pro
deleted file mode 100644
index 1fa17cd..0000000
--- a/libopie2/examples/opiedb/sqltest/zeilenweise.pro
+++ b/dev/null
@@ -1,13 +0,0 @@
1 TEMPLATE= app
2 CONFIG = qt warn_on
3 HEADERS =
4 SOURCES = zeilenweise.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6 DEPENDPATH+= $(OPIEDIR)/include
7LIBS += -lqpe -lopiedb2
8 TARGET = zeilenweise
9
10
11
12
13include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opiemm/.cvsignore b/libopie2/examples/opiemm/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opiemm/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opiemm/opiemm.pro b/libopie2/examples/opiemm/opiemm.pro
deleted file mode 100644
index 0522ebe..0000000
--- a/libopie2/examples/opiemm/opiemm.pro
+++ b/dev/null
@@ -1,3 +0,0 @@
1TEMPLATE = subdirs
2SUBDIRS = osoundsystemdemo
3
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore b/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore
deleted file mode 100644
index 0c98558..0000000
--- a/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore
+++ b/dev/null
@@ -1,7 +0,0 @@
1osoundsystemdemo
2Makefile*
3moc*
4*moc
5*.o
6~*
7
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp
deleted file mode 100644
index f74a1b9..0000000
--- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp
+++ b/dev/null
@@ -1,66 +0,0 @@
1/*
2 =. This file is part of the Opie Project
3 .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org>
4 .>+-=
5 _;:, .> :=|. This library is free software; you can
6.> <`_, > . <= redistribute it and/or modify it under
7:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
8.="- .-=="i, .._ License as published by the Free Software
9 - . .-<_> .<> Foundation; either version 2 of the License,
10 ._= =} : or (at your option) any later version.
11 .%`+i> _;_.
12 .i_,=:_. -<s. This library is distributed in the hope that
13 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
14 : .. .:, . . . without even the implied warranty of
15 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
16 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.= = ; Library General Public License for more
18++= -. .` .: details.
19 : = ...= . :.=-
20 -. .:....=;==+<; You should have received a copy of the GNU
21 -_. . . )=. = Library General Public License along with
22 -- :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29/* OPIE */
30#include <opie2/osoundsystem.h>
31#include <opie2/odebug.h>
32
33using namespace Opie::MM;
34
35int main( int argc, char** argv )
36{
37 odebug << "OPIE Sound System Demo" << oendl;
38
39 OSoundSystem* sound = OSoundSystem::instance();
40
41 OSoundSystem::CardIterator it = sound->iterator();
42/*
43 while ( it.current() )
44 {
45 odebug << "DEMO: OSoundSystem contains Interface '" << it.current()->name() << "'" << oendl;
46 ++it;
47 }
48
49*/
50 OSoundCard* card = it.current();
51
52 OMixerInterface* mixer = card->mixer();
53
54 QStringList channels = mixer->allChannels();
55
56 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it )
57 {
58 bool stereo = mixer->isStereo( *it );
59 odebug << "OSSDEMO: Mixer has channel " << *it << ( stereo ? "[stereo]" : "[mono]" ) << oendl;
60 odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff )
61 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl;
62 }
63
64 return 0;
65
66}
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
deleted file mode 100644
index 95924be..0000000
--- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = osoundsystemdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 -lopiemm2
8TARGET = osoundsystemdemo
9MOC_DIR = moc
10OBJECTS_DIR = obj
11
12include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opienet/.cvsignore b/libopie2/examples/opienet/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opienet/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opienet/miniwellenreiter/.cvsignore b/libopie2/examples/opienet/miniwellenreiter/.cvsignore
deleted file mode 100644
index e0e629a..0000000
--- a/libopie2/examples/opienet/miniwellenreiter/.cvsignore
+++ b/dev/null
@@ -1,8 +0,0 @@
1miniwellenreiter
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
deleted file mode 100644
index ebd3b5f..0000000
--- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
+++ b/dev/null
@@ -1,234 +0,0 @@
1#include <qdict.h>
2#include <qsocketnotifier.h>
3#include <qstring.h>
4#include <opie2/onetwork.h>
5#include <qapplication.h>
6#include <opie2/opcap.h>
7#include <cerrno>
8#include <cstdio>
9#include <cstdlib>
10#include <cstring>
11
12
13using namespace Opie::Net;
14//======================== Station help class ===============================
15
16class Station
17{
18 public:
19 Station( QString t, int c, bool w ) : type(t), channel(c), wep(w), beacons(1) {};
20 ~Station() {};
21
22 QString type;
23 int channel;
24 bool wep;
25 int beacons;
26};
27
28QDict<Station> stations;
29
30//======================== Application class ===============================
31
32class Wellenreiter : public QApplication
33{
34Q_OBJECT
35public:
36 Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ), channel( 1 )
37 {
38
39 ONetwork* net = ONetwork::instance();
40
41 if ( argc < 3 )
42 {
43 printf( "Usage: ./%s <interface> <driver> <interval>\n", argv[0] );
44 printf( "\n" );
45 printf( "Valid wireless interfaces (detected) are:\n" );
46
47 ONetwork::InterfaceIterator it = net->iterator();
48 while ( it.current() )
49 {
50 if ( it.current()->isWireless() )
51 {
52 printf( " - '%s' (MAC=%s) (IPv4=%s)\n", (const char*) it.current()->name(),
53 (const char*) it.current()->macAddress().toString(),
54 (const char*) it.current()->ipV4Address() );
55 }
56 ++it;
57 }
58 exit( -1 );
59 }
60
61 printf( "*******************************************************************\n" );
62 printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" );
63 printf( "*******************************************************************\n" );
64 printf( "\n\n" );
65
66 QString interface( argv[1] );
67 QString driver( argv[2] );
68
69 printf( "Trying to use '%s' as %s-controlled device...\n", (const char*) interface, (const char*) driver );
70
71 // sanity checks before downcasting
72 ONetworkInterface* iface = net->interface( interface );
73 if ( !iface )
74 {
75 printf( "Interface '%s' doesn't exist. Exiting.\n", (const char*) interface );
76 exit( -1 );
77 }
78 if ( !iface->isWireless() )
79 {
80 printf( "Interface '%s' doesn't support wireless extensions. Exiting.\n", (const char*) interface );
81 exit( -1 );
82 }
83
84 // downcast should be safe now
85 wiface = (OWirelessNetworkInterface*) iface;
86 printf( "Using wireless interface '%s' for scanning (current SSID is '%s')...\n", (const char*) interface, (const char*) wiface->SSID() );
87
88 // ifconfig +promisc the interface to receive all packets
89 if ( !wiface->promiscuousMode() )
90 {
91 printf( "Interface status is not promisc... switching to promisc... " );
92 wiface->setPromiscuousMode( true );
93 if ( !wiface->promiscuousMode() )
94 {
95 printf( "failed (%s). Exiting.\n", strerror( errno ) );
96 exit( -1 );
97 }
98 else
99 {
100 printf( "ok.\n" );
101 }
102 }
103 else
104 printf( "Interface status is already promisc - good.\n" );
105
106 // connect a monitoring strategy to the interface
107 if ( driver == "orinoco" )
108 new OOrinocoMonitoringInterface( wiface, false );
109 else
110 if ( driver == "hostap" )
111 new OHostAPMonitoringInterface( wiface, false );
112 else
113 if ( driver == "wlan-ng" )
114 new OWlanNGMonitoringInterface( wiface, false );
115 else
116 {
117 printf( "Unknown driver. Exiting\n" );
118 exit( -1 );
119 }
120
121 // enable monitoring mode
122 printf( "Enabling monitor mode...\n" );
123 wiface->setMode( "monitor" );
124
125 // open a packet capturer
126 cap = new OPacketCapturer();
127 cap->open( interface );
128 if ( !cap->isOpen() )
129 {
130 printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) );
131 exit( -1 );
132 }
133
134 // set capturer to non-blocking mode
135 cap->setBlocking( false );
136
137 // start channel hopper
138 //wiface->setChannelHopping( 1000 );
139
140 // connect
141 connect( cap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
142 // timer
143 startTimer( 1000 );
144
145 }
146
147 ~Wellenreiter() {};
148
149public slots:
150 virtual void timerEvent(QTimerEvent* e)
151 {
152 wiface->setChannel( channel++ );
153 if ( channel == 14 ) channel = 1;
154 }
155
156 void receivePacket(OPacket* p)
157 {
158 if (!p)
159 {
160 printf( "(empty packet received)\n" );
161 return;
162 }
163
164 OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" );
165 if ( beacon )
166 {
167 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
168 QString essid = ssid ? ssid->ID() : QString::fromLatin1( "<unknown>" );
169
170 if ( stations.find( essid ) )
171 stations[essid]->beacons++;
172 else
173 {
174 printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) essid );
175 stations.insert( essid, new Station( "unknown", wiface->channel(),
176 ((OWaveLanPacket*) beacon->parent())->usesWep() ) );
177 }
178 return;
179 }
180
181 OWaveLanDataPacket* data = (OWaveLanDataPacket*) p->child( "802.11 Data" );
182 if ( data )
183 {
184 OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" );
185 if ( wlan->fromDS() && !wlan->toDS() )
186 {
187 printf( "FromDS: '%s' -> '%s' via '%s'\n",
188 (const char*) wlan->macAddress3().toString(true),
189 (const char*) wlan->macAddress1().toString(true),
190 (const char*) wlan->macAddress2().toString(true) );
191 }
192 else
193 if ( !wlan->fromDS() && wlan->toDS() )
194 {
195 printf( "ToDS: '%s' -> '%s' via '%s'\n",
196 (const char*) wlan->macAddress2().toString(true),
197 (const char*) wlan->macAddress3().toString(true),
198 (const char*) wlan->macAddress1().toString(true) );
199 }
200 else
201 if ( wlan->fromDS() && wlan->toDS() )
202 {
203 printf( "WSD(bridge): '%s' -> '%s' via '%s' and '%s'\n",
204 (const char*) wlan->macAddress4().toString(true),
205 (const char*) wlan->macAddress3().toString(true),
206 (const char*) wlan->macAddress1().toString(true),
207 (const char*) wlan->macAddress2().toString(true) );
208 }
209 else
210 {
211 printf( "IBSS(AdHoc): '%s' -> '%s' (Cell: '%s')'\n",
212 (const char*) wlan->macAddress2().toString(true),
213 (const char*) wlan->macAddress1().toString(true),
214 (const char*) wlan->macAddress3().toString(true) );
215 }
216 return;
217 }
218 }
219private:
220 OPacketCapturer* cap;
221 OWirelessNetworkInterface* wiface;
222 int channel;
223};
224
225
226int main( int argc, char** argv )
227{
228 Wellenreiter w( argc, argv );
229 w.exec();
230 return 0;
231}
232
233#include "miniwellenreiter.moc"
234
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro
deleted file mode 100644
index d7c1fc2..0000000
--- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro
+++ b/dev/null
@@ -1,19 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = miniwellenreiter.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 -lopienet2
8TARGET = miniwellenreiter
9MOC_DIR = moc
10OBJECTS_DIR = obj
11
12include( $(OPIEDIR)/include.pro )
13
14!isEmpty( LIBPCAP_INC_DIR ) {
15 INCLUDEPATH = $$LIBPCAP_INC_DIR $$INCLUDEPATH
16}
17!isEmpty( LIBPCAP_LIB_DIR ) {
18 LIBS = -L$$LIBPCAP_LIB_DIR $$LIBS
19}
diff --git a/libopie2/examples/opienet/onetworkdemo/.cvsignore b/libopie2/examples/opienet/onetworkdemo/.cvsignore
deleted file mode 100644
index c2638e5..0000000
--- a/libopie2/examples/opienet/onetworkdemo/.cvsignore
+++ b/dev/null
@@ -1,8 +0,0 @@
1onetworkdemo
2Makefile*
3obj
4moc*
5*moc
6*.o
7~*
8
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
deleted file mode 100644
index e0c93a2..0000000
--- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
+++ b/dev/null
@@ -1,176 +0,0 @@
1/*
2 =. This file is part of the Opie Project
3 .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org>
4 .>+-=
5 _;:, .> :=|. This library is free software; you can
6.> <`_, > . <= redistribute it and/or modify it under
7:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
8.="- .-=="i, .._ License as published by the Free Software
9 - . .-<_> .<> Foundation; either version 2 of the License,
10 ._= =} : or (at your option) any later version.
11 .%`+i> _;_.
12 .i_,=:_. -<s. This library is distributed in the hope that
13 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
14 : .. .:, . . . without even the implied warranty of
15 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
16 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.= = ; Library General Public License for more
18++= -. .` .: details.
19 : = ...= . :.=-
20 -. .:....=;==+<; You should have received a copy of the GNU
21 -_. . . )=. = Library General Public License along with
22 -- :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29/* OPIE */
30#include <opie2/onetwork.h>
31#include <opie2/ostation.h>
32#include <opie2/omanufacturerdb.h>
33#include <opie2/odebug.h>
34
35/* STD */
36#include <unistd.h>
37
38using namespace Opie::Net;
39
40int main( int argc, char** argv )
41{
42 odebug << "OPIE Network Demo" << oendl;
43
44 ONetwork* net = ONetwork::instance();
45
46 ONetwork::InterfaceIterator it = net->iterator();
47
48 while ( it.current() )
49 {
50 odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl;
51 odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl;
52 odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl;
53 odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl;
54 odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl;
55 odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl;
56 odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl;
57 odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl;
58 if ( it.current()->isWireless() )
59 {
60 OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() );
61 odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl;
62 odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl;
63 odebug << "DEMO: Antenna is tuned to '" << iface->frequency() << "', that is channel " << iface->channel() << "" << oendl;
64
65 //if ( iface->mode() == OWirelessNetworkInterface::adhoc )
66 //{
67 //odebug << "DEMO: Associated AP has MAC Address '" << iface->associatedAP().toString() << "'" << oendl;
68 //}
69
70 /*
71
72 // nickname
73 odebug << "DEMO: Current NickName is '" << iface->nickName() << "'" << oendl;
74 iface->setNickName( "MyNickName" );
75 if ( iface->nickName() != "MyNickName" )
76 odebug << "DEMO: Warning! Can't change nickname" << oendl;
77 else
78 odebug << "DEMO: Nickname change successful." << oendl;
79
80 /*
81
82 // operation mode
83 odebug << "DEMO: Current OperationMode is '" << iface->mode() << "'" << oendl;
84 iface->setMode( "adhoc" );
85 if ( iface->mode() != "adhoc" )
86 odebug << "DEMO: Warning! Can't change operation mode" << oendl;
87 else
88 odebug << "DEMO: Operation Mode change successful." << oendl;
89
90 // RF channel
91 odebug << "DEMO: Current Channel is '" << iface->channel() << "'" << oendl;
92 iface->setChannel( 1 );
93 if ( iface->channel() != 1 )
94 odebug << "DEMO: Warning! Can't change RF channel" << oendl;
95 else
96 odebug << "DEMO: RF channel change successful." << oendl;
97
98 iface->setMode( "managed" );
99
100 */
101
102 /*
103
104 // network scan
105
106 OStationList* stations = iface->scanNetwork();
107 if ( stations )
108 {
109 odebug << "DEMO: # of stations around = " << stations->count() << "" << oendl;
110 OStation* station;
111 for ( station = stations->first(); station != 0; station = stations->next() )
112 {
113 odebug << "DEMO: station dump following..." << oendl;
114 station->dump();
115 }
116 }
117
118 else
119 {
120 odebug << "DEMO: Warning! Scan didn't work!" << oendl;
121 }
122
123 /*
124
125 // first some wrong calls to check if this is working
126 iface->setPrivate( "seppel", 10 );
127 iface->setPrivate( "monitor", 0 );
128
129 // now the real deal
130 iface->setPrivate( "monitor", 2, 2, 3 );
131
132 // trying to set hw address to 12:34:56:AB:CD:EF
133
134 /*
135
136 OMacAddress addr = OMacAddress::fromString( "12:34:56:AB:CD:EF" );
137 iface->setUp( false );
138 iface->setMacAddress( addr );
139 iface->setUp( true );
140 odebug << "DEMO: MAC Address now is '" << iface->macAddress().toString() << "'" << oendl;
141
142 */
143
144 // monitor test
145
146
147
148 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl;
149 iface->setMode( "monitor" );
150 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl;
151
152 sleep( 1 );
153
154 iface->setChannel( 1 );
155 iface->setMode( "managed" );
156
157 //sleep( 1 );
158 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl;
159
160 /*iface->setMode( "adhoc" );
161 sleep( 1 );
162 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl;
163 iface->setMode( "managed" );
164 sleep( 1 );
165 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl;
166 iface->setMode( "master" );
167 sleep( 1 );
168 odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; */
169
170 }
171 ++it;
172 }
173
174 return 0;
175
176}
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro
deleted file mode 100644
index cf293b5..0000000
--- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = onetworkdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 -lopienet2
8TARGET = onetworkdemo
9MOC_DIR = moc
10OBJECTS_DIR = obj
11
12include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opienet/opienet.pro b/libopie2/examples/opienet/opienet.pro
deleted file mode 100644
index c7800a9..0000000
--- a/libopie2/examples/opienet/opienet.pro
+++ b/dev/null
@@ -1,3 +0,0 @@
1TEMPLATE = subdirs
2SUBDIRS = miniwellenreiter onetworkdemo
3
diff --git a/libopie2/examples/opieui/.cvsignore b/libopie2/examples/opieui/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opieui/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro b/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro
deleted file mode 100644
index 5f379ef..0000000
--- a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1CONFIG += qt
2
3TEMPLATE = app
4SOURCES = testwidget.cpp
5HEADERS = testwidget.h
6
7INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/noncore/graphics/opie-eye/lib/
8DESTPATH += $(OPIEDIR)/include
9
10LIBS += -lopieui2 -lopiecore2
11
12include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp
deleted file mode 100644
index 6d2c773..0000000
--- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp
+++ b/dev/null
@@ -1,128 +0,0 @@
1#include "testwidget.h"
2
3#include <opie2/okeyconfigwidget.h>
4
5#include <opie2/oapplicationfactory.h>
6#include <opie2/otabwidget.h>
7
8#include <qpe/qpeapplication.h>
9
10#include <qevent.h>
11#include <qlayout.h>
12#include <qpushbutton.h>
13#include <qmainwindow.h>
14#include <qdialog.h>
15
16
17/**
18 * QObject with signals and slots inside a .cpp
19 * requires the .moc at the bottom! and a run of qmake
20 */
21class MainWindow : public QMainWindow {
22 Q_OBJECT
23public:
24 static QString appName() {
25 return QString::fromLatin1("keyconfig");
26 }
27 MainWindow( QWidget*, const char*, WFlags fl );
28 ~MainWindow() {}
29private slots:
30 void slotClicked();
31private:
32 Opie::Core::OKeyConfigManager *m_manager;
33};
34
35
36OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MainWindow> )
37
38
39MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl )
40 : QMainWindow( parent, name, fl )
41{
42 QVBoxLayout *lay = new QVBoxLayout( this );
43 QPushButton *btn = new QPushButton( tr("Configure" ), this );
44 TestMainWindow *wid = new TestMainWindow( this, "name", 0 );
45
46 lay->addWidget( btn );
47 lay->addWidget( wid );
48 m_manager = wid->manager();
49
50 connect( btn, SIGNAL(clicked()), this, SLOT(slotClicked()) );
51}
52
53void MainWindow::slotClicked() {
54 QDialog diag( this, "name", true );
55 diag.setCaption( tr( "Manage Keys" ) );
56
57 QHBoxLayout *lay = new QHBoxLayout( &diag );
58 Opie::Ui::OKeyConfigWidget *wid = new Opie::Ui::OKeyConfigWidget( &diag, "key config" );
59 wid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue );
60 wid->insert( tr("MainWindow Options" ), m_manager );
61 wid->load();
62
63 lay->addWidget( wid );
64
65 if ( QPEApplication::execDialog( &diag ) == QDialog::Accepted ) {
66 wid->save();
67 }
68}
69
70TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl )
71 : Opie::Ui::OListView( parent, slot, fl)
72{
73 addColumn( tr( "A Doo" ) );
74 addColumn( tr( "B Doo" ) );
75
76 m_config = new Opie::Core::OConfig( "test_config_foo" );
77
78 /* generate the black list */
79 Opie::Core::OKeyPair::List blackList;
80 blackList.append( Opie::Core::OKeyPair::leftArrowKey() );
81 blackList.append( Opie::Core::OKeyPair::rightArrowKey() );
82 blackList.append( Opie::Core::OKeyPair::downArrowKey() );
83 blackList.append( Opie::Core::OKeyPair::upArrowKey() );
84
85 m_manager = new Opie::Core::OKeyConfigManager( m_config, "Key Group",
86 blackList, false, this, "Key Manager" );
87
88 m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(),
89 10, Opie::Core::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this,
90 SLOT(slotDelete(QWidget*,QKeyEvent*)) ) );
91 m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(),
92 11, Opie::Core::OKeyPair( Qt::Key_S, Qt::AltButton ) ) );
93
94 connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Core::OKeyConfigItem&)),
95 this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem&)) );
96// when commenting the line below out the keyPressEvent will work
97 m_manager->handleWidget( this );
98 m_manager->load();
99}
100
101TestMainWindow::~TestMainWindow() {
102 m_manager->save();
103 delete m_config;
104}
105
106Opie::Core::OKeyConfigManager* TestMainWindow::manager() {
107 return m_manager;
108}
109
110/*
111 * This only works if we do not handle the even with m_manager->handleWidget( this )
112 * So this is only for demo purposes
113 */
114void TestMainWindow::keyPressEvent( QKeyEvent* ev ) {
115 owarn << "String is "+ m_manager->handleKeyEvent( ev ).text() << oendl;
116 owarn << "Id was " << m_manager->handleKeyEventId( ev ) << " " << ev->key() << " " << ev->state() << " " << ev->ascii() << "" << oendl;
117 ev->ignore();
118}
119
120void TestMainWindow::slotDelete( QWidget* wid, QKeyEvent* ev ) {
121 owarn << "Slot Delete " << wid << " " << ev->key() << " " << ev->state() << "" << oendl;
122}
123
124void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Core::OKeyConfigItem& item) {
125 owarn << "Slot Action " << wid << " " << ev->key() << " " << ev->state() << " " << item.text() << " " << item.id() << "" << oendl;
126}
127
128#include "testwidget.moc"
diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h b/libopie2/examples/opieui/okeyconfigwidget/testwidget.h
deleted file mode 100644
index 6ecb346..0000000
--- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h
+++ b/dev/null
@@ -1,40 +0,0 @@
1#ifndef TEST_WIDGET_H
2#define TEST_WIDGET_H
3
4#include <qmainwindow.h>
5
6#include <opie2/olistview.h>
7
8namespace Opie{
9namespace Ui{
10 class OTabWidget;
11 class OListView;
12}
13namespace Core {
14 class OConfig;
15 class OKeyConfigManager;
16 class OKeyConfigItem;
17}
18}
19class QKeyEvent;
20
21
22class TestMainWindow : public Opie::Ui::OListView {
23 Q_OBJECT
24public:
25
26 TestMainWindow(QWidget* parent, const char*, WFlags fl );
27 ~TestMainWindow();
28
29 Opie::Core::OKeyConfigManager *manager();
30protected:
31 void keyPressEvent( QKeyEvent* );
32private slots:
33 void slotDelete( QWidget*, QKeyEvent* );
34 void slotAction( QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem& );
35private:
36 Opie::Core::OConfig *m_config;
37 Opie::Core::OKeyConfigManager *m_manager;
38};
39
40#endif
diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp
deleted file mode 100644
index cd49c28..0000000
--- a/libopie2/examples/opieui/olistviewdemo/main.cpp
+++ b/dev/null
@@ -1,29 +0,0 @@
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
19using namespace Opie::Ui;
20using namespace Opie::Core;
21
22int main( int argc, char **argv )
23{
24 OApplication a( argc, argv, "OListViewDemo" );
25 OListViewDemo e;
26 a.showMainWidget(&e);
27 return a.exec();
28}
29
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
deleted file mode 100644
index 4c05620..0000000
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp
+++ b/dev/null
@@ -1,86 +0,0 @@
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
35/* OPIE */
36#include <opie2/olistview.h>
37#include <opie2/odebug.h>
38
39/* QT */
40#include <qstring.h>
41#include <qpixmap.h>
42#include <qlistview.h>
43
44using namespace Opie::Ui;
45
46OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f )
47 :QVBox( parent, name, f )
48{
49 lv = new ONamedListView( this );
50 lv->setRootIsDecorated( true );
51 lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) );
52
53 ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
54 item->setText( "Column2", "ModifiedText" );
55 item->setText( "Column5", "ThisColumnDoesNotExits" );
56
57 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
58 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
59 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) );
60 item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) );
61 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
62 new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) );
63
64 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
65 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
66 new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) );
67 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) );
68 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) );
69 item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) );
70
71 if ( lv->find( 3, "Mickey", 3 ) )
72 odebug << "found Mickey :-)" << oendl;
73 else
74 odebug << "did not found Mickey :-(" << oendl;
75
76 if ( lv->find( 3, "Minni", 0 ) )
77 odebug << "found Minni :-)" << oendl;
78 else
79 odebug << "did not found Minni :-(" << oendl;
80
81}
82
83OListViewDemo::~OListViewDemo()
84{
85}
86
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
deleted file mode 100644
index 0b5c498..0000000
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h
+++ b/dev/null
@@ -1,51 +0,0 @@
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 Opie::Ui::ONamedListView* lv;
48
49};
50
51#endif
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro
deleted file mode 100644
index 52c3ceb..0000000
--- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro
+++ b/dev/null
@@ -1,23 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS = olistviewdemo.h
4SOURCES = olistviewdemo.cpp \
5 main.cpp
6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lopieui2 -lopiecore2 -lqpe
9TARGET = olistviewdemo
10MOC_DIR = moc
11OBJECTS_DIR = obj
12
13
14
15
16!contains( platform, x11 ) {
17 include( $(OPIEDIR)/include.pro )
18}
19
20contains( platform, x11 ) {
21 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
22}
23
diff --git a/libopie2/examples/opieui/opieui.pro b/libopie2/examples/opieui/opieui.pro
deleted file mode 100644
index 853ac50..0000000
--- a/libopie2/examples/opieui/opieui.pro
+++ b/dev/null
@@ -1,5 +0,0 @@
1TEMPLATE = subdirs
2SUBDIRS = olistviewdemo owidgetstack_example osplitter_example
3
4
5
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp
deleted file mode 100644
index 07c7e51..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp
+++ b/dev/null
@@ -1,34 +0,0 @@
1#include "osplitter_example.h"
2
3/* OPIE */
4
5#include <opie2/osplitter.h>
6#include <opie2/ofileselector.h>
7#include <qpe/qpeapplication.h>
8#include <opie2/oapplicationfactory.h>
9
10/* QT*/
11#include <qdir.h>
12#include <qlayout.h>
13
14using namespace Opie::Ui;
15using namespace Opie::Core;
16
17OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> )
18
19OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f )
20 : QWidget( w, n, f ){
21 QVBoxLayout * lay = new QVBoxLayout(this);
22 OSplitter * splitter = new OSplitter( Horizontal, this );
23 lay->addWidget( splitter );
24
25 OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector,
26 OFileSelector::Normal, QDir::homeDirPath(),
27 QString::null );
28 splitter->addWidget( selector, "zoom", tr("Selector 1") );
29
30 selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal,
31 QDir::homeDirPath(), QString::null );
32 splitter->addWidget( selector, "zoom", tr("Selector 2") );
33
34}
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.h b/libopie2/examples/opieui/osplitter_example/osplitter_example.h
deleted file mode 100644
index 0cf28aa..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_example.h
+++ b/dev/null
@@ -1,19 +0,0 @@
1/*
2 * May be used, copied and modified wihtout any limitation
3 */
4
5#ifndef OSPlitter_EXAMPLE_H
6#define OSPlitter_EXAMPLE_H
7
8#include <qvbox.h>
9
10class OSplitterExample : public QWidget {
11 Q_OBJECT
12public:
13 static QString appName() { return QString::fromLatin1("osplitter_example"); }
14 OSplitterExample( QWidget *parent, const char* name, WFlags fl );
15
16};
17
18
19#endif
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.pro b/libopie2/examples/opieui/osplitter_example/osplitter_example.pro
deleted file mode 100644
index 9f156a1..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_example.pro
+++ b/dev/null
@@ -1,13 +0,0 @@
1CONFIG = qt warn_on
2TEMPLATE = app
3TARGET = osplitter_example
4
5HEADERS = osplitter_example.h
6SOURCES = osplitter_example.cpp
7
8INCLUDEPATH += $(OPIEDIR)/include
9DEPENDSPATH += $(OPIEDIR)/include
10
11LIBS += -lqpe -lopieui2
12
13include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
deleted file mode 100644
index d747bd9..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
+++ b/dev/null
@@ -1,81 +0,0 @@
1
2#include <qstring.h>
3#include <qlabel.h>
4#include <qheader.h>
5#include <qlayout.h>
6
7#include <qpe/qpeapplication.h>
8
9#include <opie2/oapplicationfactory.h>
10#include "osplitter_mail.h"
11
12using namespace Opie::Ui;
13
14OPIE_EXPORT_APP( OApplicationFactory<ListViews> )
15
16class Folder {
17 int dummy;
18};
19
20// -----------------------------------------------------------------
21
22ListViews::ListViews( QWidget* p, const char* name, WFlags fl )
23 : QWidget( p, name, fl ) {
24 qApp->installEventFilter( this );
25 m_lstFolders.setAutoDelete( true );
26 QHBoxLayout *lay = new QHBoxLayout(this);
27
28 m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" );
29 lay->addWidget( m_splitter );
30 connect(m_splitter, SIGNAL(sizeChanged(bool,Orientation) ),
31 this, SLOT(slotSizeChange(bool,Orientation) ) );
32
33 m_overview = new QListView( m_splitter );
34 m_overview->header()->setClickEnabled( FALSE );
35 m_overview->addColumn( tr("Folder") );
36// m_overview->setMaximumWidth( 200 );
37 m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") );
38 m_splitter->setSizeChange( 300 );
39
40 /* OSplitter starts with the small mode */
41 m_messages = 0;
42 m_message = m_attach = 0;
43
44 splitti = new OSplitter( Vertical, m_splitter, "Splitti2" );
45 splitti->setSizeChange( 300 );
46 splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) );
47
48 QLabel *lbl = new QLabel(splitti);
49 lbl->setTextFormat ( Qt::RichText );
50 lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>");
51
52 m_messages = new QListView( splitti );
53 m_messages->addColumn(" Messages ");
54
55 folder1 = new QListView( splitti );
56 folder1->addColumn( "Messages 2 " );
57
58 splitti->addWidget(m_messages, "mail", tr("Mails") );
59 splitti->addWidget(folder1, "folder", tr("Folder") );
60 splitti->addWidget( lbl, "logo", tr("Label") );
61 m_message = lbl;
62
63 m_splitter->addWidget( splitti );
64
65}
66
67
68ListViews::~ListViews() {
69
70}
71
72
73bool ListViews::eventFilter( QObject* obj, QEvent* ev ) {
74 if (!obj->isWidgetType() )
75 return false;
76 if ( ev->type() == QEvent::MouseButtonRelease ) {
77 owarn << " name " << obj->name() << ", class " << obj->className() << "" << oendl;
78 }
79
80 return false;
81}
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
deleted file mode 100644
index 67961fb..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
+++ b/dev/null
@@ -1,51 +0,0 @@
1/*
2 * You may use, modify and distribute this code without any limitation
3 */
4
5/*
6 * Header file for a more complete email client like
7 * layout
8 */
9
10#ifndef OPIE_SPLITTER_MAIL_EXAMPLE_H
11#define OPIE_SPLITTER_MAIL_EXAMPLE_H
12
13#include <qwidget.h>
14#include <qlist.h>
15#include <qlistview.h>
16
17#include <opie2/osplitter.h>
18
19
20class Folder;
21class QLabel;
22
23class ListViews : public QWidget {
24 Q_OBJECT
25public:
26 static QString appName() { return QString::fromLatin1("osplitter-mail"); }
27 ListViews( QWidget* parent, const char * name, WFlags fl );
28 ~ListViews();
29
30 bool eventFilter( QObject* , QEvent* );
31private:
32 void initFolders();
33 void initFolder( Folder *folder, unsigned int &count );
34
35 QListView *m_messages, *m_overview;
36 QLabel *m_message, *m_attach;
37 QList<QListView> m_folders; // used in tab mode
38 QList<Folder> m_lstFolders;
39 bool m_mode : 1; // bitfield
40 Opie::Ui::OSplitter *m_splitter;
41 Opie::Ui::OSplitter *splitti;
42 QListView *folder1;
43#if 0
44//private slots:
45// void slotFolderChanged( QListViewItem* );
46// void slotMessageChanged();
47// void slotSizeChange( bool, const QSize& );
48#endif
49};
50
51#endif
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro b/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro
deleted file mode 100644
index f9c43ef..0000000
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1CONFIG += qt warn_on
2TEMPLATE = app
3TARGET = osplitter-mail
4
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDSPATH += $(OPIEDIR)/include
7
8HEADERS = osplitter_mail.h
9SOURCES = osplitter_mail.cpp
10
11LIBS += -lqpe -lopieui2
12include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opieui/oversatileviewdemo/.cvsignore b/libopie2/examples/opieui/oversatileviewdemo/.cvsignore
deleted file mode 100644
index 8f7300c..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/.cvsignore
+++ b/dev/null
@@ -1,6 +0,0 @@
1Makefile*
2moc*
3*moc
4*.o
5~*
6
diff --git a/libopie2/examples/opieui/oversatileviewdemo/1.png b/libopie2/examples/opieui/oversatileviewdemo/1.png
deleted file mode 100644
index 0e2e41b..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/1.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/1small.png b/libopie2/examples/opieui/oversatileviewdemo/1small.png
deleted file mode 100644
index ce6b262..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/1small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/2.png b/libopie2/examples/opieui/oversatileviewdemo/2.png
deleted file mode 100644
index 8a0181d..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/2.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/2small.png b/libopie2/examples/opieui/oversatileviewdemo/2small.png
deleted file mode 100644
index 82a4431..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/2small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/3.png b/libopie2/examples/opieui/oversatileviewdemo/3.png
deleted file mode 100644
index 8a58d6c..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/3.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/3small.png b/libopie2/examples/opieui/oversatileviewdemo/3small.png
deleted file mode 100644
index 073ba55..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/3small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/4.png b/libopie2/examples/opieui/oversatileviewdemo/4.png
deleted file mode 100644
index 198891b..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/4.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/4small.png b/libopie2/examples/opieui/oversatileviewdemo/4small.png
deleted file mode 100644
index 7f1cc01..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/4small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/5.png b/libopie2/examples/opieui/oversatileviewdemo/5.png
deleted file mode 100644
index ee7344a..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/5.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/5small.png b/libopie2/examples/opieui/oversatileviewdemo/5small.png
deleted file mode 100644
index 105b038..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/5small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/6.png b/libopie2/examples/opieui/oversatileviewdemo/6.png
deleted file mode 100644
index 72c3692..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/6.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/6small.png b/libopie2/examples/opieui/oversatileviewdemo/6small.png
deleted file mode 100644
index 1db2a30..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/6small.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png
deleted file mode 100644
index 4157333..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png
deleted file mode 100644
index acc992c..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png
deleted file mode 100644
index 5e7e37e..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png
deleted file mode 100644
index acd3265..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf.png b/libopie2/examples/opieui/oversatileviewdemo/leaf.png
deleted file mode 100644
index c8435ec..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/leaf.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf32.png b/libopie2/examples/opieui/oversatileviewdemo/leaf32.png
deleted file mode 100644
index 5e90ead..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/leaf32.png
+++ b/dev/null
Binary files differ
diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp
deleted file mode 100644
index e48395a..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/main.cpp
+++ b/dev/null
@@ -1,32 +0,0 @@
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 "opieuidemo.h"
17
18#include <opie2/oapplication.h>
19
20using namespace Opie::Core;
21using namespace Opie::Ui;
22
23int main( int argc, char **argv )
24{
25 OApplication a( argc, argv, "Opie UI Demo" );
26 odebug << "." << oendl;
27 OpieUIDemo e;
28 odebug << "." << oendl;
29 a.showMainWidget(&e);
30 odebug << "." << oendl;
31 return a.exec();
32}
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
deleted file mode 100644
index a2cdd5a..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
+++ b/dev/null
@@ -1,203 +0,0 @@
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// Qt
17
18#include <qcolor.h>
19#include <qpopupmenu.h>
20#include <qmenubar.h>
21#include <qmessagebox.h>
22#include <qvbox.h>
23#include <qstring.h>
24#include <qstringlist.h>
25
26// Qtopia
27
28#include <qpe/qpeapplication.h>
29#include <qpe/global.h>
30
31// Opie
32
33#include <opie2/odevice.h>
34
35#include <opie2/ocompletionbox.h>
36#include <opie2/olineedit.h>
37#include <opie2/ocombobox.h>
38#include <opie2/oeditlistbox.h>
39#include <opie2/oselector.h>
40#include <opie2/opopupmenu.h>
41
42#include <qtabwidget.h>
43#include "oversatileviewdemo.h"
44
45// Local
46
47#include "opieuidemo.h"
48
49using namespace Opie::Core;
50using namespace Opie::Ui;
51
52enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector };
53
54OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl )
55 : QMainWindow( parent, name, fl )
56{
57
58 QMenuBar* mbar = this->menuBar();
59 OPopupMenu* demo = new OPopupMenu( this );
60 demo->setTitle( "Title" );
61 demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox );
62 demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit );
63 demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox );
64 demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox );
65 demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector );
66 mbar->insertItem( "Demonstrate", demo );
67
68 build();
69
70}
71
72OpieUIDemo::~OpieUIDemo()
73{
74}
75
76void OpieUIDemo::build()
77{
78 main = new QTabWidget( this, "tabwidget" );
79 setCentralWidget( main );
80 main->show();
81
82 main->addTab( new OVersatileViewDemo( main ), "VersatileView" );
83}
84
85
86void OpieUIDemo::demo( int d )
87{
88 switch (d)
89 {
90 case ocompletionbox: demoOCompletionBox(); break;
91 case olineedit: demoOLineEdit(); break;
92 case ocombobox: demoOComboBox(); break;
93 case oeditlistbox: demoOEditListBox(); break;
94 case oselector: demoOSelector(); break;
95
96 }
97
98}
99
100void OpieUIDemo::demoOCompletionBox()
101{
102 odebug << "ocompletionbox" << oendl;
103
104 OCompletionBox* box = new OCompletionBox( 0 );
105 box->insertItem( "This CompletionBox" );
106 box->insertItem( "Says 'Hello World'" );
107 box->insertItem( "Here are some" );
108 box->insertItem( "Additional Items" );
109 box->insertItem( "Complete Completion Box" );
110
111 connect( box, SIGNAL( activated(const QString&) ), this, SLOT( messageBox(const QString&) ) );
112 box->popup();
113
114}
115
116void OpieUIDemo::demoOLineEdit()
117{
118 odebug << "olineedit" << oendl;
119
120 OLineEdit *edit = new OLineEdit( 0, "lineedit" );
121
122 edit->setCompletionMode( OGlobalSettings::CompletionPopup );
123 OCompletion* comp = edit->completionObject();
124
125 QStringList list;
126 list << "mickeyl@handhelds.org";
127 list << "mickey@tm.informatik.uni-frankfurt.de";
128 list << "mickey@vanille.de";
129
130 comp->setItems( list );
131
132 edit->show();
133
134}
135
136void OpieUIDemo::demoOComboBox()
137{
138 odebug << "ocombobox" << oendl;
139
140 OComboBox *combo = new OComboBox( true, 0, "combobox" );
141
142 combo->setCompletionMode( OGlobalSettings::CompletionPopup );
143 OCompletion* comp = combo->completionObject();
144
145 QStringList ilist;
146 ilist << "kergoth@handhelds.org";
147 ilist << "harlekin@handhelds.org";
148 ilist << "groucho@handhelds.org";
149 combo->insertStringList( ilist );
150
151 QStringList clist;
152 clist << "mickeyl@handhelds.org";
153 clist << "mickey@tm.informatik.uni-frankfurt.de";
154 clist << "mickey@vanille.de";
155 comp->setItems( clist );
156
157 combo->show();
158
159}
160
161void OpieUIDemo::demoOEditListBox()
162{
163 odebug << "oeditlistbox" << oendl;
164
165 OEditListBox* edit = new OEditListBox( "OEditListBox", 0, "editlistbox" );
166
167 edit->lineEdit()->setCompletionMode( OGlobalSettings::CompletionPopup );
168 OCompletion* comp = edit->lineEdit()->completionObject();
169 QStringList clist;
170 clist << "Completion everywhere";
171 clist << "Cool Completion everywhere";
172 clist << "History History History";
173 comp->setItems( clist );
174
175 QStringList list;
176 list << "kergoth@handhelds.org";
177 list << "harlekin@handhelds.org";
178 list << "groucho@handhelds.org";
179 list << "mickeyl@handhelds.org";
180 edit->insertStringList( list );
181
182 edit->show();
183
184}
185
186void OpieUIDemo::demoOSelector()
187{
188 odebug << "oselector" << oendl;
189
190 OHSSelector* sel = new OHSSelector( 0, "gradientselector" );
191 //#sel->resize( QSize( 200, 30 ) );
192 //#sel->setColors( QColor( 90, 190, 60 ), QColor( 200, 55, 255 ) );
193 //#sel->setText( "Dark", "Light" );
194
195 sel->show();
196}
197
198void OpieUIDemo::messageBox( const QString& text )
199{
200 QString info;
201 info = "You have selected '" + text + "'";
202 QMessageBox::information( this, "OpieUIDemo", info );
203}
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h
deleted file mode 100644
index 382885f..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h
+++ b/dev/null
@@ -1,60 +0,0 @@
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#ifndef OPIEUIDEMO_H
17#define OPIEUIDEMO_H
18
19#include <qmainwindow.h>
20
21namespace Opie {
22namespace Ui {
23class OVersatileView;
24}
25}
26class QTabWidget;
27class QVBox;
28
29class OpieUIDemo : public QMainWindow {
30 Q_OBJECT
31
32public:
33
34 OpieUIDemo( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );
35 ~OpieUIDemo();
36
37 void demoOCompletionBox();
38 void demoOLineEdit();
39 void demoOComboBox();
40 void demoOEditListBox();
41 void demoOSelector();
42
43public slots:
44 void demo( int );
45 void messageBox( const QString& text );
46
47protected:
48 void build();
49 void buildVV( QVBox* b );
50
51private:
52 QTabWidget* main;
53
54 Opie::Ui::OVersatileView* vv;
55
56};
57
58
59
60#endif
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp
deleted file mode 100644
index e8bbdb1..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp
+++ b/dev/null
@@ -1,160 +0,0 @@
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 "oversatileviewdemo.h"
34#include <opie2/oversatileview.h>
35#include <opie2/oversatileviewitem.h>
36
37#include <qstring.h>
38#include <qpixmap.h>
39#include <qlistview.h>
40
41using namespace Opie::Ui;
42
43OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f )
44 :QVBox( parent, name, f )
45{
46 vv = new OVersatileView( this );
47
48 vv->addColumn( "First" );
49 vv->addColumn( "2nd" );
50 vv->addColumn( "IIIrd" );
51
52 QString counter;
53
54 QPixmap leaf( "leaf.png" );
55 QPixmap opened( "folder_opened.png" );
56 QPixmap closed( "folder_closed.png" );
57
58 QPixmap leaf32( "leaf32.png" );
59 QPixmap opened32( "folder_opened32.png" );
60 QPixmap closed32( "folder_closed32.png" );
61
62 vv->setDefaultPixmaps( OVersatileView::Tree, leaf, opened, closed );
63 vv->setDefaultPixmaps( OVersatileView::Icons, leaf32, opened32, closed32 );
64
65 OVersatileViewItem* item;
66 OVersatileViewItem* item2;
67
68 for ( int i = 0; i < 5; ++i )
69 {
70 counter.sprintf( "%d", i );
71 item = new OVersatileViewItem( vv, "Item", "Text", "Some more", counter );
72 item->setRenameEnabled( true );
73 item2 = new OVersatileViewItem( item, "OSubitem", "123", "...", counter );
74 item2->setRenameEnabled( true );
75
76 }
77
78 connect( vv, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) );
79 connect( vv, SIGNAL( selectionChanged(OVersatileViewItem*) ), this, SLOT( selectionChanged(OVersatileViewItem*) ) );
80 connect( vv, SIGNAL( currentChanged(OVersatileViewItem*) ), this, SLOT( currentChanged(OVersatileViewItem*) ) );
81 connect( vv, SIGNAL( clicked(OVersatileViewItem*) ), this, SLOT( clicked(OVersatileViewItem*) ) );
82 connect( vv, SIGNAL( pressed(OVersatileViewItem*) ), this, SLOT( pressed(OVersatileViewItem*) ) );
83
84 connect( vv, SIGNAL( doubleClicked(OVersatileViewItem*) ), this, SLOT( doubleClicked(OVersatileViewItem*) ) );
85 connect( vv, SIGNAL( returnPressed(OVersatileViewItem*) ), this, SLOT( returnPressed(OVersatileViewItem*) ) );
86
87 connect( vv, SIGNAL( onItem(OVersatileViewItem*) ), this, SLOT( onItem(OVersatileViewItem*) ) );
88 connect( vv, SIGNAL( onViewport() ), this, SLOT( onViewport() ) );
89
90 connect( vv, SIGNAL( expanded(OVersatileViewItem*) ), this, SLOT( expanded(OVersatileViewItem*) ) );
91 connect( vv, SIGNAL( collapsed(OVersatileViewItem*) ), this, SLOT( collapsed(OVersatileViewItem*) ) );
92
93 connect( vv, SIGNAL( moved() ), this, SLOT( moved() ) );
94
95 connect( vv, SIGNAL( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ) );
96
97}
98
99OVersatileViewDemo::~OVersatileViewDemo()
100{
101}
102
103void OVersatileViewDemo::selectionChanged()
104{
105 odebug << "received signal selectionChanged()" << oendl;
106}
107void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item )
108{
109 odebug << "received signal selectionChanged(OVersatileViewItem*)" << oendl;
110}
111void OVersatileViewDemo::currentChanged( OVersatileViewItem * item )
112{
113 odebug << "received signal currentChanged( OVersatileViewItem * )" << oendl;
114}
115void OVersatileViewDemo::clicked( OVersatileViewItem * item )
116{
117 odebug << "received signal clicked( OVersatileViewItem * )" << oendl;
118}
119void OVersatileViewDemo::pressed( OVersatileViewItem * item )
120{
121 odebug << "received signal pressed( OVersatileViewItem * )" << oendl;
122}
123
124void OVersatileViewDemo::doubleClicked( OVersatileViewItem *item )
125{
126 odebug << "received signal doubleClicked( OVersatileViewItem *item )" << oendl;
127}
128void OVersatileViewDemo::returnPressed( OVersatileViewItem *item )
129{
130 odebug << "received signal returnPressed( OVersatileViewItem *item )" << oendl;
131}
132
133void OVersatileViewDemo::onItem( OVersatileViewItem *item )
134{
135 odebug << "received signal onItem( OVersatileViewItem *item )" << oendl;
136}
137void OVersatileViewDemo::onViewport()
138{
139 odebug << "received signal onViewport()" << oendl;
140}
141
142void OVersatileViewDemo::expanded( OVersatileViewItem *item )
143{
144 odebug << "received signal expanded( OVersatileViewItem *item )" << oendl;
145}
146
147void OVersatileViewDemo::collapsed( OVersatileViewItem *item )
148{
149 odebug << "received signal collapsed( OVersatileViewItem *item )" << oendl;
150}
151
152void OVersatileViewDemo::moved()
153{
154 odebug << "received signal moved( OVersatileViewItem *item )" << oendl;
155}
156
157void OVersatileViewDemo::contextMenuRequested( OVersatileViewItem *item, const QPoint& pos, int col )
158{
159 odebug << "received signal contextMenuRequested( OVersatileViewItem *item )" << oendl;
160}
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h
deleted file mode 100644
index 35e2c3c..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h
+++ b/dev/null
@@ -1,77 +0,0 @@
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 OVERSATILEVIEWDEMO_H
33#define OVERSATILEVIEWDEMO_H
34
35#include <qvbox.h>
36
37namespace Opie {
38namespace Ui {
39class OVersatileView;
40class OVersatileViewItem;
41}
42}
43
44class OVersatileViewDemo: public QVBox
45{
46 Q_OBJECT
47
48 public:
49 OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 );
50 virtual ~OVersatileViewDemo();
51
52 public slots:
53 void selectionChanged();
54 void selectionChanged( Opie::Ui::OVersatileViewItem * );
55 void currentChanged( Opie::Ui::OVersatileViewItem * );
56 void clicked( Opie::Ui::OVersatileViewItem * );
57 void pressed( OPie::Ui::OVersatileViewItem * );
58
59 void doubleClicked( Opie::Ui::OVersatileViewItem *item );
60 void returnPressed( Opie::Ui::OVersatileViewItem *item );
61
62 void onItem( Opie::Ui::OVersatileViewItem *item );
63 void onViewport();
64
65 void expanded( Opie::Ui::OVersatileViewItem *item );
66 void collapsed( Opie::Ui::OVersatileViewItem *item );
67
68 void moved();
69
70 void contextMenuRequested( Opie::Ui::OVersatileViewItem *item, const QPoint&, int col );
71
72 private:
73 Opie::Ui::OVersatileView* vv;
74
75};
76
77#endif
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro
deleted file mode 100644
index ff78095..0000000
--- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro
+++ b/dev/null
@@ -1,17 +0,0 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS = opieuidemo.h \
4 oversatileviewdemo.h
5SOURCES = opieuidemo.cpp \
6 oversatileviewdemo.cpp \
7 main.cpp
8INCLUDEPATH += $(OPIEDIR)/include
9DEPENDPATH += $(OPIEDIR)/include
10LIBS += -lopieui2 -lopiecore2
11TARGET = opieuidemo
12MOC_DIR = moc
13OBJECTS_DIR = obj
14
15include( $(OPIEDIR)/include.pro )
16
17
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
deleted file mode 100644
index 272e42b..0000000
--- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
+++ b/dev/null
@@ -1,133 +0,0 @@
1/*
2 * You may use, modify and distribute this example without any limitation
3 */
4
5#include "owidgetstack_example.h"
6
7/* OPIE */
8#include <opie2/oapplicationfactory.h>
9#include <opie2/owidgetstack.h>
10#include <qpe/resource.h>
11
12/* QT */
13#include <qaction.h>
14#include <qtoolbar.h>
15#include <qpopupmenu.h>
16#include <qmenubar.h>
17#include <qlayout.h>
18#include <qlabel.h>
19#include <qpushbutton.h>
20#include <qsignalmapper.h>
21
22using namespace Opie::Core;
23using namespace Opie::Ui;
24
25OPIE_EXPORT_APP( OApplicationFactory<StackExample> )
26
27StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
28 : QMainWindow( parent, name, fl )
29{
30 m_stack = new OWidgetStack( this );
31 setCentralWidget( m_stack );
32
33 /* nice Signal Mapper ;) */
34 QSignalMapper *sm = new QSignalMapper(this);
35 connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) );
36
37 /* toolbar first but this should be known from the other examples */
38 setToolBarsMovable( false );
39
40 /* only a menubar here */
41 QToolBar* holder = new QToolBar( this );
42 holder->setHorizontalStretchable( true );
43
44 QMenuBar *bar = new QMenuBar( holder );
45 QPopupMenu *menu = new QPopupMenu( this );
46
47 QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"),
48 QString::null, 0, this, 0 );
49 sm->setMapping(a, 1 );
50 connect(a, SIGNAL(activated() ),
51 sm, SLOT(map() ) );
52 a->addTo( menu );
53
54 a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"),
55 QString::null, 0, this, 0 );
56 sm->setMapping(a, 2 );
57 connect(a, SIGNAL(activated() ),
58 sm, SLOT(map() ) );
59 a->addTo( menu );
60
61 a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"),
62 QString::null, 0, this, 0 );
63 sm->setMapping(a, 3 );
64 connect(a, SIGNAL(activated() ),
65 sm, SLOT(map() ) );
66 a->addTo( menu );
67
68 a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"),
69 QString::null, 0, this, 0 );
70 sm->setMapping(a, 4 );
71 connect(a, SIGNAL(activated() ),
72 sm, SLOT(map() ) );
73
74 bar->insertItem( tr("Actions"), menu );
75
76 /* now the gui */
77
78 /* first widget, main widget */
79 QWidget * wid = new QWidget( m_stack );
80 QGridLayout *grid = new QGridLayout(wid, 2, 2 );
81
82 QPushButton *btn = new QPushButton( tr("Show Details Small"), wid, "details1" );
83 sm->setMapping(btn, 2 );
84 connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
85 grid->addWidget( btn, 0, 0 );
86
87 btn = new QPushButton( tr("Show Details Medium"), wid, "details2");
88 sm->setMapping(btn, 3 );
89 connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
90 grid->addWidget( btn, 0, 1 );
91
92 btn = new QPushButton( tr("Show Details All"), wid, "details3");
93 sm->setMapping(btn, 4 );
94 connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) );
95 grid->addWidget( btn, 1, 1 );
96
97 m_stack->addWidget( wid, 1 );
98 m_main = wid;
99
100 QLabel *lbl = new QLabel(m_stack );
101 lbl->setText(tr("Only small Details are shown here. Määh") );
102 m_stack->addWidget( lbl, 2 );
103
104 lbl = new QLabel( m_stack );
105 lbl->setText( tr("Some more details....Wo ist das Schaf?") );
106 m_stack->addWidget( lbl, 3 );
107
108 lbl = new QLabel( m_stack );
109 lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Süd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") );
110 m_stack->addWidget( lbl, 4 );
111
112
113 /* THE signal mapper does all the magic */
114 m_stack->raiseWidget( m_main );
115}
116
117
118StackExample::~StackExample() {
119
120}
121
122
123
124void StackExample::closeEvent( QCloseEvent* ev) {
125 /* if the close even came when we displayed a details */
126 if (m_stack->visibleWidget() != m_main ) {
127 m_stack->raiseWidget( m_main );
128 ev->ignore();
129 return;
130 }
131
132 ev->accept();
133}
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h
deleted file mode 100644
index c9b70cb..0000000
--- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h
+++ b/dev/null
@@ -1,27 +0,0 @@
1/*
2 * You may use, modify and distribute this example without any limitation
3 */
4
5#ifndef O_STACK_EXAMPLE_SIMPLE_H
6#define O_STACK_EXAMPLE_SIMPLE_H
7
8#include <qmainwindow.h>
9#include <opie2/owidgetstack.h>
10
11
12class StackExample : public QMainWindow {
13 Q_OBJECT
14public:
15 StackExample( QWidget* paren, const char* name, WFlags fl );
16 ~StackExample();
17 static QString appName() { return QString::fromLatin1("owidgetstack-example"); }
18
19protected:
20 void closeEvent( QCloseEvent* e );
21private:
22 Opie::Ui::OWidgetStack* m_stack;
23 QWidget* m_main;
24
25};
26
27#endif
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro
deleted file mode 100644
index 4cfce9c..0000000
--- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro
+++ b/dev/null
@@ -1,13 +0,0 @@
1CONFIG += qt warn_on
2TEMPLATE = app
3TARGET = owidgetstack-example
4
5SOURCES = owidgetstack_example.cpp
6HEADERS = owidgetstack_example.h
7
8INCLUDEPATH += $(OPIEDIR)/include
9DEPENDSPATH += $(OPIEDIR)/include
10
11LIBS += -lqpe -lopieui2
12
13include( $(OPIEDIR)/include.pro )
diff --git a/libopie2/libopie2.pro b/libopie2/libopie2.pro
index 509a3ce..fcb4160 100644
--- a/libopie2/libopie2.pro
+++ b/libopie2/libopie2.pro
@@ -1,8 +1,8 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm opiesecurity examples 2unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm opiesecurity
3 3
4!contains( platform, x11 ) { 4!contains( platform, x11 ) {
5 message( Configuring libopie2 for build on Opie ) 5 message( Configuring libopie2 for build on Opie )
6 include( $(OPIEDIR)/include.pro ) 6 include( $(OPIEDIR)/include.pro )
7} 7}
8 8