25 files changed, 75 insertions, 42 deletions
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp index a3f8e10..6712870 100644 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp +++ b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp | |||
@@ -1,12 +1,14 @@ | |||
1 | #include <opie2/oapplication.h> | 1 | #include <opie2/oapplication.h> |
2 | #include <opie2/oconfig.h> | 2 | #include <opie2/oconfig.h> |
3 | #include <qpe/config.h> | 3 | #include <qpe/config.h> |
4 | 4 | ||
5 | using namespace Opie::Core; | ||
6 | |||
5 | int main( int argc, char** argv ) | 7 | int main( int argc, char** argv ) |
6 | { | 8 | { |
7 | OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); | 9 | OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); |
8 | 10 | ||
9 | OConfigGroupSaver c1( app->config(), "MyGroup" ); | 11 | OConfigGroupSaver c1( app->config(), "MyGroup" ); |
10 | app->config()->writeEntry( "AnEntry", "InMyGroup" ); | 12 | app->config()->writeEntry( "AnEntry", "InMyGroup" ); |
11 | { | 13 | { |
12 | OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); | 14 | OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); |
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp index e8bf04f..0b8e1fe 100644 --- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp +++ b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp | |||
@@ -12,16 +12,18 @@ | |||
12 | 12 | ||
13 | #include <qpe/config.h> | 13 | #include <qpe/config.h> |
14 | 14 | ||
15 | #include <opie2/odebug.h> | 15 | #include <opie2/odebug.h> |
16 | #include <opie2/oapplication.h> | 16 | #include <opie2/oapplication.h> |
17 | #include <opie2/oglobal.h> | 17 | #include <opie2/oglobal.h> |
18 | #include <opie2/oglobalsettings.h> | 18 | #include <opie2/oglobalsettings.h> |
19 | 19 | ||
20 | using namespace Opie::Core; | ||
21 | |||
20 | class DemoApp : public OApplication | 22 | class DemoApp : public OApplication |
21 | { | 23 | { |
22 | Q_OBJECT | 24 | Q_OBJECT |
23 | public: | 25 | public: |
24 | DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 debug demo" ) | 26 | DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 debug demo" ) |
25 | { | 27 | { |
26 | // you have access to your OApplication object via oApp | 28 | // you have access to your OApplication object via oApp |
27 | qDebug( "Process-wide OApplication object @ %0x", oApp ); | 29 | qDebug( "Process-wide OApplication object @ %0x", oApp ); |
diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp index 2f5220b..56f1a0b 100644 --- a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp +++ b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp | |||
@@ -1,10 +1,12 @@ | |||
1 | #include <opie2/oglobalsettings.h> | 1 | #include <opie2/oglobalsettings.h> |
2 | #include <iostream.h> | 2 | #include <iostream> |
3 | |||
4 | using namespace Opie::Core; | ||
3 | 5 | ||
4 | int main( int argc, char** argv ) | 6 | int main( int argc, char** argv ) |
5 | { | 7 | { |
6 | printf( "current debugmode seems to be '%d'\n", OGlobalSettings::debugMode() ); | 8 | printf( "current debugmode seems to be '%d'\n", OGlobalSettings::debugMode() ); |
7 | printf( "output information for this mode is '%s'\n", (const char*) OGlobalSettings::debugOutput() ); | 9 | printf( "output information for this mode is '%s'\n", (const char*) OGlobalSettings::debugOutput() ); |
8 | 10 | ||
9 | return 0; | 11 | return 0; |
10 | 12 | ||
diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp index 0abf53e..2193565 100644 --- a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp +++ b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp | |||
@@ -1,10 +1,12 @@ | |||
1 | #include <opie2/oprocess.h> | 1 | #include <opie2/oprocess.h> |
2 | #include <iostream.h> | 2 | #include <iostream> |
3 | |||
4 | using namespace Opie::Core; | ||
3 | 5 | ||
4 | int main( int argc, char** argv ) | 6 | int main( int argc, char** argv ) |
5 | { | 7 | { |
6 | printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) ); | 8 | printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) ); |
7 | printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) ); | 9 | printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) ); |
8 | 10 | ||
9 | return 0; | 11 | return 0; |
10 | } | 12 | } |
diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp index 8790cdd..e1a4d5d 100644 --- a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp +++ b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp | |||
@@ -1,15 +1,17 @@ | |||
1 | #include <qdir.h> | 1 | #include <qdir.h> |
2 | 2 | ||
3 | #include <qpe/qpeapplication.h> | 3 | #include <qpe/qpeapplication.h> |
4 | #include "../osqlmanager.h" | 4 | #include <opie2/osqlmanager.h> |
5 | #include "../osqlquery.h" | 5 | #include <opie2/osqlquery.h> |
6 | #include "../osqldriver.h" | 6 | #include <opie2/osqldriver.h> |
7 | #include "../osqlresult.h" | 7 | #include <opie2/osqlresult.h> |
8 | |||
9 | using namespace Opie::DB; | ||
8 | 10 | ||
9 | int main( int argc, char* argv[] ) { | 11 | int main( int argc, char* argv[] ) { |
10 | 12 | ||
11 | QPEApplication app( argc, argv ); | 13 | QPEApplication app( argc, argv ); |
12 | OSQLManager man; | 14 | OSQLManager man; |
13 | man.registerPath( QDir::currentDirPath() ); | 15 | man.registerPath( QDir::currentDirPath() ); |
14 | OSQLBackEnd::ValueList list = man.queryBackEnd(); | 16 | OSQLBackEnd::ValueList list = man.queryBackEnd(); |
15 | 17 | ||
diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.pro b/libopie2/examples/opiedb/sqltest/spaltenweise.pro index f54fada..3cab802 100644 --- a/libopie2/examples/opiedb/sqltest/spaltenweise.pro +++ b/libopie2/examples/opiedb/sqltest/spaltenweise.pro | |||
@@ -1,13 +1,13 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | HEADERS = | 3 | HEADERS = |
4 | SOURCES = spaltenweise.cpp | 4 | SOURCES = spaltenweise.cpp |
5 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
6 | DEPENDPATH+= $(OPIEDIR)/include | 6 | DEPENDPATH+= $(OPIEDIR)/include |
7 | LIBS += -lqpe -lopiesql | 7 | LIBS += -lqpe -lopiedb2 |
8 | TARGET = spaltenweise | 8 | TARGET = spaltenweise |
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | include ( $(OPIEDIR)/include.pro ) | 13 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp index e538c9f..2d11ac5 100644 --- a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp +++ b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp | |||
@@ -1,15 +1,17 @@ | |||
1 | #include <qdir.h> | 1 | #include <qdir.h> |
2 | 2 | ||
3 | #include <qpe/qpeapplication.h> | 3 | #include <qpe/qpeapplication.h> |
4 | #include "../osqlmanager.h" | 4 | #include <opie2/osqlmanager.h> |
5 | #include "../osqlquery.h" | 5 | #include <opie2/osqlquery.h> |
6 | #include "../osqldriver.h" | 6 | #include <opie2/osqldriver.h> |
7 | #include "../osqlresult.h" | 7 | #include <opie2/osqlresult.h> |
8 | |||
9 | using namespace Opie::DB; | ||
8 | 10 | ||
9 | int main( int argc, char* argv[] ) { | 11 | int main( int argc, char* argv[] ) { |
10 | 12 | ||
11 | QPEApplication app( argc, argv ); | 13 | QPEApplication app( argc, argv ); |
12 | OSQLManager man; | 14 | OSQLManager man; |
13 | man.registerPath( QDir::currentDirPath() ); | 15 | man.registerPath( QDir::currentDirPath() ); |
14 | OSQLBackEnd::ValueList list = man.queryBackEnd(); | 16 | OSQLBackEnd::ValueList list = man.queryBackEnd(); |
15 | 17 | ||
diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.pro b/libopie2/examples/opiedb/sqltest/zeilenweise.pro index e5cfcc7..6952921 100644 --- a/libopie2/examples/opiedb/sqltest/zeilenweise.pro +++ b/libopie2/examples/opiedb/sqltest/zeilenweise.pro | |||
@@ -1,13 +1,13 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | HEADERS = | 3 | HEADERS = |
4 | SOURCES = zeilenweise.cpp | 4 | SOURCES = zeilenweise.cpp |
5 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
6 | DEPENDPATH+= $(OPIEDIR)/include | 6 | DEPENDPATH+= $(OPIEDIR)/include |
7 | LIBS += -lqpe -lopiesql | 7 | LIBS += -lqpe -lopiedb2 |
8 | TARGET = zeilenweise | 8 | TARGET = zeilenweise |
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | include ( $(OPIEDIR)/include.pro ) | 13 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp index 79bf327..8d421fd 100644 --- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp +++ b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp | |||
@@ -1,10 +1,12 @@ | |||
1 | #include <opie2/osoundsystem.h> | 1 | #include <opie2/osoundsystem.h> |
2 | 2 | ||
3 | using namespace Opie::MM; | ||
4 | |||
3 | int main( int argc, char** argv ) | 5 | int main( int argc, char** argv ) |
4 | { | 6 | { |
5 | qDebug( "OPIE Sound System Demo" ); | 7 | qDebug( "OPIE Sound System Demo" ); |
6 | 8 | ||
7 | OSoundSystem* sound = OSoundSystem::instance(); | 9 | OSoundSystem* sound = OSoundSystem::instance(); |
8 | 10 | ||
9 | OSoundSystem::CardIterator it = sound->iterator(); | 11 | OSoundSystem::CardIterator it = sound->iterator(); |
10 | /* | 12 | /* |
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp index eb2e8e8..f1966c1 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | |||
@@ -4,16 +4,18 @@ | |||
4 | #include <opie2/onetwork.h> | 4 | #include <opie2/onetwork.h> |
5 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | #include <opie2/opcap.h> | 6 | #include <opie2/opcap.h> |
7 | #include <cerrno> | 7 | #include <cerrno> |
8 | #include <cstdio> | 8 | #include <cstdio> |
9 | #include <cstdlib> | 9 | #include <cstdlib> |
10 | #include <cstring> | 10 | #include <cstring> |
11 | 11 | ||
12 | |||
13 | using namespace Opie::Net; | ||
12 | //======================== Station help class =============================== | 14 | //======================== Station help class =============================== |
13 | 15 | ||
14 | class Station | 16 | class Station |
15 | { | 17 | { |
16 | public: | 18 | public: |
17 | Station( QString t, int c, bool w ) : type(t), channel(c), wep(w), beacons(1) {}; | 19 | Station( QString t, int c, bool w ) : type(t), channel(c), wep(w), beacons(1) {}; |
18 | ~Station() {}; | 20 | ~Station() {}; |
19 | 21 | ||
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index 4763316..4f8af60 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | |||
@@ -1,14 +1,16 @@ | |||
1 | #include <opie2/onetwork.h> | 1 | #include <opie2/onetwork.h> |
2 | #include <opie2/ostation.h> | 2 | #include <opie2/ostation.h> |
3 | #include <opie2/omanufacturerdb.h> | 3 | #include <opie2/omanufacturerdb.h> |
4 | 4 | ||
5 | #include <unistd.h> | 5 | #include <unistd.h> |
6 | 6 | ||
7 | using namespace Opie::Net; | ||
8 | |||
7 | int main( int argc, char** argv ) | 9 | int main( int argc, char** argv ) |
8 | { | 10 | { |
9 | qDebug( "OPIE Network Demo" ); | 11 | qDebug( "OPIE Network Demo" ); |
10 | 12 | ||
11 | ONetwork* net = ONetwork::instance(); | 13 | ONetwork* net = ONetwork::instance(); |
12 | 14 | ||
13 | ONetwork::InterfaceIterator it = net->iterator(); | 15 | ONetwork::InterfaceIterator it = net->iterator(); |
14 | 16 | ||
diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp index a93f361..cd49c28 100644 --- a/libopie2/examples/opieui/olistviewdemo/main.cpp +++ b/libopie2/examples/opieui/olistviewdemo/main.cpp | |||
@@ -11,16 +11,19 @@ | |||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "olistviewdemo.h" | 16 | #include "olistviewdemo.h" |
17 | #include <opie2/oapplication.h> | 17 | #include <opie2/oapplication.h> |
18 | 18 | ||
19 | using namespace Opie::Ui; | ||
20 | using namespace Opie::Core; | ||
21 | |||
19 | int main( int argc, char **argv ) | 22 | int main( int argc, char **argv ) |
20 | { | 23 | { |
21 | OApplication a( argc, argv, "OListViewDemo" ); | 24 | OApplication a( argc, argv, "OListViewDemo" ); |
22 | OListViewDemo e; | 25 | OListViewDemo e; |
23 | a.showMainWidget(&e); | 26 | a.showMainWidget(&e); |
24 | return a.exec(); | 27 | return a.exec(); |
25 | } | 28 | } |
26 | 29 | ||
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp index 5ba7b69..7834b3b 100644 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp | |||
@@ -32,16 +32,18 @@ | |||
32 | 32 | ||
33 | #include "olistviewdemo.h" | 33 | #include "olistviewdemo.h" |
34 | #include <opie2/olistview.h> | 34 | #include <opie2/olistview.h> |
35 | 35 | ||
36 | #include <qstring.h> | 36 | #include <qstring.h> |
37 | #include <qpixmap.h> | 37 | #include <qpixmap.h> |
38 | #include <qlistview.h> | 38 | #include <qlistview.h> |
39 | 39 | ||
40 | using namespace Opie::Ui; | ||
41 | |||
40 | OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) | 42 | OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) |
41 | :QVBox( parent, name, f ) | 43 | :QVBox( parent, name, f ) |
42 | { | 44 | { |
43 | lv = new ONamedListView( this ); | 45 | lv = new ONamedListView( this ); |
44 | lv->setRootIsDecorated( true ); | 46 | lv->setRootIsDecorated( true ); |
45 | lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); | 47 | lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); |
46 | 48 | ||
47 | ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); | 49 | ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); |
diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h index 8a5986a..0b5c498 100644 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h | |||
@@ -39,13 +39,13 @@ class OListViewDemo: public QVBox | |||
39 | { | 39 | { |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 43 | OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
44 | virtual ~OListViewDemo(); | 44 | virtual ~OListViewDemo(); |
45 | 45 | ||
46 | private: | 46 | private: |
47 | ONamedListView* lv; | 47 | Opie::Ui::ONamedListView* lv; |
48 | 48 | ||
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp index 7ba0f0d..4a1468d 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp +++ b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp | |||
@@ -1,21 +1,22 @@ | |||
1 | #include "osplitter_example.h" | 1 | #include "osplitter_example.h" |
2 | 2 | ||
3 | /* OPIE */ | 3 | /* OPIE */ |
4 | 4 | ||
5 | #include <opie2/osplitter.h> | 5 | #include <opie2/osplitter.h> |
6 | #include <opie2/ofileselector.h> | ||
6 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
7 | #include <opie2/oapplicationfactory.h> | 8 | #include <opie2/oapplicationfactory.h> |
8 | 9 | ||
9 | /* QT*/ | 10 | /* QT*/ |
10 | #include <qdir.h> | 11 | #include <qdir.h> |
11 | #include <qlayout.h> | 12 | #include <qlayout.h> |
12 | 13 | ||
13 | using namespace Opie; | 14 | using namespace Opie::Ui; |
14 | 15 | ||
15 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) | 16 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) |
16 | 17 | ||
17 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) | 18 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) |
18 | : QWidget( w, n, f ){ | 19 | : QWidget( w, n, f ){ |
19 | QVBoxLayout * lay = new QVBoxLayout(this); | 20 | QVBoxLayout * lay = new QVBoxLayout(this); |
20 | OSplitter * splitter = new OSplitter( Horizontal, this ); | 21 | OSplitter * splitter = new OSplitter( Horizontal, this ); |
21 | lay->addWidget( splitter ); | 22 | lay->addWidget( splitter ); |
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.h b/libopie2/examples/opieui/osplitter_example/osplitter_example.h index 176ad62..0cf28aa 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.h +++ b/libopie2/examples/opieui/osplitter_example/osplitter_example.h | |||
@@ -1,17 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * May be used, copied and modified wihtout any limitation | 2 | * May be used, copied and modified wihtout any limitation |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef OSPlitter_EXAMPLE_H | 5 | #ifndef OSPlitter_EXAMPLE_H |
6 | #define OSPlitter_EXAMPLE_H | 6 | #define OSPlitter_EXAMPLE_H |
7 | 7 | ||
8 | #include <qvbox.h> | 8 | #include <qvbox.h> |
9 | #include <opie2/ofileselector.h> | ||
10 | 9 | ||
11 | class OSplitterExample : public QWidget { | 10 | class OSplitterExample : public QWidget { |
12 | Q_OBJECT | 11 | Q_OBJECT |
13 | public: | 12 | public: |
14 | static QString appName() { return QString::fromLatin1("osplitter_example"); } | 13 | static QString appName() { return QString::fromLatin1("osplitter_example"); } |
15 | OSplitterExample( QWidget *parent, const char* name, WFlags fl ); | 14 | OSplitterExample( QWidget *parent, const char* name, WFlags fl ); |
16 | 15 | ||
17 | }; | 16 | }; |
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp index 789496c..6443dc0 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp +++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp | |||
@@ -4,39 +4,41 @@ | |||
4 | #include <qheader.h> | 4 | #include <qheader.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | 6 | ||
7 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
8 | 8 | ||
9 | #include <opie2/oapplicationfactory.h> | 9 | #include <opie2/oapplicationfactory.h> |
10 | #include "osplitter_mail.h" | 10 | #include "osplitter_mail.h" |
11 | 11 | ||
12 | using namespace Opie::Ui; | ||
13 | |||
12 | OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) | 14 | OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) |
13 | 15 | ||
14 | class Folder { | 16 | class Folder { |
15 | int dummy; | 17 | int dummy; |
16 | }; | 18 | }; |
17 | 19 | ||
18 | // ----------------------------------------------------------------- | 20 | // ----------------------------------------------------------------- |
19 | 21 | ||
20 | ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) | 22 | ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) |
21 | : QWidget( p, name, fl ) { | 23 | : QWidget( p, name, fl ) { |
22 | qApp->installEventFilter( this ); | 24 | qApp->installEventFilter( this ); |
23 | m_lstFolders.setAutoDelete( true ); | 25 | m_lstFolders.setAutoDelete( true ); |
24 | QHBoxLayout *lay = new QHBoxLayout(this); | 26 | QHBoxLayout *lay = new QHBoxLayout(this); |
25 | 27 | ||
26 | m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); | 28 | m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); |
27 | lay->addWidget( m_splitter ); | 29 | lay->addWidget( m_splitter ); |
28 | connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ), | 30 | connect(m_splitter, SIGNAL(sizeChanged(bool,Orientation) ), |
29 | this, SLOT(slotSizeChange(bool,const QSize&) ) ); | 31 | this, SLOT(slotSizeChange(bool,Orientation) ) ); |
30 | 32 | ||
31 | m_overview = new QListView( m_splitter ); | 33 | m_overview = new QListView( m_splitter ); |
32 | m_overview->header()->setClickEnabled( FALSE ); | 34 | m_overview->header()->setClickEnabled( FALSE ); |
33 | m_overview->addColumn( tr("Folder") ); | 35 | m_overview->addColumn( tr("Folder") ); |
34 | m_overview->setMaximumWidth( 200 ); | 36 | // m_overview->setMaximumWidth( 200 ); |
35 | m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); | 37 | m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); |
36 | m_splitter->setSizeChange( 300 ); | 38 | m_splitter->setSizeChange( 300 ); |
37 | 39 | ||
38 | /* OSplitter starts with the small mode */ | 40 | /* OSplitter starts with the small mode */ |
39 | m_messages = 0; | 41 | m_messages = 0; |
40 | m_message = m_attach = 0; | 42 | m_message = m_attach = 0; |
41 | 43 | ||
42 | splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); | 44 | splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); |
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h index 1447a92..67961fb 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h +++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h | |||
@@ -11,22 +11,20 @@ | |||
11 | #define OPIE_SPLITTER_MAIL_EXAMPLE_H | 11 | #define OPIE_SPLITTER_MAIL_EXAMPLE_H |
12 | 12 | ||
13 | #include <qwidget.h> | 13 | #include <qwidget.h> |
14 | #include <qlist.h> | 14 | #include <qlist.h> |
15 | #include <qlistview.h> | 15 | #include <qlistview.h> |
16 | 16 | ||
17 | #include <opie2/osplitter.h> | 17 | #include <opie2/osplitter.h> |
18 | 18 | ||
19 | using Opie::OSplitter; | ||
20 | 19 | ||
21 | class Folder; | 20 | class Folder; |
22 | class QLabel; | 21 | class QLabel; |
23 | 22 | ||
24 | class OSplitter; | ||
25 | class ListViews : public QWidget { | 23 | class ListViews : public QWidget { |
26 | Q_OBJECT | 24 | Q_OBJECT |
27 | public: | 25 | public: |
28 | static QString appName() { return QString::fromLatin1("osplitter-mail"); } | 26 | static QString appName() { return QString::fromLatin1("osplitter-mail"); } |
29 | ListViews( QWidget* parent, const char * name, WFlags fl ); | 27 | ListViews( QWidget* parent, const char * name, WFlags fl ); |
30 | ~ListViews(); | 28 | ~ListViews(); |
31 | 29 | ||
32 | bool eventFilter( QObject* , QEvent* ); | 30 | bool eventFilter( QObject* , QEvent* ); |
@@ -34,18 +32,18 @@ private: | |||
34 | void initFolders(); | 32 | void initFolders(); |
35 | void initFolder( Folder *folder, unsigned int &count ); | 33 | void initFolder( Folder *folder, unsigned int &count ); |
36 | 34 | ||
37 | QListView *m_messages, *m_overview; | 35 | QListView *m_messages, *m_overview; |
38 | QLabel *m_message, *m_attach; | 36 | QLabel *m_message, *m_attach; |
39 | QList<QListView> m_folders; // used in tab mode | 37 | QList<QListView> m_folders; // used in tab mode |
40 | QList<Folder> m_lstFolders; | 38 | QList<Folder> m_lstFolders; |
41 | bool m_mode : 1; // bitfield | 39 | bool m_mode : 1; // bitfield |
42 | OSplitter *m_splitter; | 40 | Opie::Ui::OSplitter *m_splitter; |
43 | OSplitter *splitti; | 41 | Opie::Ui::OSplitter *splitti; |
44 | QListView *folder1; | 42 | QListView *folder1; |
45 | #if 0 | 43 | #if 0 |
46 | //private slots: | 44 | //private slots: |
47 | // void slotFolderChanged( QListViewItem* ); | 45 | // void slotFolderChanged( QListViewItem* ); |
48 | // void slotMessageChanged(); | 46 | // void slotMessageChanged(); |
49 | // void slotSizeChange( bool, const QSize& ); | 47 | // void slotSizeChange( bool, const QSize& ); |
50 | #endif | 48 | #endif |
51 | }; | 49 | }; |
diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp index d8c01a4..bcda14c 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/main.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/main.cpp | |||
@@ -12,16 +12,19 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "opieuidemo.h" | 16 | #include "opieuidemo.h" |
17 | 17 | ||
18 | #include <opie2/oapplication.h> | 18 | #include <opie2/oapplication.h> |
19 | 19 | ||
20 | using namespace Opie::Core; | ||
21 | using namespace Opie::Ui; | ||
22 | |||
20 | int main( int argc, char **argv ) | 23 | int main( int argc, char **argv ) |
21 | { | 24 | { |
22 | OApplication a( argc, argv, "Opie UI Demo" ); | 25 | OApplication a( argc, argv, "Opie UI Demo" ); |
23 | qDebug( "." ); | 26 | qDebug( "." ); |
24 | OpieUIDemo e; | 27 | OpieUIDemo e; |
25 | qDebug( "." ); | 28 | qDebug( "." ); |
26 | a.showMainWidget(&e); | 29 | a.showMainWidget(&e); |
27 | qDebug( "." ); | 30 | qDebug( "." ); |
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp index 0d8bc9f..754a744 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp | |||
@@ -20,42 +20,40 @@ | |||
20 | #include <qmenubar.h> | 20 | #include <qmenubar.h> |
21 | #include <qmessagebox.h> | 21 | #include <qmessagebox.h> |
22 | #include <qvbox.h> | 22 | #include <qvbox.h> |
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qstringlist.h> | 24 | #include <qstringlist.h> |
25 | 25 | ||
26 | // Qtopia | 26 | // Qtopia |
27 | 27 | ||
28 | #ifdef QWS | ||
29 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/global.h> | 29 | #include <qpe/global.h> |
31 | #endif | ||
32 | 30 | ||
33 | // Opie | 31 | // Opie |
34 | 32 | ||
35 | #ifdef QWS | ||
36 | #include <opie2/odevice.h> | 33 | #include <opie2/odevice.h> |
37 | using namespace Opie; | ||
38 | #endif | ||
39 | 34 | ||
40 | #include <opie2/ocompletionbox.h> | 35 | #include <opie2/ocompletionbox.h> |
41 | #include <opie2/olineedit.h> | 36 | #include <opie2/olineedit.h> |
42 | #include <opie2/ocombobox.h> | 37 | #include <opie2/ocombobox.h> |
43 | #include <opie2/oeditlistbox.h> | 38 | #include <opie2/oeditlistbox.h> |
44 | #include <opie2/oselector.h> | 39 | #include <opie2/oselector.h> |
45 | #include <opie2/opopupmenu.h> | 40 | #include <opie2/opopupmenu.h> |
46 | 41 | ||
47 | #include <qtabwidget.h> | 42 | #include <qtabwidget.h> |
48 | #include "oversatileviewdemo.h" | 43 | #include "oversatileviewdemo.h" |
49 | 44 | ||
50 | // Local | 45 | // Local |
51 | 46 | ||
52 | #include "opieuidemo.h" | 47 | #include "opieuidemo.h" |
53 | 48 | ||
49 | using namespace Opie::Core; | ||
50 | using namespace Opie::Ui; | ||
51 | |||
54 | enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector }; | 52 | enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector }; |
55 | 53 | ||
56 | OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl ) | 54 | OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl ) |
57 | : QMainWindow( parent, name, fl ) | 55 | : QMainWindow( parent, name, fl ) |
58 | { | 56 | { |
59 | 57 | ||
60 | QMenuBar* mbar = this->menuBar(); | 58 | QMenuBar* mbar = this->menuBar(); |
61 | OPopupMenu* demo = new OPopupMenu( this ); | 59 | OPopupMenu* demo = new OPopupMenu( this ); |
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h index 0519ae6..382885f 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h | |||
@@ -13,17 +13,21 @@ | |||
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef OPIEUIDEMO_H | 16 | #ifndef OPIEUIDEMO_H |
17 | #define OPIEUIDEMO_H | 17 | #define OPIEUIDEMO_H |
18 | 18 | ||
19 | #include <qmainwindow.h> | 19 | #include <qmainwindow.h> |
20 | 20 | ||
21 | namespace Opie { | ||
22 | namespace Ui { | ||
21 | class OVersatileView; | 23 | class OVersatileView; |
24 | } | ||
25 | } | ||
22 | class QTabWidget; | 26 | class QTabWidget; |
23 | class QVBox; | 27 | class QVBox; |
24 | 28 | ||
25 | class OpieUIDemo : public QMainWindow { | 29 | class OpieUIDemo : public QMainWindow { |
26 | Q_OBJECT | 30 | Q_OBJECT |
27 | 31 | ||
28 | public: | 32 | public: |
29 | 33 | ||
@@ -42,15 +46,15 @@ public slots: | |||
42 | 46 | ||
43 | protected: | 47 | protected: |
44 | void build(); | 48 | void build(); |
45 | void buildVV( QVBox* b ); | 49 | void buildVV( QVBox* b ); |
46 | 50 | ||
47 | private: | 51 | private: |
48 | QTabWidget* main; | 52 | QTabWidget* main; |
49 | 53 | ||
50 | OVersatileView* vv; | 54 | Opie::Ui::OVersatileView* vv; |
51 | 55 | ||
52 | }; | 56 | }; |
53 | 57 | ||
54 | 58 | ||
55 | 59 | ||
56 | #endif | 60 | #endif |
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp index 9db4e62..b6d59aa 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp | |||
@@ -33,16 +33,18 @@ | |||
33 | #include "oversatileviewdemo.h" | 33 | #include "oversatileviewdemo.h" |
34 | #include <opie2/oversatileview.h> | 34 | #include <opie2/oversatileview.h> |
35 | #include <opie2/oversatileviewitem.h> | 35 | #include <opie2/oversatileviewitem.h> |
36 | 36 | ||
37 | #include <qstring.h> | 37 | #include <qstring.h> |
38 | #include <qpixmap.h> | 38 | #include <qpixmap.h> |
39 | #include <qlistview.h> | 39 | #include <qlistview.h> |
40 | 40 | ||
41 | using namespace Opie::Ui; | ||
42 | |||
41 | OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f ) | 43 | OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f ) |
42 | :QVBox( parent, name, f ) | 44 | :QVBox( parent, name, f ) |
43 | { | 45 | { |
44 | vv = new OVersatileView( this ); | 46 | vv = new OVersatileView( this ); |
45 | 47 | ||
46 | vv->addColumn( "First" ); | 48 | vv->addColumn( "First" ); |
47 | vv->addColumn( "2nd" ); | 49 | vv->addColumn( "2nd" ); |
48 | vv->addColumn( "IIIrd" ); | 50 | vv->addColumn( "IIIrd" ); |
diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h index 79318d0..35e2c3c 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h | |||
@@ -29,45 +29,49 @@ | |||
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef OVERSATILEVIEWDEMO_H | 32 | #ifndef OVERSATILEVIEWDEMO_H |
33 | #define OVERSATILEVIEWDEMO_H | 33 | #define OVERSATILEVIEWDEMO_H |
34 | 34 | ||
35 | #include <qvbox.h> | 35 | #include <qvbox.h> |
36 | 36 | ||
37 | namespace Opie { | ||
38 | namespace Ui { | ||
37 | class OVersatileView; | 39 | class OVersatileView; |
38 | class OVersatileViewItem; | 40 | class OVersatileViewItem; |
41 | } | ||
42 | } | ||
39 | 43 | ||
40 | class OVersatileViewDemo: public QVBox | 44 | class OVersatileViewDemo: public QVBox |
41 | { | 45 | { |
42 | Q_OBJECT | 46 | Q_OBJECT |
43 | 47 | ||
44 | public: | 48 | public: |
45 | OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 49 | OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
46 | virtual ~OVersatileViewDemo(); | 50 | virtual ~OVersatileViewDemo(); |
47 | 51 | ||
48 | public slots: | 52 | public slots: |
49 | void selectionChanged(); | 53 | void selectionChanged(); |
50 | void selectionChanged( OVersatileViewItem * ); | 54 | void selectionChanged( Opie::Ui::OVersatileViewItem * ); |
51 | void currentChanged( OVersatileViewItem * ); | 55 | void currentChanged( Opie::Ui::OVersatileViewItem * ); |
52 | void clicked( OVersatileViewItem * ); | 56 | void clicked( Opie::Ui::OVersatileViewItem * ); |
53 | void pressed( OVersatileViewItem * ); | 57 | void pressed( OPie::Ui::OVersatileViewItem * ); |
54 | 58 | ||
55 | void doubleClicked( OVersatileViewItem *item ); | 59 | void doubleClicked( Opie::Ui::OVersatileViewItem *item ); |
56 | void returnPressed( OVersatileViewItem *item ); | 60 | void returnPressed( Opie::Ui::OVersatileViewItem *item ); |
57 | 61 | ||
58 | void onItem( OVersatileViewItem *item ); | 62 | void onItem( Opie::Ui::OVersatileViewItem *item ); |
59 | void onViewport(); | 63 | void onViewport(); |
60 | 64 | ||
61 | void expanded( OVersatileViewItem *item ); | 65 | void expanded( Opie::Ui::OVersatileViewItem *item ); |
62 | void collapsed( OVersatileViewItem *item ); | 66 | void collapsed( Opie::Ui::OVersatileViewItem *item ); |
63 | 67 | ||
64 | void moved(); | 68 | void moved(); |
65 | 69 | ||
66 | void contextMenuRequested( OVersatileViewItem *item, const QPoint&, int col ); | 70 | void contextMenuRequested( Opie::Ui::OVersatileViewItem *item, const QPoint&, int col ); |
67 | 71 | ||
68 | private: | 72 | private: |
69 | OVersatileView* vv; | 73 | Opie::Ui::OVersatileView* vv; |
70 | 74 | ||
71 | }; | 75 | }; |
72 | 76 | ||
73 | #endif | 77 | #endif |
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp index b1c5e70..50cc11b 100644 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp +++ b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp | |||
@@ -14,17 +14,17 @@ | |||
14 | #include <qtoolbar.h> | 14 | #include <qtoolbar.h> |
15 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
16 | #include <qmenubar.h> | 16 | #include <qmenubar.h> |
17 | #include <qlayout.h> | 17 | #include <qlayout.h> |
18 | #include <qlabel.h> | 18 | #include <qlabel.h> |
19 | #include <qpushbutton.h> | 19 | #include <qpushbutton.h> |
20 | #include <qsignalmapper.h> | 20 | #include <qsignalmapper.h> |
21 | 21 | ||
22 | using namespace Opie; | 22 | using namespace Opie::Ui; |
23 | 23 | ||
24 | OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) | 24 | OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) |
25 | 25 | ||
26 | StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | 26 | StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) |
27 | : QMainWindow( parent, name, fl ) | 27 | : QMainWindow( parent, name, fl ) |
28 | { | 28 | { |
29 | m_stack = new OWidgetStack( this ); | 29 | m_stack = new OWidgetStack( this ); |
30 | setCentralWidget( m_stack ); | 30 | setCentralWidget( m_stack ); |
diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h index aea85cb..c9b70cb 100644 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h +++ b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h | |||
@@ -3,26 +3,25 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef O_STACK_EXAMPLE_SIMPLE_H | 5 | #ifndef O_STACK_EXAMPLE_SIMPLE_H |
6 | #define O_STACK_EXAMPLE_SIMPLE_H | 6 | #define O_STACK_EXAMPLE_SIMPLE_H |
7 | 7 | ||
8 | #include <qmainwindow.h> | 8 | #include <qmainwindow.h> |
9 | #include <opie2/owidgetstack.h> | 9 | #include <opie2/owidgetstack.h> |
10 | 10 | ||
11 | using namespace Opie; | ||
12 | 11 | ||
13 | class StackExample : public QMainWindow { | 12 | class StackExample : public QMainWindow { |
14 | Q_OBJECT | 13 | Q_OBJECT |
15 | public: | 14 | public: |
16 | StackExample( QWidget* paren, const char* name, WFlags fl ); | 15 | StackExample( QWidget* paren, const char* name, WFlags fl ); |
17 | ~StackExample(); | 16 | ~StackExample(); |
18 | static QString appName() { return QString::fromLatin1("owidgetstack-example"); } | 17 | static QString appName() { return QString::fromLatin1("owidgetstack-example"); } |
19 | 18 | ||
20 | protected: | 19 | protected: |
21 | void closeEvent( QCloseEvent* e ); | 20 | void closeEvent( QCloseEvent* e ); |
22 | private: | 21 | private: |
23 | OWidgetStack* m_stack; | 22 | Opie::Ui::OWidgetStack* m_stack; |
24 | QWidget* m_main; | 23 | QWidget* m_main; |
25 | 24 | ||
26 | }; | 25 | }; |
27 | 26 | ||
28 | #endif | 27 | #endif |