Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 58c0d09..ef55268 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp | |||
@@ -24,2 +24,3 @@ | |||
24 | #include "linetool.h" | 24 | #include "linetool.h" |
25 | #include "newpagedialog.h" | ||
25 | #include "pointtool.h" | 26 | #include "pointtool.h" |
@@ -95,3 +96,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name) | |||
95 | QAction* newPageAction = new QAction(tr("New Page"), Resource::loadIconSet("new"), QString::null, 0, this); | 96 | QAction* newPageAction = new QAction(tr("New Page"), Resource::loadIconSet("new"), QString::null, 0, this); |
96 | connect(newPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(newPage())); | 97 | connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); |
97 | newPageAction->addTo(pageToolBar); | 98 | newPageAction->addTo(pageToolBar); |
@@ -270,2 +271,14 @@ DrawPad::~DrawPad() | |||
270 | 271 | ||
272 | void DrawPad::newPage() | ||
273 | { | ||
274 | QRect rect = m_pDrawPadCanvas->contentsRect(); | ||
275 | |||
276 | NewPageDialog newPageDialog(rect.width(), rect.height(), m_pen.color(), m_brush.color(), this); | ||
277 | |||
278 | if (newPageDialog.exec() == QDialog::Accepted) { | ||
279 | m_pDrawPadCanvas->newPage(newPageDialog.selectedWidth(), newPageDialog.selectedHeight(), | ||
280 | newPageDialog.selectedColor()); | ||
281 | } | ||
282 | } | ||
283 | |||
271 | void DrawPad::clearPage() | 284 | void DrawPad::clearPage() |
@@ -577,3 +590,3 @@ void DrawPad::thumbnailView() | |||
577 | { | 590 | { |
578 | ThumbnailView thumbnailView(m_pDrawPadCanvas, this); | 591 | ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); |
579 | 592 | ||