-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 5 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 4 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.pro | 7 | ||||
-rw-r--r-- | noncore/graphics/drawpad/main.cpp | 12 |
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 @@ -50,5 +50,5 @@ #include <qwhatsthis.h> -DrawPad::DrawPad(QWidget* parent, const char* name) +DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, WStyle_ContextHelp) { @@ -279,8 +279,9 @@ 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 @@ -33,7 +33,9 @@ class DrawPad : public QMainWindow 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; } 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,4 +1,3 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = drawpad.h \ drawpadcanvas.h \ @@ -43,5 +42,5 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -DESTDIR = $(OPIEDIR)/bin + TARGET = drawpad @@ -65,5 +64,3 @@ TRANSLATIONS = ../../../i18n/de/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 @@ -15,13 +15,5 @@ #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> ) |