Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 369e7f0..45fb886 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp | |||
@@ -14,24 +14,25 @@ | |||
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 "pageinformationdialog.h" | 27 | #include "pageinformationdialog.h" |
27 | #include "pointtool.h" | 28 | #include "pointtool.h" |
28 | #include "rectangletool.h" | 29 | #include "rectangletool.h" |
29 | #include "texttool.h" | 30 | #include "texttool.h" |
30 | #include "thumbnailview.h" | 31 | #include "thumbnailview.h" |
31 | 32 | ||
32 | #include <opie/colordialog.h> | 33 | #include <opie/colordialog.h> |
33 | #include <opie/colorpopupmenu.h> | 34 | #include <opie/colorpopupmenu.h> |
34 | 35 | ||
35 | #include <qpe/applnk.h> | 36 | #include <qpe/applnk.h> |
36 | #include <qpe/global.h> | 37 | #include <qpe/global.h> |
37 | #include <qpe/qpemenubar.h> | 38 | #include <qpe/qpemenubar.h> |
@@ -272,26 +273,26 @@ DrawPad::~DrawPad() | |||
272 | m_pDrawPadCanvas->save(&file); | 273 | m_pDrawPadCanvas->save(&file); |
273 | file.close(); | 274 | file.close(); |
274 | } | 275 | } |
275 | } | 276 | } |
276 | 277 | ||
277 | void DrawPad::newPage() | 278 | void DrawPad::newPage() |
278 | { | 279 | { |
279 | QRect rect = m_pDrawPadCanvas->contentsRect(); | 280 | QRect rect = m_pDrawPadCanvas->contentsRect(); |
280 | 281 | ||
281 | NewPageDialog newPageDialog(rect.width(), rect.height(), m_pen.color(), m_brush.color(), this); | 282 | NewPageDialog newPageDialog(rect.width(), rect.height(), m_pen.color(), m_brush.color(), this); |
282 | 283 | ||
283 | if (newPageDialog.exec() == QDialog::Accepted) { | 284 | if (newPageDialog.exec() == QDialog::Accepted) { |
284 | m_pDrawPadCanvas->newPage(newPageDialog.selectedWidth(), newPageDialog.selectedHeight(), | 285 | m_pDrawPadCanvas->newPage(newPageDialog.selectedTitle(), newPageDialog.selectedWidth(), |
285 | newPageDialog.selectedColor()); | 286 | newPageDialog.selectedHeight(), newPageDialog.selectedColor()); |
286 | } | 287 | } |
287 | } | 288 | } |
288 | 289 | ||
289 | void DrawPad::clearPage() | 290 | void DrawPad::clearPage() |
290 | { | 291 | { |
291 | QMessageBox messageBox(tr("Clear Page"), tr("Do you want to clear\nthe current page?"), | 292 | QMessageBox messageBox(tr("Clear Page"), tr("Do you want to clear\nthe current page?"), |
292 | QMessageBox::Information, QMessageBox::Yes, | 293 | QMessageBox::Information, QMessageBox::Yes, |
293 | QMessageBox::No | QMessageBox::Escape | QMessageBox::Default, | 294 | QMessageBox::No | QMessageBox::Escape | QMessageBox::Default, |
294 | QMessageBox::NoButton, this); | 295 | QMessageBox::NoButton, this); |
295 | 296 | ||
296 | messageBox.setButtonText(QMessageBox::Yes, tr("Yes")); | 297 | messageBox.setButtonText(QMessageBox::Yes, tr("Yes")); |
297 | messageBox.setButtonText(QMessageBox::No, tr("No")); | 298 | messageBox.setButtonText(QMessageBox::No, tr("No")); |
@@ -595,14 +596,15 @@ void DrawPad::thumbnailView() | |||
595 | { | 596 | { |
596 | ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); | 597 | ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); |
597 | 598 | ||
598 | thumbnailView.showMaximized(); | 599 | thumbnailView.showMaximized(); |
599 | thumbnailView.exec(); | 600 | thumbnailView.exec(); |
600 | } | 601 | } |
601 | 602 | ||
602 | void DrawPad::pageInformation() | 603 | void DrawPad::pageInformation() |
603 | { | 604 | { |
604 | PageInformationDialog pageInformationDialog(m_pDrawPadCanvas->currentPage()); | 605 | PageInformationDialog pageInformationDialog(m_pDrawPadCanvas->currentPage()); |
605 | 606 | ||
606 | if (pageInformationDialog.exec() == QDialog::Accepted) { | 607 | if (pageInformationDialog.exec() == QDialog::Accepted) { |
608 | m_pDrawPadCanvas->currentPage()->setTitle(pageInformationDialog.selectedTitle()); | ||
607 | } | 609 | } |
608 | } | 610 | } |