-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 6 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 1 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.cpp | 20 | ||||
-rw-r--r-- | noncore/graphics/drawpad/exportdialog.cpp | 11 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 14 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.h | 4 | ||||
-rw-r--r-- | noncore/graphics/drawpad/main.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/opie-drawpad.control | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/texttool.h | 1 |
9 files changed, 44 insertions, 17 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 4db6208..aac6bc1 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp | |||
@@ -279,4 +279,9 @@ DrawPad::DrawPad(QWidget* parent, const char* name) | |||
279 | changeBrushColor(Qt::white); | 279 | changeBrushColor(Qt::white); |
280 | 280 | ||
281 | } | ||
282 | |||
283 | |||
284 | void DrawPad::finishStartup() | ||
285 | { | ||
281 | // init pages | 286 | // init pages |
282 | 287 | ||
@@ -291,4 +296,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name) | |||
291 | 296 | ||
292 | loadConfig(); | 297 | loadConfig(); |
298 | |||
293 | } | 299 | } |
294 | 300 | ||
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h index 7306228..2cae700 100644 --- a/noncore/graphics/drawpad/drawpad.h +++ b/noncore/graphics/drawpad/drawpad.h | |||
@@ -41,4 +41,5 @@ public: | |||
41 | 41 | ||
42 | bool antiAliasing(); | 42 | bool antiAliasing(); |
43 | void finishStartup(); | ||
43 | 44 | ||
44 | private slots: | 45 | private slots: |
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp index 025bebb..dec498b 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.cpp +++ b/noncore/graphics/drawpad/drawpadcanvas.cpp | |||
@@ -183,5 +183,7 @@ void DrawPadCanvas::load(QIODevice* ioDevice) | |||
183 | 183 | ||
184 | if (m_pages.isEmpty()) { | 184 | if (m_pages.isEmpty()) { |
185 | m_pages.append(new Page("", contentsRect().size())); | 185 | m_pages.append(new Page("", |
186 | clipper()->width()+(verticalScrollBar()->isVisible()?verticalScrollBar()->width():0), | ||
187 | clipper()->height()+(horizontalScrollBar()->isVisible()?horizontalScrollBar()->height():0))); | ||
186 | m_pages.current()->pixmap()->fill(Qt::white); | 188 | m_pages.current()->pixmap()->fill(Qt::white); |
187 | } | 189 | } |
@@ -195,5 +197,9 @@ void DrawPadCanvas::load(QIODevice* ioDevice) | |||
195 | void DrawPadCanvas::initialPage() | 197 | void DrawPadCanvas::initialPage() |
196 | { | 198 | { |
197 | m_pages.append(new Page("", 236, 232)); | 199 | m_pages.append(new Page("", |
200 | clipper()->width()+(verticalScrollBar()->isVisible()?verticalScrollBar()->width():0), | ||
201 | clipper()->height()+(horizontalScrollBar()->isVisible()?horizontalScrollBar()->height():0))); | ||
202 | //236, 232)); no more fixed sizes | ||
203 | |||
198 | m_pages.current()->pixmap()->fill(Qt::white); | 204 | m_pages.current()->pixmap()->fill(Qt::white); |
199 | 205 | ||
@@ -350,5 +356,8 @@ void DrawPadCanvas::deleteAll() | |||
350 | m_pages.clear(); | 356 | m_pages.clear(); |
351 | 357 | ||
352 | m_pages.append(new Page("", contentsRect().size())); | 358 | m_pages.append(new Page("", |
359 | clipper()->width()+(verticalScrollBar()->isVisible()?verticalScrollBar()->width():0), | ||
360 | clipper()->height()+(horizontalScrollBar()->isVisible()?horizontalScrollBar()->height():0))); | ||
361 | |||
353 | m_pages.current()->pixmap()->fill(Qt::white); | 362 | m_pages.current()->pixmap()->fill(Qt::white); |
354 | 363 | ||
@@ -383,5 +392,8 @@ void DrawPadCanvas::deletePage() | |||
383 | 392 | ||
384 | if (m_pages.isEmpty()) { | 393 | if (m_pages.isEmpty()) { |
385 | m_pages.append(new Page("", contentsRect().size())); | 394 | m_pages.append(new Page("", |
395 | clipper()->width()+(verticalScrollBar()->isVisible()?verticalScrollBar()->width():0), | ||
396 | clipper()->height()+(horizontalScrollBar()->isVisible()?horizontalScrollBar()->height():0))); | ||
397 | |||
386 | m_pages.current()->pixmap()->fill(Qt::white); | 398 | m_pages.current()->pixmap()->fill(Qt::white); |
387 | } | 399 | } |
diff --git a/noncore/graphics/drawpad/exportdialog.cpp b/noncore/graphics/drawpad/exportdialog.cpp index 5b11c0e..adbd612 100644 --- a/noncore/graphics/drawpad/exportdialog.cpp +++ b/noncore/graphics/drawpad/exportdialog.cpp | |||
@@ -14,5 +14,5 @@ | |||
14 | #include "exportdialog.h" | 14 | #include "exportdialog.h" |
15 | 15 | ||
16 | #include <qpe/fileselector.h> | 16 | #include <opie/ofileselector.h> |
17 | 17 | ||
18 | #include <qbuttongroup.h> | 18 | #include <qbuttongroup.h> |
@@ -67,7 +67,10 @@ ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const c | |||
67 | m_pFormatComboBox->insertStrList(QImageIO::outputFormats()); | 67 | m_pFormatComboBox->insertStrList(QImageIO::outputFormats()); |
68 | 68 | ||
69 | FileSelector* fileSelector = new FileSelector("image/*", this, "fileselector"); | 69 | MimeTypes types; types.insert( tr("All Images"), "image/*" ); |
70 | fileSelector->setNewVisible(false); | 70 | OFileSelector* fileSelector = new OFileSelector(this, OFileSelector::FileSelector, |
71 | fileSelector->setCloseVisible(false); | 71 | OFileSelector::Normal, |
72 | QString::null, QString::null, | ||
73 | types ); | ||
74 | fileSelector->setNameVisible( false ); | ||
72 | 75 | ||
73 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); | 76 | QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); |
diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index 1c447cb..9a59a20 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp | |||
@@ -15,5 +15,5 @@ | |||
15 | 15 | ||
16 | #include <qpe/applnk.h> | 16 | #include <qpe/applnk.h> |
17 | #include <qpe/fileselector.h> | 17 | #include <opie/ofileselector.h> |
18 | 18 | ||
19 | #include <qcheckbox.h> | 19 | #include <qcheckbox.h> |
@@ -28,8 +28,12 @@ ImportDialog::ImportDialog(QWidget* parent, const char* name) | |||
28 | setCaption(tr("DrawPad - Import")); | 28 | setCaption(tr("DrawPad - Import")); |
29 | 29 | ||
30 | m_pFileSelector = new FileSelector("image/*", this, "fileselector"); | 30 | MimeTypes types; types.insert( tr("All images"),"image/*" ); |
31 | m_pFileSelector = new OFileSelector(this, | ||
32 | OFileSelector::FileSelector, | ||
33 | OFileSelector::Normal, | ||
34 | QString::null, | ||
35 | QString::null, types ); | ||
36 | m_pFileSelector->setNameVisible( false ); | ||
31 | connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); | 37 | connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); |
32 | m_pFileSelector->setNewVisible(false); | ||
33 | m_pFileSelector->setCloseVisible(false); | ||
34 | 38 | ||
35 | m_pPreviewLabel = new QLabel(this); | 39 | m_pPreviewLabel = new QLabel(this); |
@@ -69,5 +73,5 @@ const DocLnk* ImportDialog::selected() | |||
69 | { | 73 | { |
70 | // FIXME change from pointer to reference -zecke | 74 | // FIXME change from pointer to reference -zecke |
71 | DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); | 75 | DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); |
72 | return lnk; | 76 | return lnk; |
73 | } | 77 | } |
diff --git a/noncore/graphics/drawpad/importdialog.h b/noncore/graphics/drawpad/importdialog.h index ef51d7c..ed655a5 100644 --- a/noncore/graphics/drawpad/importdialog.h +++ b/noncore/graphics/drawpad/importdialog.h | |||
@@ -18,5 +18,5 @@ | |||
18 | 18 | ||
19 | class DocLnk; | 19 | class DocLnk; |
20 | class FileSelector; | 20 | class OFileSelector; |
21 | 21 | ||
22 | class QCheckBox; | 22 | class QCheckBox; |
@@ -38,5 +38,5 @@ private slots: | |||
38 | 38 | ||
39 | private: | 39 | private: |
40 | FileSelector* m_pFileSelector; | 40 | OFileSelector* m_pFileSelector; |
41 | QLabel* m_pPreviewLabel; | 41 | QLabel* m_pPreviewLabel; |
42 | QCheckBox* m_pAutomaticPreviewCheckBox; | 42 | QCheckBox* m_pAutomaticPreviewCheckBox; |
diff --git a/noncore/graphics/drawpad/main.cpp b/noncore/graphics/drawpad/main.cpp index ec628cc..12f8084 100644 --- a/noncore/graphics/drawpad/main.cpp +++ b/noncore/graphics/drawpad/main.cpp | |||
@@ -22,5 +22,5 @@ int main(int argc, char **argv) | |||
22 | DrawPad mw; // = new DrawPad();; | 22 | DrawPad mw; // = new DrawPad();; |
23 | a.showMainWidget(&mw ); | 23 | a.showMainWidget(&mw ); |
24 | 24 | mw.finishStartup(); | |
25 | 25 | ||
26 | return a.exec(); | 26 | return a.exec(); |
diff --git a/noncore/graphics/drawpad/opie-drawpad.control b/noncore/graphics/drawpad/opie-drawpad.control index 1c22186..5095b52 100644 --- a/noncore/graphics/drawpad/opie-drawpad.control +++ b/noncore/graphics/drawpad/opie-drawpad.control | |||
@@ -5,5 +5,4 @@ Section: opie/applications | |||
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 | Version: $QPE_VERSION-$SUB_VERSION | ||
8 | Depends: task-opie-minimal, libopie1 | 7 | Depends: task-opie-minimal, libopie1 |
9 | Description: A note taking program with basic draw tools | 8 | Description: A note taking program with basic draw tools |
@@ -11,2 +10,3 @@ Description: A note taking program with basic draw tools | |||
11 | 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 |
12 | project, an alternative to the standard Zaurus environment. | 11 | project, an alternative to the standard Zaurus environment. |
12 | Version: $QPE_VERSION$EXTRAVERSION | ||
diff --git a/noncore/graphics/drawpad/texttool.h b/noncore/graphics/drawpad/texttool.h index 3187675..17556a1 100644 --- a/noncore/graphics/drawpad/texttool.h +++ b/noncore/graphics/drawpad/texttool.h | |||
@@ -23,4 +23,5 @@ class QLineEdit; | |||
23 | class TextToolDialog : public QDialog | 23 | class TextToolDialog : public QDialog |
24 | { | 24 | { |
25 | Q_OBJECT | ||
25 | public: | 26 | public: |
26 | TextToolDialog(QWidget* parent = 0, const char* name = 0); | 27 | TextToolDialog(QWidget* parent = 0, const char* name = 0); |