summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp5
-rw-r--r--noncore/graphics/drawpad/drawpad.h4
-rw-r--r--noncore/graphics/drawpad/drawpad.pro7
-rw-r--r--noncore/graphics/drawpad/main.cpp12
4 files changed, 10 insertions, 18 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index aac6bc1..ac08e15 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -49,7 +49,7 @@
#include <qtooltip.h>
#include <qwhatsthis.h>
-DrawPad::DrawPad(QWidget* parent, const char* name)
+DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
: QMainWindow(parent, name, WStyle_ContextHelp)
{
// init members
@@ -278,10 +278,11 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
changeBrushColor(Qt::white);
+ finishStartup();
}
-void DrawPad::finishStartup()
+void DrawPad::finishStartup()
{
// init pages
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h
index 2cae700..48d5225 100644
--- a/noncore/graphics/drawpad/drawpad.h
+++ b/noncore/graphics/drawpad/drawpad.h
@@ -32,9 +32,11 @@ class DrawPad : public QMainWindow
Q_OBJECT
public:
- DrawPad(QWidget* parent = 0, const char* name = 0);
+ DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~DrawPad();
+ static QString appName() { return QString::fromLatin1("drawpad"); }
+
Tool* tool() { return m_pTool; }
QPen pen() { return m_pen; }
QBrush brush() { return m_brush; }
diff --git a/noncore/graphics/drawpad/drawpad.pro b/noncore/graphics/drawpad/drawpad.pro
index bfe6ac4..03cf7aa 100644
--- a/noncore/graphics/drawpad/drawpad.pro
+++ b/noncore/graphics/drawpad/drawpad.pro
@@ -1,5 +1,4 @@
-TEMPLATE = app
-CONFIG = qt warn_on release
+CONFIG = qt warn_on release quick-app
HEADERS = drawpad.h \
drawpadcanvas.h \
ellipsetool.h \
@@ -42,7 +41,7 @@ SOURCES = drawpad.cpp \
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
-DESTDIR = $(OPIEDIR)/bin
+
TARGET = drawpad
TRANSLATIONS = ../../../i18n/de/drawpad.ts \
@@ -64,6 +63,4 @@ TRANSLATIONS = ../../../i18n/de/drawpad.ts \
../../../i18n/it/drawpad.ts \
../../../i18n/zh_TW/drawpad.ts
-
-
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/graphics/drawpad/main.cpp b/noncore/graphics/drawpad/main.cpp
index 12f8084..87bc621 100644
--- a/noncore/graphics/drawpad/main.cpp
+++ b/noncore/graphics/drawpad/main.cpp
@@ -14,14 +14,6 @@
#include "drawpad.h"
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-int main(int argc, char **argv)
-{
- QPEApplication a(argc, argv);
-
- DrawPad mw; // = new DrawPad();;
- a.showMainWidget(&mw );
- mw.finishStartup();
-
- return a.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<DrawPad> )