summaryrefslogtreecommitdiff
path: root/examples/main-tab/simple.cpp
Unidiff
Diffstat (limited to 'examples/main-tab/simple.cpp') (more/less context) (show whitespace changes)
-rw-r--r--examples/main-tab/simple.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/main-tab/simple.cpp b/examples/main-tab/simple.cpp
index c5a6d5a..7edb557 100644
--- a/examples/main-tab/simple.cpp
+++ b/examples/main-tab/simple.cpp
@@ -6,14 +6,14 @@
6#include <qlayout.h> 6#include <qlayout.h>
7 7
8#include <qpe/qpeapplication.h> // the QPEApplication 8#include <qpe/qpeapplication.h> // the QPEApplication
9#include <qpe/resource.h> 9#include <qpe/resource.h>
10#include <qpe/sound.h> 10#include <qpe/sound.h>
11 11
12#include <opie/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching 12#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching
13#include <opie/otabwidget.h> 13#include <opie2/otabwidget.h>
14 14
15#include "simple.h" 15#include "simple.h"
16 16
17/* 17/*
18 * implementation of simple 18 * implementation of simple
19 */ 19 */
@@ -23,25 +23,27 @@
23 * It needs a constructor ( c'tor ) with at least QWidget, const char* and WFlags as parameter and a static QString appName() matching the TARGET of the .pro 23 * It needs a constructor ( c'tor ) with at least QWidget, const char* and WFlags as parameter and a static QString appName() matching the TARGET of the .pro
24 * 24 *
25 * Depending on the global quick launch setting this will create 25 * Depending on the global quick launch setting this will create
26 * either a main method or one for our component plugin system 26 * either a main method or one for our component plugin system
27 */ 27 */
28 28
29/* The OApplicationFactory is in the Opie::Core namespace */
30using namespace Opie::Core;
29OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 31OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
30 32
31MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) 33MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl )
32 : QMainWindow( parent, name, fl ) { 34 : QMainWindow( parent, name, fl ) {
33 setCaption(tr("My MainWindow") ); 35 setCaption(tr("My MainWindow") );
34 36
35 initUI(); 37 initUI();
36 38
37 39
38 /* 40 /*
39 * Tab widget as central 41 * Tab widget as central
40 */ 42 */
41 OTabWidget *tab = new OTabWidget(this); 43 Opie::Ui::OTabWidget *tab = new Opie::Ui::OTabWidget(this);
42 connect(tab, SIGNAL(currentChanged(QWidget*) ), 44 connect(tab, SIGNAL(currentChanged(QWidget*) ),
43 this, SLOT( slotCurrentChanged(QWidget*) ) ); 45 this, SLOT( slotCurrentChanged(QWidget*) ) );
44 setCentralWidget( tab ); 46 setCentralWidget( tab );
45 47
46 Simple1 *simple1 = new Simple1( this ); 48 Simple1 *simple1 = new Simple1( this );
47 tab->addTab( simple1, "new", tr("Simple1") ); 49 tab->addTab( simple1, "new", tr("Simple1") );