Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index ef55268..369e7f0 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 "pageinformationdialog.h" | ||
26 | #include "pointtool.h" | 27 | #include "pointtool.h" |
27 | #include "rectangletool.h" | 28 | #include "rectangletool.h" |
28 | #include "texttool.h" | 29 | #include "texttool.h" |
29 | #include "thumbnailview.h" | 30 | #include "thumbnailview.h" |
30 | 31 | ||
31 | #include <opie/colordialog.h> | 32 | #include <opie/colordialog.h> |
32 | #include <opie/colorpopupmenu.h> | 33 | #include <opie/colorpopupmenu.h> |
33 | 34 | ||
34 | #include <qpe/applnk.h> | 35 | #include <qpe/applnk.h> |
35 | #include <qpe/global.h> | 36 | #include <qpe/global.h> |
36 | #include <qpe/qpemenubar.h> | 37 | #include <qpe/qpemenubar.h> |
37 | #include <qpe/qpetoolbar.h> | 38 | #include <qpe/qpetoolbar.h> |
@@ -77,24 +78,28 @@ DrawPad::DrawPad(QWidget* parent, const char* name) | |||
77 | connect(importPageAction, SIGNAL(activated()), this, SLOT(importPage())); | 78 | connect(importPageAction, SIGNAL(activated()), this, SLOT(importPage())); |
78 | importPageAction->addTo(toolsPopupMenu); | 79 | importPageAction->addTo(toolsPopupMenu); |
79 | 80 | ||
80 | QAction* exportPageAction = new QAction(tr("Export"), tr("Export..."), 0, this); | 81 | QAction* exportPageAction = new QAction(tr("Export"), tr("Export..."), 0, this); |
81 | connect(exportPageAction, SIGNAL(activated()), this, SLOT(exportPage())); | 82 | connect(exportPageAction, SIGNAL(activated()), this, SLOT(exportPage())); |
82 | exportPageAction->addTo(toolsPopupMenu); | 83 | exportPageAction->addTo(toolsPopupMenu); |
83 | 84 | ||
84 | toolsPopupMenu->insertSeparator(); | 85 | toolsPopupMenu->insertSeparator(); |
85 | 86 | ||
86 | QAction* thumbnailViewAction = new QAction(tr("Thumbnail View"), tr("Thumbnail View..."), 0, this); | 87 | QAction* thumbnailViewAction = new QAction(tr("Thumbnail View"), tr("Thumbnail View..."), 0, this); |
87 | connect(thumbnailViewAction, SIGNAL(activated()), this, SLOT(thumbnailView())); | 88 | connect(thumbnailViewAction, SIGNAL(activated()), this, SLOT(thumbnailView())); |
88 | thumbnailViewAction->addTo(toolsPopupMenu); | 89 | thumbnailViewAction->addTo(toolsPopupMenu); |
90 | |||
91 | QAction* pageInformationAction = new QAction(tr("Page Information"), tr("Page Information..."), 0, this); | ||
92 | connect(pageInformationAction, SIGNAL(activated()), this, SLOT(pageInformation())); | ||
93 | pageInformationAction->addTo(toolsPopupMenu); | ||
89 | 94 | ||
90 | menuBar->insertItem(tr("Tools"), toolsPopupMenu); | 95 | menuBar->insertItem(tr("Tools"), toolsPopupMenu); |
91 | 96 | ||
92 | // init page toolbar | 97 | // init page toolbar |
93 | 98 | ||
94 | QPEToolBar* pageToolBar = new QPEToolBar(this); | 99 | QPEToolBar* pageToolBar = new QPEToolBar(this); |
95 | 100 | ||
96 | QAction* newPageAction = new QAction(tr("New Page"), Resource::loadIconSet("new"), QString::null, 0, this); | 101 | QAction* newPageAction = new QAction(tr("New Page"), Resource::loadIconSet("new"), QString::null, 0, this); |
97 | connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); | 102 | connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); |
98 | newPageAction->addTo(pageToolBar); | 103 | newPageAction->addTo(pageToolBar); |
99 | 104 | ||
100 | QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadIconSet("drawpad/clear"), QString::null, 0, this); | 105 | QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadIconSet("drawpad/clear"), QString::null, 0, this); |
@@ -584,12 +589,20 @@ void DrawPad::exportPage() | |||
584 | m_pDrawPadCanvas->exportPage(exportDialog.selectedFromPage(), exportDialog.selectedToPage(), | 589 | m_pDrawPadCanvas->exportPage(exportDialog.selectedFromPage(), exportDialog.selectedToPage(), |
585 | exportDialog.selectedName(), exportDialog.selectedFormat()); | 590 | exportDialog.selectedName(), exportDialog.selectedFormat()); |
586 | } | 591 | } |
587 | } | 592 | } |
588 | 593 | ||
589 | void DrawPad::thumbnailView() | 594 | void DrawPad::thumbnailView() |
590 | { | 595 | { |
591 | ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); | 596 | ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); |
592 | 597 | ||
593 | thumbnailView.showMaximized(); | 598 | thumbnailView.showMaximized(); |
594 | thumbnailView.exec(); | 599 | thumbnailView.exec(); |
595 | } | 600 | } |
601 | |||
602 | void DrawPad::pageInformation() | ||
603 | { | ||
604 | PageInformationDialog pageInformationDialog(m_pDrawPadCanvas->currentPage()); | ||
605 | |||
606 | if (pageInformationDialog.exec() == QDialog::Accepted) { | ||
607 | } | ||
608 | } | ||