Diffstat (limited to 'examples/main-tab/simple.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/main-tab/simple.cpp | 8 |
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 @@ -1,65 +1,67 @@ #include <qaction.h> // action #include <qmenubar.h> // menubar #include <qtoolbar.h> // toolbar #include <qlabel.h> // a label #include <qpushbutton.h> // the header file for the QPushButton #include <qlayout.h> #include <qpe/qpeapplication.h> // the QPEApplication #include <qpe/resource.h> #include <qpe/sound.h> -#include <opie/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching -#include <opie/otabwidget.h> +#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching +#include <opie2/otabwidget.h> #include "simple.h" /* * implementation of simple */ /* * The factory is used for quicklaunching * 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 * * Depending on the global quick launch setting this will create * either a main method or one for our component plugin system */ +/* The OApplicationFactory is in the Opie::Core namespace */ +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { setCaption(tr("My MainWindow") ); initUI(); /* * Tab widget as central */ - OTabWidget *tab = new OTabWidget(this); + Opie::Ui::OTabWidget *tab = new Opie::Ui::OTabWidget(this); connect(tab, SIGNAL(currentChanged(QWidget*) ), this, SLOT( slotCurrentChanged(QWidget*) ) ); setCentralWidget( tab ); Simple1 *simple1 = new Simple1( this ); tab->addTab( simple1, "new", tr("Simple1") ); tab->setCurrentTab( tr("Simple1") ); Simple2 *simple2 = new Simple2( this ); tab->addTab( simple2, "trash", tr("Simple2") ); m_oldCurrent = simple1; connect(m_fire, SIGNAL(activated() ), simple1, SLOT(slotFire() ) ); } MainWindow::~MainWindow() { // again nothing to delete because Qt takes care } void MainWindow::setDocument( const QString& /*str*/ ) { } |