summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-10-27 20:18:36 (UTC)
committer mickeyl <mickeyl>2003-10-27 20:18:36 (UTC)
commitb367c7a9a97082419832c62d879c1ed2c80b8249 (patch) (unidiff)
tree556d9beed9056aec911734c6bbc365a61ec251a4
parent951d1d4125a80dc814f95d2956853bf53ca52e9a (diff)
downloadopie-b367c7a9a97082419832c62d879c1ed2c80b8249.zip
opie-b367c7a9a97082419832c62d879c1ed2c80b8249.tar.gz
opie-b367c7a9a97082419832c62d879c1ed2c80b8249.tar.bz2
merge noncore/graphics/*
Note: qpdf is still not quicklaunch-able. I recommend not wasting time to convert it but look @ qpdf2 instead.
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
@@ -44,17 +44,17 @@
44#include <qfile.h> 44#include <qfile.h>
45#include <qmessagebox.h> 45#include <qmessagebox.h>
46#include <qpainter.h> 46#include <qpainter.h>
47#include <qspinbox.h> 47#include <qspinbox.h>
48#include <qtoolbutton.h> 48#include <qtoolbutton.h>
49#include <qtooltip.h> 49#include <qtooltip.h>
50#include <qwhatsthis.h> 50#include <qwhatsthis.h>
51 51
52DrawPad::DrawPad(QWidget* parent, const char* name) 52DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
53 : QMainWindow(parent, name, WStyle_ContextHelp) 53 : QMainWindow(parent, name, WStyle_ContextHelp)
54{ 54{
55 // init members 55 // init members
56 56
57 m_pDrawPadCanvas = new DrawPadCanvas(this, this); 57 m_pDrawPadCanvas = new DrawPadCanvas(this, this);
58 58
59 connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView())); 59 connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView()));
60 60
@@ -273,20 +273,21 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
273 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); 273 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&)));
274 274
275 QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); 275 QToolTip::add(m_pBrushColorToolButton, tr("Fill Color"));
276 m_pBrushColorToolButton->setPopup(brushColorPopupMenu); 276 m_pBrushColorToolButton->setPopup(brushColorPopupMenu);
277 m_pBrushColorToolButton->setPopupDelay(0); 277 m_pBrushColorToolButton->setPopupDelay(0);
278 278
279 changeBrushColor(Qt::white); 279 changeBrushColor(Qt::white);
280 280
281 finishStartup();
281} 282}
282 283
283 284
284void DrawPad::finishStartup() 285void DrawPad::finishStartup()
285{ 286{
286 // init pages 287 // init pages
287 288
288 QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); 289 QFile file(Global::applicationFileName("drawpad", "drawpad.xml"));
289 290
290 if (file.open(IO_ReadOnly)) { 291 if (file.open(IO_ReadOnly)) {
291 m_pDrawPadCanvas->load(&file); 292 m_pDrawPadCanvas->load(&file);
292 file.close(); 293 file.close();
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
@@ -27,19 +27,21 @@ class QSpinBox;
27class QToolButton; 27class QToolButton;
28class QWidgetStack; 28class QWidgetStack;
29 29
30class DrawPad : public QMainWindow 30class DrawPad : public QMainWindow
31{ 31{
32 Q_OBJECT 32 Q_OBJECT
33 33
34public: 34public:
35 DrawPad(QWidget* parent = 0, const char* name = 0); 35 DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
36 ~DrawPad(); 36 ~DrawPad();
37 37
38 static QString appName() { return QString::fromLatin1("drawpad"); }
39
38 Tool* tool() { return m_pTool; } 40 Tool* tool() { return m_pTool; }
39 QPen pen() { return m_pen; } 41 QPen pen() { return m_pen; }
40 QBrush brush() { return m_brush; } 42 QBrush brush() { return m_brush; }
41 43
42 bool antiAliasing(); 44 bool antiAliasing();
43 void finishStartup(); 45 void finishStartup();
44 46
45private slots: 47private slots:
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,10 +1,9 @@
1 TEMPLATE= app 1 CONFIG = qt warn_on release quick-app
2 CONFIG = qt warn_on release
3 HEADERS = drawpad.h \ 2 HEADERS = drawpad.h \
4 drawpadcanvas.h \ 3 drawpadcanvas.h \
5 ellipsetool.h \ 4 ellipsetool.h \
6 erasetool.h \ 5 erasetool.h \
7 exportdialog.h \ 6 exportdialog.h \
8 filltool.h \ 7 filltool.h \
9 filledellipsetool.h \ 8 filledellipsetool.h \
10 filledrectangletool.h \ 9 filledrectangletool.h \
@@ -37,17 +36,17 @@ SOURCES = drawpad.cpp \
37 rectangletool.cpp \ 36 rectangletool.cpp \
38 shapetool.cpp \ 37 shapetool.cpp \
39 texttool.cpp \ 38 texttool.cpp \
40 thumbnailview.cpp \ 39 thumbnailview.cpp \
41 tool.cpp 40 tool.cpp
42 INCLUDEPATH+= $(OPIEDIR)/include 41 INCLUDEPATH+= $(OPIEDIR)/include
43 DEPENDPATH+= $(OPIEDIR)/include 42 DEPENDPATH+= $(OPIEDIR)/include
44 LIBS += -lqpe -lopie 43 LIBS += -lqpe -lopie
45 DESTDIR = $(OPIEDIR)/bin 44
46 TARGET = drawpad 45 TARGET = drawpad
47 46
48TRANSLATIONS = ../../../i18n/de/drawpad.ts \ 47TRANSLATIONS = ../../../i18n/de/drawpad.ts \
49 ../../../i18n/nl/drawpad.ts \ 48 ../../../i18n/nl/drawpad.ts \
50 ../../../i18n/da/drawpad.ts \ 49 ../../../i18n/da/drawpad.ts \
51 ../../../i18n/xx/drawpad.ts \ 50 ../../../i18n/xx/drawpad.ts \
52 ../../../i18n/en/drawpad.ts \ 51 ../../../i18n/en/drawpad.ts \
53 ../../../i18n/es/drawpad.ts \ 52 ../../../i18n/es/drawpad.ts \
@@ -59,11 +58,9 @@ TRANSLATIONS = ../../../i18n/de/drawpad.ts \
59 ../../../i18n/pl/drawpad.ts \ 58 ../../../i18n/pl/drawpad.ts \
60 ../../../i18n/pt/drawpad.ts \ 59 ../../../i18n/pt/drawpad.ts \
61 ../../../i18n/pt_BR/drawpad.ts \ 60 ../../../i18n/pt_BR/drawpad.ts \
62 ../../../i18n/sl/drawpad.ts \ 61 ../../../i18n/sl/drawpad.ts \
63 ../../../i18n/zh_CN/drawpad.ts \ 62 ../../../i18n/zh_CN/drawpad.ts \
64 ../../../i18n/it/drawpad.ts \ 63 ../../../i18n/it/drawpad.ts \
65 ../../../i18n/zh_TW/drawpad.ts 64 ../../../i18n/zh_TW/drawpad.ts
66 65
67
68
69include ( $(OPIEDIR)/include.pro ) 66include ( $(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
@@ -9,19 +9,11 @@
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 * * 11 * *
12 ***************************************************************************/ 12 ***************************************************************************/
13 13
14#include "drawpad.h" 14#include "drawpad.h"
15 15
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <opie/oapplicationfactory.h>
17 18
18int main(int argc, char **argv) 19OPIE_EXPORT_APP( OApplicationFactory<DrawPad> )
19{
20 QPEApplication a(argc, argv);
21
22 DrawPad mw; // = new DrawPad();;
23 a.showMainWidget(&mw );
24 mw.finishStartup();
25
26 return a.exec();
27}