summaryrefslogtreecommitdiff
path: root/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp
Unidiff
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.cpp2
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,46 +1,46 @@
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
22using namespace Opie; 22using namespace Opie::Ui;
23 23
24OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) 24OPIE_EXPORT_APP( OApplicationFactory<StackExample> )
25 25
26StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) 26StackExample::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"),