Diffstat (limited to 'libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
@@ -1,70 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | * You may use, modify and distribute this example without any limitation | 2 | * You may use, modify and distribute this example without any limitation |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include "owidgetstack_example.h" | 5 | #include "owidgetstack_example.h" |
6 | 6 | ||
7 | /* OPIE */ | 7 | /* OPIE */ |
8 | #include <opie2/oapplicationfactory.h> | 8 | #include <opie2/oapplicationfactory.h> |
9 | #include <opie2/owidgetstack.h> | 9 | #include <opie2/owidgetstack.h> |
10 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
11 | 11 | ||
12 | /* QT */ | 12 | /* QT */ |
13 | #include <qaction.h> | 13 | #include <qaction.h> |
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 ); |
31 | 31 | ||
32 | /* nice Signal Mapper ;) */ | 32 | /* nice Signal Mapper ;) */ |
33 | QSignalMapper *sm = new QSignalMapper(this); | 33 | QSignalMapper *sm = new QSignalMapper(this); |
34 | connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); | 34 | connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); |
35 | 35 | ||
36 | /* toolbar first but this should be known from the other examples */ | 36 | /* toolbar first but this should be known from the other examples */ |
37 | setToolBarsMovable( false ); | 37 | setToolBarsMovable( false ); |
38 | 38 | ||
39 | /* only a menubar here */ | 39 | /* only a menubar here */ |
40 | QToolBar* holder = new QToolBar( this ); | 40 | QToolBar* holder = new QToolBar( this ); |
41 | holder->setHorizontalStretchable( true ); | 41 | holder->setHorizontalStretchable( true ); |
42 | 42 | ||
43 | QMenuBar *bar = new QMenuBar( holder ); | 43 | QMenuBar *bar = new QMenuBar( holder ); |
44 | QPopupMenu *menu = new QPopupMenu( this ); | 44 | QPopupMenu *menu = new QPopupMenu( this ); |
45 | 45 | ||
46 | QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), | 46 | QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), |
47 | QString::null, 0, this, 0 ); | 47 | QString::null, 0, this, 0 ); |
48 | sm->setMapping(a, 1 ); | 48 | sm->setMapping(a, 1 ); |
49 | connect(a, SIGNAL(activated() ), | 49 | connect(a, SIGNAL(activated() ), |
50 | sm, SLOT(map() ) ); | 50 | sm, SLOT(map() ) ); |
51 | a->addTo( menu ); | 51 | a->addTo( menu ); |
52 | 52 | ||
53 | a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), | 53 | a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), |
54 | QString::null, 0, this, 0 ); | 54 | QString::null, 0, this, 0 ); |
55 | sm->setMapping(a, 2 ); | 55 | sm->setMapping(a, 2 ); |
56 | connect(a, SIGNAL(activated() ), | 56 | connect(a, SIGNAL(activated() ), |
57 | sm, SLOT(map() ) ); | 57 | sm, SLOT(map() ) ); |
58 | a->addTo( menu ); | 58 | a->addTo( menu ); |
59 | 59 | ||
60 | a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), | 60 | a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), |
61 | QString::null, 0, this, 0 ); | 61 | QString::null, 0, this, 0 ); |
62 | sm->setMapping(a, 3 ); | 62 | sm->setMapping(a, 3 ); |
63 | connect(a, SIGNAL(activated() ), | 63 | connect(a, SIGNAL(activated() ), |
64 | sm, SLOT(map() ) ); | 64 | sm, SLOT(map() ) ); |
65 | a->addTo( menu ); | 65 | a->addTo( menu ); |
66 | 66 | ||
67 | a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), | 67 | a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), |
68 | QString::null, 0, this, 0 ); | 68 | QString::null, 0, this, 0 ); |
69 | sm->setMapping(a, 4 ); | 69 | sm->setMapping(a, 4 ); |
70 | connect(a, SIGNAL(activated() ), | 70 | connect(a, SIGNAL(activated() ), |