author | drw <drw> | 2004-03-02 21:03:59 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-02 21:03:59 (UTC) |
commit | 0a67659dce57ac1475841838369e924f2441e991 (patch) (unidiff) | |
tree | 394d6b89ba3262033e481020953196123399492a /noncore | |
parent | 9631067183b4cafa2ea07d2202bf88f4d42c35e2 (diff) | |
download | opie-0a67659dce57ac1475841838369e924f2441e991.zip opie-0a67659dce57ac1475841838369e924f2441e991.tar.gz opie-0a67659dce57ac1475841838369e924f2441e991.tar.bz2 |
DrawPad: libopie -> libopie2
-rw-r--r-- | noncore/graphics/drawpad/config.in | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 10 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 3 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.pro | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/exportdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 8 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.h | 7 | ||||
-rw-r--r-- | noncore/graphics/drawpad/main.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/opie-drawpad.control | 2 |
9 files changed, 21 insertions, 21 deletions
diff --git a/noncore/graphics/drawpad/config.in b/noncore/graphics/drawpad/config.in index 290a642..3ed03a4 100644 --- a/noncore/graphics/drawpad/config.in +++ b/noncore/graphics/drawpad/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config DRAWPAD | 1 | config DRAWPAD |
2 | boolean "opie-drawpad (take simple notes or draw images)" | 2 | boolean "opie-drawpad (take simple notes or draw images)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQTAUX |
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 9f0e27f..55b23cc 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp | |||
@@ -9,67 +9,67 @@ | |||
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 "drawpadcanvas.h" | 16 | #include "drawpadcanvas.h" |
17 | #include "ellipsetool.h" | 17 | #include "ellipsetool.h" |
18 | #include "erasetool.h" | 18 | #include "erasetool.h" |
19 | #include "exportdialog.h" | 19 | #include "exportdialog.h" |
20 | #include "filledellipsetool.h" | 20 | #include "filledellipsetool.h" |
21 | #include "filledrectangletool.h" | 21 | #include "filledrectangletool.h" |
22 | #include "filltool.h" | 22 | #include "filltool.h" |
23 | #include "importdialog.h" | 23 | #include "importdialog.h" |
24 | #include "linetool.h" | 24 | #include "linetool.h" |
25 | #include "newpagedialog.h" | 25 | #include "newpagedialog.h" |
26 | #include "page.h" | 26 | #include "page.h" |
27 | #include "pageinformationdialog.h" | 27 | #include "pageinformationdialog.h" |
28 | #include "pointtool.h" | 28 | #include "pointtool.h" |
29 | #include "rectangletool.h" | 29 | #include "rectangletool.h" |
30 | #include "texttool.h" | 30 | #include "texttool.h" |
31 | #include "thumbnailview.h" | 31 | #include "thumbnailview.h" |
32 | 32 | ||
33 | #include <opie/colordialog.h> | 33 | #include <opie2/qcolordialog.h> |
34 | #include <opie/colorpopupmenu.h> | 34 | #include <opie2/ocolorpopupmenu.h> |
35 | 35 | ||
36 | #include <qpe/applnk.h> | 36 | #include <qpe/applnk.h> |
37 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
38 | #include <qpe/qpetoolbar.h> | 38 | #include <qpe/qpetoolbar.h> |
39 | #include <qpe/resource.h> | 39 | #include <qpe/resource.h> |
40 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
41 | 41 | ||
42 | #include <qmenubar.h> | 42 | #include <qmenubar.h> |
43 | #include <qaction.h> | 43 | #include <qaction.h> |
44 | #include <qfile.h> | 44 | #include <qfile.h> |
45 | #include <qmessagebox.h> | 45 | #include <qmessagebox.h> |
46 | #include <qspinbox.h> | 46 | #include <qspinbox.h> |
47 | #include <qtoolbutton.h> | 47 | #include <qtoolbutton.h> |
48 | #include <qtooltip.h> | 48 | #include <qtooltip.h> |
49 | #include <qwhatsthis.h> | 49 | #include <qwhatsthis.h> |
50 | 50 | ||
51 | DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) | 51 | DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) |
52 | : QMainWindow(parent, name, WStyle_ContextHelp) | 52 | : QMainWindow(parent, name, WStyle_ContextHelp) |
53 | { | 53 | { |
54 | // init members | 54 | // init members |
55 | 55 | ||
56 | m_pDrawPadCanvas = new DrawPadCanvas(this, this); | 56 | m_pDrawPadCanvas = new DrawPadCanvas(this, this); |
57 | 57 | ||
58 | connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView())); | 58 | connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView())); |
59 | 59 | ||
60 | setCentralWidget(m_pDrawPadCanvas); | 60 | setCentralWidget(m_pDrawPadCanvas); |
61 | 61 | ||
62 | // init menu | 62 | // init menu |
63 | 63 | ||
64 | setToolBarsMovable(false); | 64 | setToolBarsMovable(false); |
65 | 65 | ||
66 | QToolBar* menuToolBar = new QToolBar(this); | 66 | QToolBar* menuToolBar = new QToolBar(this); |
67 | QMenuBar* menuBar = new QMenuBar(menuToolBar); | 67 | QMenuBar* menuBar = new QMenuBar(menuToolBar); |
68 | 68 | ||
69 | QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar); | 69 | QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar); |
70 | 70 | ||
71 | QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this); | 71 | QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this); |
72 | connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll())); | 72 | connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll())); |
73 | deleteAllAction->addTo(toolsPopupMenu); | 73 | deleteAllAction->addTo(toolsPopupMenu); |
74 | 74 | ||
75 | toolsPopupMenu->insertSeparator(); | 75 | toolsPopupMenu->insertSeparator(); |
@@ -234,62 +234,62 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) | |||
234 | setRectangleTool(); | 234 | setRectangleTool(); |
235 | setEllipseTool(); | 235 | setEllipseTool(); |
236 | setPointTool(); | 236 | setPointTool(); |
237 | 237 | ||
238 | emptyToolBar = new QToolBar(this); | 238 | emptyToolBar = new QToolBar(this); |
239 | emptyToolBar->setHorizontalStretchable(true); | 239 | emptyToolBar->setHorizontalStretchable(true); |
240 | emptyToolBar->addSeparator(); | 240 | emptyToolBar->addSeparator(); |
241 | 241 | ||
242 | // init draw parameters toolbar | 242 | // init draw parameters toolbar |
243 | 243 | ||
244 | QToolBar* drawParametersToolBar = new QToolBar(this); | 244 | QToolBar* drawParametersToolBar = new QToolBar(this); |
245 | 245 | ||
246 | m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); | 246 | m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); |
247 | connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); | 247 | connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); |
248 | 248 | ||
249 | QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); | 249 | QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); |
250 | m_pPenWidthSpinBox->setValue(1); | 250 | m_pPenWidthSpinBox->setValue(1); |
251 | m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); | 251 | m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); |
252 | QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) ); | 252 | QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) ); |
253 | 253 | ||
254 | m_pPenColorToolButton = new QToolButton(drawParametersToolBar); | 254 | m_pPenColorToolButton = new QToolButton(drawParametersToolBar); |
255 | m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); | 255 | m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); |
256 | QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); | 256 | QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); |
257 | 257 | ||
258 | OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, m_pPenColorToolButton); | 258 | Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, m_pPenColorToolButton); |
259 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); | 259 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); |
260 | 260 | ||
261 | QToolTip::add(m_pPenColorToolButton, tr("Pen Color")); | 261 | QToolTip::add(m_pPenColorToolButton, tr("Pen Color")); |
262 | m_pPenColorToolButton->setPopup(penColorPopupMenu); | 262 | m_pPenColorToolButton->setPopup(penColorPopupMenu); |
263 | m_pPenColorToolButton->setPopupDelay(0); | 263 | m_pPenColorToolButton->setPopupDelay(0); |
264 | 264 | ||
265 | changePenColor(Qt::black); | 265 | changePenColor(Qt::black); |
266 | 266 | ||
267 | m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); | 267 | m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); |
268 | m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); | 268 | m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); |
269 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); | 269 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); |
270 | 270 | ||
271 | OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton); | 271 | Opie::OColorPopupMenu* brushColorPopupMenu = new Opie::OColorPopupMenu(Qt::white, m_pBrushColorToolButton); |
272 | connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); | 272 | connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); |
273 | 273 | ||
274 | QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); | 274 | QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); |
275 | m_pBrushColorToolButton->setPopup(brushColorPopupMenu); | 275 | m_pBrushColorToolButton->setPopup(brushColorPopupMenu); |
276 | m_pBrushColorToolButton->setPopupDelay(0); | 276 | m_pBrushColorToolButton->setPopupDelay(0); |
277 | 277 | ||
278 | changeBrushColor(Qt::white); | 278 | changeBrushColor(Qt::white); |
279 | 279 | ||
280 | finishStartup(); | 280 | finishStartup(); |
281 | } | 281 | } |
282 | 282 | ||
283 | 283 | ||
284 | void DrawPad::finishStartup() | 284 | void DrawPad::finishStartup() |
285 | { | 285 | { |
286 | // init pages | 286 | // init pages |
287 | 287 | ||
288 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); | 288 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); |
289 | 289 | ||
290 | if (file.open(IO_ReadOnly)) { | 290 | if (file.open(IO_ReadOnly)) { |
291 | m_pDrawPadCanvas->load(&file); | 291 | m_pDrawPadCanvas->load(&file); |
292 | file.close(); | 292 | file.close(); |
293 | } else { | 293 | } else { |
294 | m_pDrawPadCanvas->initialPage(); | 294 | m_pDrawPadCanvas->initialPage(); |
295 | } | 295 | } |
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h index 48d5225..8ba6e58 100644 --- a/noncore/graphics/drawpad/drawpad.h +++ b/noncore/graphics/drawpad/drawpad.h | |||
@@ -1,89 +1,88 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * DrawPad - a drawing program for Opie Environment * | 3 | * DrawPad - a drawing program for Opie Environment * |
4 | * * | 4 | * * |
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | 5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * |
6 | * * | 6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
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 | #ifndef DRAWPAD_H | 14 | #ifndef DRAWPAD_H |
15 | #define DRAWPAD_H | 15 | #define DRAWPAD_H |
16 | 16 | ||
17 | #include <qmainwindow.h> | 17 | #include <qmainwindow.h> |
18 | |||
19 | #include <qpen.h> | 18 | #include <qpen.h> |
20 | 19 | ||
21 | class DrawPadCanvas; | 20 | class DrawPadCanvas; |
22 | class Tool; | 21 | class Tool; |
23 | 22 | ||
24 | class QAction; | 23 | class QAction; |
25 | class QColor; | 24 | class QColor; |
26 | class QSpinBox; | 25 | class QSpinBox; |
27 | class QToolButton; | 26 | class QToolButton; |
28 | class QWidgetStack; | 27 | class QWidgetStack; |
29 | 28 | ||
30 | class DrawPad : public QMainWindow | 29 | class DrawPad : public QMainWindow |
31 | { | 30 | { |
32 | Q_OBJECT | 31 | Q_OBJECT |
33 | 32 | ||
34 | public: | 33 | public: |
35 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 34 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); |
36 | ~DrawPad(); | 35 | ~DrawPad(); |
37 | 36 | ||
38 | static QString appName() { return QString::fromLatin1("drawpad"); } | 37 | static QString appName() { return QString::fromLatin1("drawpad"); } |
39 | 38 | ||
40 | Tool* tool() { return m_pTool; } | 39 | Tool* tool() { return m_pTool; } |
41 | QPen pen() { return m_pen; } | 40 | QPen pen() { return m_pen; } |
42 | QBrush brush() { return m_brush; } | 41 | QBrush brush() { return m_brush; } |
43 | 42 | ||
44 | bool antiAliasing(); | 43 | bool antiAliasing(); |
45 | void finishStartup(); | 44 | void finishStartup(); |
46 | 45 | ||
47 | private slots: | 46 | private slots: |
48 | void newPage(); | 47 | void newPage(); |
49 | void clearPage(); | 48 | void clearPage(); |
50 | void deletePage(); | 49 | void deletePage(); |
51 | 50 | ||
52 | void setPointTool(); | 51 | void setPointTool(); |
53 | void setLineTool(); | 52 | void setLineTool(); |
54 | void setRectangleTool(); | 53 | void setRectangleTool(); |
55 | void setFilledRectangleTool(); | 54 | void setFilledRectangleTool(); |
56 | void setEllipseTool(); | 55 | void setEllipseTool(); |
57 | void setFilledEllipseTool(); | 56 | void setFilledEllipseTool(); |
58 | void setTextTool(); | 57 | void setTextTool(); |
59 | void setFillTool(); | 58 | void setFillTool(); |
60 | void setEraseTool(); | 59 | void setEraseTool(); |
61 | 60 | ||
62 | void changePenWidth(int value); | 61 | void changePenWidth(int value); |
63 | void changePenColor(const QColor& color); | 62 | void changePenColor(const QColor& color); |
64 | void changeBrushColor(const QColor& color); | 63 | void changeBrushColor(const QColor& color); |
65 | 64 | ||
66 | void updateView(); | 65 | void updateView(); |
67 | 66 | ||
68 | void deleteAll(); | 67 | void deleteAll(); |
69 | void importPage(); | 68 | void importPage(); |
70 | void exportPage(); | 69 | void exportPage(); |
71 | void thumbnailView(); | 70 | void thumbnailView(); |
72 | void pageInformation(); | 71 | void pageInformation(); |
73 | 72 | ||
74 | private: | 73 | private: |
75 | void loadConfig(); | 74 | void loadConfig(); |
76 | void saveConfig(); | 75 | void saveConfig(); |
77 | 76 | ||
78 | DrawPadCanvas* m_pDrawPadCanvas; | 77 | DrawPadCanvas* m_pDrawPadCanvas; |
79 | 78 | ||
80 | Tool* m_pTool; | 79 | Tool* m_pTool; |
81 | QPen m_pen; | 80 | QPen m_pen; |
82 | QBrush m_brush; | 81 | QBrush m_brush; |
83 | 82 | ||
84 | QAction* m_pAntiAliasingAction; | 83 | QAction* m_pAntiAliasingAction; |
85 | 84 | ||
86 | QAction* m_pUndoAction; | 85 | QAction* m_pUndoAction; |
87 | QAction* m_pRedoAction; | 86 | QAction* m_pRedoAction; |
88 | 87 | ||
89 | QAction* m_pFirstPageAction; | 88 | QAction* m_pFirstPageAction; |
diff --git a/noncore/graphics/drawpad/drawpad.pro b/noncore/graphics/drawpad/drawpad.pro index 30b2199..5e6ca6b 100644 --- a/noncore/graphics/drawpad/drawpad.pro +++ b/noncore/graphics/drawpad/drawpad.pro | |||
@@ -19,29 +19,29 @@ HEADERS = drawpad.h \ | |||
19 | thumbnailview.h \ | 19 | thumbnailview.h \ |
20 | tool.h | 20 | tool.h |
21 | SOURCES = drawpad.cpp \ | 21 | SOURCES = drawpad.cpp \ |
22 | drawpadcanvas.cpp \ | 22 | drawpadcanvas.cpp \ |
23 | ellipsetool.cpp \ | 23 | ellipsetool.cpp \ |
24 | erasetool.cpp \ | 24 | erasetool.cpp \ |
25 | exportdialog.cpp \ | 25 | exportdialog.cpp \ |
26 | filltool.cpp \ | 26 | filltool.cpp \ |
27 | filledellipsetool.cpp \ | 27 | filledellipsetool.cpp \ |
28 | filledrectangletool.cpp \ | 28 | filledrectangletool.cpp \ |
29 | importdialog.cpp \ | 29 | importdialog.cpp \ |
30 | linetool.cpp \ | 30 | linetool.cpp \ |
31 | main.cpp \ | 31 | main.cpp \ |
32 | newpagedialog.cpp \ | 32 | newpagedialog.cpp \ |
33 | page.cpp \ | 33 | page.cpp \ |
34 | pageinformationdialog.cpp \ | 34 | pageinformationdialog.cpp \ |
35 | pointtool.cpp \ | 35 | pointtool.cpp \ |
36 | rectangletool.cpp \ | 36 | rectangletool.cpp \ |
37 | shapetool.cpp \ | 37 | shapetool.cpp \ |
38 | texttool.cpp \ | 38 | texttool.cpp \ |
39 | thumbnailview.cpp \ | 39 | thumbnailview.cpp \ |
40 | tool.cpp | 40 | tool.cpp |
41 | INCLUDEPATH+= $(OPIEDIR)/include | 41 | INCLUDEPATH+= $(OPIEDIR)/include |
42 | DEPENDPATH+= $(OPIEDIR)/include | 42 | DEPENDPATH+= $(OPIEDIR)/include |
43 | LIBS += -lqpe -lopie | 43 | LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 |
44 | 44 | ||
45 | TARGET = drawpad | 45 | TARGET = drawpad |
46 | 46 | ||
47 | include ( $(OPIEDIR)/include.pro ) | 47 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/graphics/drawpad/exportdialog.cpp b/noncore/graphics/drawpad/exportdialog.cpp index d63f428..169acef 100644 --- a/noncore/graphics/drawpad/exportdialog.cpp +++ b/noncore/graphics/drawpad/exportdialog.cpp | |||
@@ -1,40 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * DrawPad - a drawing program for Opie Environment * | 3 | * DrawPad - a drawing program for Opie Environment * |
4 | * * | 4 | * * |
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | 5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * |
6 | * * | 6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
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 "exportdialog.h" | 14 | #include "exportdialog.h" |
15 | 15 | ||
16 | #include <opie/ofileselector.h> | 16 | #include <opie2/ofileselector.h> |
17 | 17 | ||
18 | #include <qbuttongroup.h> | 18 | #include <qbuttongroup.h> |
19 | #include <qcombobox.h> | 19 | #include <qcombobox.h> |
20 | #include <qimage.h> | 20 | #include <qimage.h> |
21 | #include <qlabel.h> | 21 | #include <qlabel.h> |
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | #include <qlineedit.h> | 23 | #include <qlineedit.h> |
24 | #include <qradiobutton.h> | 24 | #include <qradiobutton.h> |
25 | #include <qspinbox.h> | 25 | #include <qspinbox.h> |
26 | 26 | ||
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | 28 | ||
29 | ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const char* name) | 29 | ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const char* name) |
30 | : QDialog(parent, name, true) | 30 | : QDialog(parent, name, true) |
31 | { | 31 | { |
32 | setCaption(tr("DrawPad - Export")); | 32 | setCaption(tr("DrawPad - Export")); |
33 | 33 | ||
34 | m_pageAt = pageAt; | 34 | m_pageAt = pageAt; |
35 | m_pageCount = pageCount; | 35 | m_pageCount = pageCount; |
36 | 36 | ||
37 | QButtonGroup* selectionButtonGroup = new QButtonGroup(0, Qt::Vertical, tr("Page Selection"), this); | 37 | QButtonGroup* selectionButtonGroup = new QButtonGroup(0, Qt::Vertical, tr("Page Selection"), this); |
38 | connect(selectionButtonGroup, SIGNAL(pressed(int)), this, SLOT(selectionChanged(int))); | 38 | connect(selectionButtonGroup, SIGNAL(pressed(int)), this, SLOT(selectionChanged(int))); |
39 | 39 | ||
40 | QRadioButton* selectAllRadioButton = new QRadioButton(tr("All"), selectionButtonGroup); | 40 | QRadioButton* selectAllRadioButton = new QRadioButton(tr("All"), selectionButtonGroup); |
@@ -45,50 +45,50 @@ ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const c | |||
45 | 45 | ||
46 | m_pFromPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); | 46 | m_pFromPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); |
47 | connect(m_pFromPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(fromPageChanged(int))); | 47 | connect(m_pFromPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(fromPageChanged(int))); |
48 | 48 | ||
49 | m_pToPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); | 49 | m_pToPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); |
50 | connect(m_pToPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(toPageChanged(int))); | 50 | connect(m_pToPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(toPageChanged(int))); |
51 | 51 | ||
52 | selectionButtonGroup->setButton(1); | 52 | selectionButtonGroup->setButton(1); |
53 | selectionChanged(1); | 53 | selectionChanged(1); |
54 | 54 | ||
55 | m_pFromPageSpinBox->setValue(pageAt); | 55 | m_pFromPageSpinBox->setValue(pageAt); |
56 | m_pToPageSpinBox->setValue(pageAt); | 56 | m_pToPageSpinBox->setValue(pageAt); |
57 | 57 | ||
58 | QGroupBox* exportGroupBox = new QGroupBox(0, Qt::Vertical, tr("Export As"), this); | 58 | QGroupBox* exportGroupBox = new QGroupBox(0, Qt::Vertical, tr("Export As"), this); |
59 | 59 | ||
60 | QLabel* nameLabel = new QLabel(tr("Name:"), exportGroupBox); | 60 | QLabel* nameLabel = new QLabel(tr("Name:"), exportGroupBox); |
61 | QLabel* formatLabel = new QLabel(tr("Format:"), exportGroupBox); | 61 | QLabel* formatLabel = new QLabel(tr("Format:"), exportGroupBox); |
62 | 62 | ||
63 | m_pNameLineEdit = new QLineEdit(exportGroupBox); | 63 | m_pNameLineEdit = new QLineEdit(exportGroupBox); |
64 | 64 | ||
65 | m_pFormatComboBox = new QComboBox(exportGroupBox); | 65 | m_pFormatComboBox = new QComboBox(exportGroupBox); |
66 | m_pFormatComboBox->insertStrList(QImageIO::outputFormats()); | 66 | m_pFormatComboBox->insertStrList(QImageIO::outputFormats()); |
67 | 67 | ||
68 | MimeTypes types; types.insert( tr("All Images"), "image/*" ); | 68 | MimeTypes types; types.insert( tr("All Images"), "image/*" ); |
69 | OFileSelector* fileSelector = new OFileSelector(this, OFileSelector::FileSelector, | 69 | Opie::OFileSelector* fileSelector = new Opie::OFileSelector(this, Opie::OFileSelector::FileSelector, |
70 | OFileSelector::Normal, | 70 | Opie::OFileSelector::Normal, |
71 | QString::null, QString::null, | 71 | QString::null, QString::null, |
72 | types ); | 72 | types ); |
73 | fileSelector->setNameVisible( false ); | 73 | fileSelector->setNameVisible( false ); |
74 | 74 | ||
75 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); | 75 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); |
76 | selectionButtonGroup->layout()->setSpacing(4); | 76 | selectionButtonGroup->layout()->setSpacing(4); |
77 | exportGroupBox->layout()->setSpacing(4); | 77 | exportGroupBox->layout()->setSpacing(4); |
78 | QGridLayout* selectionLayout = new QGridLayout(selectionButtonGroup->layout(), 2, 2); | 78 | QGridLayout* selectionLayout = new QGridLayout(selectionButtonGroup->layout(), 2, 2); |
79 | QHBoxLayout* rangeLayout = new QHBoxLayout(); | 79 | QHBoxLayout* rangeLayout = new QHBoxLayout(); |
80 | QGridLayout* exportLayout = new QGridLayout(exportGroupBox->layout(), 2, 2); | 80 | QGridLayout* exportLayout = new QGridLayout(exportGroupBox->layout(), 2, 2); |
81 | 81 | ||
82 | selectionLayout->addWidget(selectAllRadioButton, 0, 0); | 82 | selectionLayout->addWidget(selectAllRadioButton, 0, 0); |
83 | selectionLayout->addWidget(selectCurrentRadioButton, 1, 0); | 83 | selectionLayout->addWidget(selectCurrentRadioButton, 1, 0); |
84 | selectionLayout->addWidget(selectRangeRadioButton, 0, 1); | 84 | selectionLayout->addWidget(selectRangeRadioButton, 0, 1); |
85 | selectionLayout->addLayout(rangeLayout, 1, 1); | 85 | selectionLayout->addLayout(rangeLayout, 1, 1); |
86 | 86 | ||
87 | rangeLayout->addWidget(m_pFromPageSpinBox); | 87 | rangeLayout->addWidget(m_pFromPageSpinBox); |
88 | rangeLayout->addWidget(toLabel); | 88 | rangeLayout->addWidget(toLabel); |
89 | rangeLayout->addWidget(m_pToPageSpinBox); | 89 | rangeLayout->addWidget(m_pToPageSpinBox); |
90 | 90 | ||
91 | exportLayout->addWidget(nameLabel, 0, 0); | 91 | exportLayout->addWidget(nameLabel, 0, 0); |
92 | exportLayout->addWidget(formatLabel, 1, 0); | 92 | exportLayout->addWidget(formatLabel, 1, 0); |
93 | 93 | ||
94 | exportLayout->addWidget(m_pNameLineEdit, 0, 1); | 94 | exportLayout->addWidget(m_pNameLineEdit, 0, 1); |
diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index ce2e7ee..4fc0a0e 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp | |||
@@ -1,56 +1,56 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * DrawPad - a drawing program for Opie Environment * | 3 | * DrawPad - a drawing program for Opie Environment * |
4 | * * | 4 | * * |
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | 5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * |
6 | * * | 6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
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 "importdialog.h" | 14 | #include "importdialog.h" |
15 | 15 | ||
16 | #include <opie/ofileselector.h> | 16 | #include <qpe/mimetype.h> |
17 | 17 | ||
18 | #include <qcheckbox.h> | 18 | #include <qcheckbox.h> |
19 | #include <qimage.h> | 19 | #include <qimage.h> |
20 | #include <qlabel.h> | 20 | #include <qlabel.h> |
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
23 | 23 | ||
24 | ImportDialog::ImportDialog(QWidget* parent, const char* name) | 24 | ImportDialog::ImportDialog(QWidget* parent, const char* name) |
25 | : QDialog(parent, name, true) | 25 | : QDialog(parent, name, true) |
26 | { | 26 | { |
27 | setCaption(tr("DrawPad - Import")); | 27 | setCaption(tr("DrawPad - Import")); |
28 | 28 | ||
29 | MimeTypes types; types.insert( tr("All images"),"image/*" ); | 29 | MimeTypes types; types.insert( tr("All images"),"image/*" ); |
30 | m_pFileSelector = new OFileSelector(this, | 30 | m_pFileSelector = new Opie::OFileSelector(this, |
31 | OFileSelector::FileSelector, | 31 | Opie::OFileSelector::FileSelector, |
32 | OFileSelector::Normal, | 32 | Opie::OFileSelector::Normal, |
33 | QString::null, | 33 | QString::null, |
34 | QString::null, types ); | 34 | QString::null, types ); |
35 | m_pFileSelector->setNameVisible( false ); | 35 | m_pFileSelector->setNameVisible( false ); |
36 | connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); | 36 | connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); |
37 | 37 | ||
38 | m_pPreviewLabel = new QLabel(this); | 38 | m_pPreviewLabel = new QLabel(this); |
39 | m_pPreviewLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken); | 39 | m_pPreviewLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
40 | m_pPreviewLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); | 40 | m_pPreviewLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); |
41 | m_pPreviewLabel->setFixedSize(114, 114); | 41 | m_pPreviewLabel->setFixedSize(114, 114); |
42 | m_pPreviewLabel->setBackgroundMode(QWidget::PaletteMid); | 42 | m_pPreviewLabel->setBackgroundMode(QWidget::PaletteMid); |
43 | 43 | ||
44 | m_pAutomaticPreviewCheckBox = new QCheckBox(tr("Automatic preview"), this); | 44 | m_pAutomaticPreviewCheckBox = new QCheckBox(tr("Automatic preview"), this); |
45 | m_pAutomaticPreviewCheckBox->setChecked(true); | 45 | m_pAutomaticPreviewCheckBox->setChecked(true); |
46 | 46 | ||
47 | QPushButton* previewPushButton = new QPushButton(tr("Preview"), this); | 47 | QPushButton* previewPushButton = new QPushButton(tr("Preview"), this); |
48 | connect(previewPushButton, SIGNAL(clicked()), this, SLOT(preview())); | 48 | connect(previewPushButton, SIGNAL(clicked()), this, SLOT(preview())); |
49 | 49 | ||
50 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); | 50 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); |
51 | QHBoxLayout* previewLayout = new QHBoxLayout(4); | 51 | QHBoxLayout* previewLayout = new QHBoxLayout(4); |
52 | QVBoxLayout* previewSecondLayout = new QVBoxLayout(4); | 52 | QVBoxLayout* previewSecondLayout = new QVBoxLayout(4); |
53 | 53 | ||
54 | previewSecondLayout->addWidget(m_pAutomaticPreviewCheckBox); | 54 | previewSecondLayout->addWidget(m_pAutomaticPreviewCheckBox); |
55 | previewSecondLayout->addWidget(previewPushButton); | 55 | previewSecondLayout->addWidget(previewPushButton); |
56 | previewSecondLayout->addStretch(); | 56 | previewSecondLayout->addStretch(); |
diff --git a/noncore/graphics/drawpad/importdialog.h b/noncore/graphics/drawpad/importdialog.h index ed655a5..16227d2 100644 --- a/noncore/graphics/drawpad/importdialog.h +++ b/noncore/graphics/drawpad/importdialog.h | |||
@@ -1,45 +1,46 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * DrawPad - a drawing program for Opie Environment * | 3 | * DrawPad - a drawing program for Opie Environment * |
4 | * * | 4 | * * |
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | 5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * |
6 | * * | 6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
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 | #ifndef IMPORTDIALOG_H | 14 | #ifndef IMPORTDIALOG_H |
15 | #define IMPORTDIALOG_H | 15 | #define IMPORTDIALOG_H |
16 | 16 | ||
17 | #include <opie2/ofileselector.h> | ||
18 | |||
17 | #include <qdialog.h> | 19 | #include <qdialog.h> |
18 | 20 | ||
19 | class DocLnk; | 21 | class DocLnk; |
20 | class OFileSelector; | ||
21 | 22 | ||
22 | class QCheckBox; | 23 | class QCheckBox; |
23 | class QLabel; | 24 | class QLabel; |
24 | 25 | ||
25 | class ImportDialog : public QDialog | 26 | class ImportDialog : public QDialog |
26 | { | 27 | { |
27 | Q_OBJECT | 28 | Q_OBJECT |
28 | 29 | ||
29 | public: | 30 | public: |
30 | ImportDialog(QWidget* parent = 0, const char* name = 0); | 31 | ImportDialog(QWidget* parent = 0, const char* name = 0); |
31 | ~ImportDialog(); | 32 | ~ImportDialog(); |
32 | 33 | ||
33 | const DocLnk* selected(); | 34 | const DocLnk* selected(); |
34 | 35 | ||
35 | private slots: | 36 | private slots: |
36 | void fileChanged(); | 37 | void fileChanged(); |
37 | void preview(); | 38 | void preview(); |
38 | 39 | ||
39 | private: | 40 | private: |
40 | OFileSelector* m_pFileSelector; | 41 | Opie::OFileSelector* m_pFileSelector; |
41 | QLabel* m_pPreviewLabel; | 42 | QLabel* m_pPreviewLabel; |
42 | QCheckBox* m_pAutomaticPreviewCheckBox; | 43 | QCheckBox* m_pAutomaticPreviewCheckBox; |
43 | }; | 44 | }; |
44 | 45 | ||
45 | #endif // IMPORTDIALOG_H | 46 | #endif // IMPORTDIALOG_H |
diff --git a/noncore/graphics/drawpad/main.cpp b/noncore/graphics/drawpad/main.cpp index c87cc0f..a6c666b 100644 --- a/noncore/graphics/drawpad/main.cpp +++ b/noncore/graphics/drawpad/main.cpp | |||
@@ -1,18 +1,18 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * DrawPad - a drawing program for Opie Environment * | 3 | * DrawPad - a drawing program for Opie Environment * |
4 | * * | 4 | * * |
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | 5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * |
6 | * * | 6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
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 <opie/oapplicationfactory.h> | 16 | #include <opie2/oapplicationfactory.h> |
17 | 17 | ||
18 | OPIE_EXPORT_APP( OApplicationFactory<DrawPad> ) | 18 | OPIE_EXPORT_APP( OApplicationFactory<DrawPad> ) |
diff --git a/noncore/graphics/drawpad/opie-drawpad.control b/noncore/graphics/drawpad/opie-drawpad.control index f0aa0b4..2a403f9 100644 --- a/noncore/graphics/drawpad/opie-drawpad.control +++ b/noncore/graphics/drawpad/opie-drawpad.control | |||
@@ -1,12 +1,12 @@ | |||
1 | Package: opie-drawpad | 1 | Package: opie-drawpad |
2 | Files: plugins/application/libdrawpad.so* bin/drawpad apps/1Pim/drawpad.desktop pics/drawpad | 2 | Files: plugins/application/libdrawpad.so* bin/drawpad apps/1Pim/drawpad.desktop pics/drawpad |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/pim | 4 | Section: opie/pim |
5 | Maintainer: Sébastien Prud'homme <prudhomme@laposte.net> | 5 | Maintainer: Sébastien Prud'homme <prudhomme@laposte.net> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, libopie1 | 7 | Depends: task-opie-minimal, libopiecore2, libopieui2, libqtaux2 |
8 | Description: A note taking program with basic draw tools | 8 | Description: A note taking program with basic draw tools |
9 | DrawPad is an easy note taking program for Zaurus. It can also | 9 | DrawPad is an easy note taking program for Zaurus. It can also |
10 | be used to draw simple images. DrawPad was developed for the Opie | 10 | be used to draw simple images. DrawPad was developed for the Opie |
11 | project, an alternative to the standard Zaurus environment. | 11 | project, an alternative to the standard Zaurus environment. |
12 | Version: $QPE_VERSION$EXTRAVERSION | 12 | Version: $QPE_VERSION$EXTRAVERSION |