4 files changed, 10 insertions, 2 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,16 +1,18 @@ | |||
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" ); |
13 | app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); | 15 | app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); |
14 | } // closing the scope returns to the last group | 16 | } // closing the scope returns to the last group |
15 | 17 | ||
16 | app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); | 18 | app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); |
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 | |||
@@ -8,24 +8,26 @@ | |||
8 | #include <qradiobutton.h> | 8 | #include <qradiobutton.h> |
9 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
10 | 10 | ||
11 | /* OPIE */ | 11 | /* OPIE */ |
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 ); |
28 | 30 | ||
29 | // you have access to global settings via OGlobalSettings | 31 | // you have access to global settings via OGlobalSettings |
30 | int mode = OGlobalSettings::debugMode(); | 32 | int mode = OGlobalSettings::debugMode(); |
31 | 33 | ||
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,13 +1,15 @@ | |||
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 | ||
11 | } | 13 | } |
12 | 14 | ||
13 | //#include "moc/oconfigdemo.moc" | 15 | //#include "moc/oconfigdemo.moc" |
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,11 +1,13 @@ | |||
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 | } |
11 | 13 | ||