-rw-r--r-- | noncore/tools/euroconv/euroconv.pro | 5 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 26 |
2 files changed, 14 insertions, 17 deletions
diff --git a/noncore/tools/euroconv/euroconv.pro b/noncore/tools/euroconv/euroconv.pro index d817dd3..2b732da 100644 --- a/noncore/tools/euroconv/euroconv.pro +++ b/noncore/tools/euroconv/euroconv.pro @@ -1,3 +1,2 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = calcdisplay.h \ @@ -10,5 +9,5 @@ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -DESTDIR = $(OPIEDIR)/bin INTERFACES = TARGET = euroconv + include ( $(OPIEDIR)/include.pro ) 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 @@ -11,3 +11,2 @@ * - * $Id$ * @@ -17,3 +16,2 @@ #include <qvbox.h> -//#include <qapplication.h> @@ -22,18 +20,18 @@ +#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> ) |