summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp3
-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, 9 insertions, 17 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
@@ -48,9 +48,9 @@
#include <qtoolbutton.h>
#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
@@ -277,8 +277,9 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
m_pBrushColorToolButton->setPopupDelay(0);
changeBrushColor(Qt::white);
+ finishStartup();
}
void DrawPad::finishStartup()
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
@@ -31,11 +31,13 @@ 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,6 +1,5 @@
-TEMPLATE = app
-CONFIG = qt warn_on release
+CONFIG = qt warn_on release quick-app
HEADERS = drawpad.h \
drawpadcanvas.h \
ellipsetool.h \
erasetool.h \
@@ -41,9 +40,9 @@ SOURCES = drawpad.cpp \
tool.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
-DESTDIR = $(OPIEDIR)/bin
+
TARGET = drawpad
TRANSLATIONS = ../../../i18n/de/drawpad.ts \
../../../i18n/nl/drawpad.ts \
@@ -63,7 +62,5 @@ TRANSLATIONS = ../../../i18n/de/drawpad.ts \
../../../i18n/zh_CN/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
@@ -13,15 +13,7 @@
#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> )