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, 6 insertions, 0 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 | |||
@@ -269,36 +269,42 @@ DrawPad::DrawPad(QWidget* parent, const char* name) | |||
269 | m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); | 269 | m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); |
270 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); | 270 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); |
271 | 271 | ||
272 | OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton); | 272 | OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton); |
273 | connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); | 273 | connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); |
274 | 274 | ||
275 | QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); | 275 | QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); |
276 | m_pBrushColorToolButton->setPopup(brushColorPopupMenu); | 276 | m_pBrushColorToolButton->setPopup(brushColorPopupMenu); |
277 | m_pBrushColorToolButton->setPopupDelay(0); | 277 | m_pBrushColorToolButton->setPopupDelay(0); |
278 | 278 | ||
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 | ||
283 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); | 288 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); |
284 | 289 | ||
285 | if (file.open(IO_ReadOnly)) { | 290 | if (file.open(IO_ReadOnly)) { |
286 | m_pDrawPadCanvas->load(&file); | 291 | m_pDrawPadCanvas->load(&file); |
287 | file.close(); | 292 | file.close(); |
288 | } else { | 293 | } else { |
289 | m_pDrawPadCanvas->initialPage(); | 294 | m_pDrawPadCanvas->initialPage(); |
290 | } | 295 | } |
291 | 296 | ||
292 | loadConfig(); | 297 | loadConfig(); |
298 | |||
293 | } | 299 | } |
294 | 300 | ||
295 | DrawPad::~DrawPad() | 301 | DrawPad::~DrawPad() |
296 | { | 302 | { |
297 | saveConfig(); | 303 | saveConfig(); |
298 | 304 | ||
299 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); | 305 | QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); |
300 | 306 | ||
301 | if (file.open(IO_WriteOnly)) { | 307 | if (file.open(IO_WriteOnly)) { |
302 | m_pDrawPadCanvas->save(&file); | 308 | m_pDrawPadCanvas->save(&file); |
303 | file.close(); | 309 | file.close(); |
304 | } | 310 | } |