summaryrefslogtreecommitdiff
path: root/noncore/tools/euroconv
Side-by-side diff
Diffstat (limited to 'noncore/tools/euroconv') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/euroconv/euroconv.pro5
-rw-r--r--noncore/tools/euroconv/main.cpp30
2 files changed, 16 insertions, 19 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>
-
-int main( int argc, char **argv ) {
-
- QPEApplication app( argc, argv );
-
- QVBox *layout = new QVBox(0, "fond");
+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");
- LCDDisplay lcd (layout, "lcd");
- KeyPad num(&lcd, layout, "keypad");
- app.setMainWidget(layout);
- layout->setCaption( QObject::tr("Euroconv") );
- layout->showMaximized ();
- layout->show();
- return app.exec();
-}
+ setCaption( QObject::tr("Euroconv") );
+ };
+
+};
+
+OPIE_EXPORT_APP( OApplicationFactory<Layout> )