Diffstat (limited to 'libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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 | |||
@@ -1,43 +1,45 @@ | |||
1 | /* QT */ | 1 | /* QT */ |
2 | 2 | ||
3 | #include <qvbox.h> | 3 | #include <qvbox.h> |
4 | #include <qhbox.h> | 4 | #include <qhbox.h> |
5 | #include <qvbuttongroup.h> | 5 | #include <qvbuttongroup.h> |
6 | #include <qhbuttongroup.h> | 6 | #include <qhbuttongroup.h> |
7 | #include <qlineedit.h> | 7 | #include <qlineedit.h> |
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 | ||
32 | QVBox* vbox = new QVBox(); | 34 | QVBox* vbox = new QVBox(); |
33 | setMainWidget( vbox ); | 35 | setMainWidget( vbox ); |
34 | 36 | ||
35 | g = new QVButtonGroup( "Output Strategy", vbox ); | 37 | g = new QVButtonGroup( "Output Strategy", vbox ); |
36 | QRadioButton* r0 = new QRadioButton( "file", g ); | 38 | QRadioButton* r0 = new QRadioButton( "file", g ); |
37 | QRadioButton* r1 = new QRadioButton( "messagebox", g ); | 39 | QRadioButton* r1 = new QRadioButton( "messagebox", g ); |
38 | QRadioButton* r2 = new QRadioButton( "stderr", g ); | 40 | QRadioButton* r2 = new QRadioButton( "stderr", g ); |
39 | QRadioButton* r3 = new QRadioButton( "syslog", g ); | 41 | QRadioButton* r3 = new QRadioButton( "syslog", g ); |
40 | QRadioButton* r4 = new QRadioButton( "socket", g ); | 42 | QRadioButton* r4 = new QRadioButton( "socket", g ); |
41 | g->insert( r0, 0 ); | 43 | g->insert( r0, 0 ); |
42 | g->insert( r1, 1 ); | 44 | g->insert( r1, 1 ); |
43 | g->insert( r2, 2 ); | 45 | g->insert( r2, 2 ); |