Diffstat (limited to 'noncore/tools/euroconv/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp index 7d69535..b765a5e 100644 --- a/noncore/tools/euroconv/main.cpp +++ b/noncore/tools/euroconv/main.cpp @@ -6,34 +6,32 @@ * * * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> * * Requirements: Qt * - * $Id$ * ***************************************************************************/ #include <qpe/qpeapplication.h> #include <qvbox.h> -//#include <qapplication.h> #include "calcdisplay.h" #include "calckeypad.h" +#include <opie/oapplicationfactory.h> +struct Layout : QVBox{ + static QString appName() { return QString::fromLatin1("euroconv"); } + Layout(QWidget *p, const char* n, WFlags) + :QVBox(0,"fond" ) + { + LCDDisplay *lcd = new LCDDisplay(this, "lcd"); + KeyPad *num = new KeyPad(lcd, this, "keypad"); -int main( int argc, char **argv ) { + setCaption( QObject::tr("Euroconv") ); + }; - QPEApplication app( argc, argv ); +}; - QVBox *layout = new QVBox(0, "fond"); - - LCDDisplay lcd (layout, "lcd"); - KeyPad num(&lcd, layout, "keypad"); - app.setMainWidget(layout); - layout->setCaption( QObject::tr("Euroconv") ); - layout->showMaximized (); - layout->show(); - return app.exec(); -} +OPIE_EXPORT_APP( OApplicationFactory<Layout> ) |