author | leseb <leseb> | 2002-06-08 16:46:59 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-08 16:46:59 (UTC) |
commit | 0fef046e0668d727df1884422144b26851d7de41 (patch) (unidiff) | |
tree | e25a8838720d1ce0a3e419ddf079f84f1e148588 /noncore/graphics/drawpad/drawpad.cpp | |
parent | 571908b989a85d256767dc5b27bccdb717554bb5 (diff) | |
download | opie-0fef046e0668d727df1884422144b26851d7de41.zip opie-0fef046e0668d727df1884422144b26851d7de41.tar.gz opie-0fef046e0668d727df1884422144b26851d7de41.tar.bz2 |
Working version of new page and clear page in thumbnail view
Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (show 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 | ||