summaryrefslogtreecommitdiff
authorzecke <zecke>2003-04-13 16:35:11 (UTC)
committer zecke <zecke>2003-04-13 16:35:11 (UTC)
commit78d427d8eceac5cb0a92e4f46b7aa3b784d2c214 (patch) (unidiff)
tree4b7e73be0891a269c15fe76553d72ea264837d2b
parentc27d6327b9be5792fa507557f03997a46f32cc26 (diff)
downloadopie-78d427d8eceac5cb0a92e4f46b7aa3b784d2c214.zip
opie-78d427d8eceac5cb0a92e4f46b7aa3b784d2c214.tar.gz
opie-78d427d8eceac5cb0a92e4f46b7aa3b784d2c214.tar.bz2
Adjust to new libopie version of ColorDialog and Menu..
I'll port first all apps an the check in the libopie changes to avoid bigger problems
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index 459f1a8..4db6208 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -227,78 +227,78 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
227 227
228 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this); 228 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this);
229 m_pEraseToolAction->setToggleAction(true); 229 m_pEraseToolAction->setToggleAction(true);
230 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool())); 230 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool()));
231 m_pEraseToolAction->addTo(drawModeToolBar); 231 m_pEraseToolAction->addTo(drawModeToolBar);
232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) ); 232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) );
233 233
234 m_pTool = 0; 234 m_pTool = 0;
235 setRectangleTool(); 235 setRectangleTool();
236 setEllipseTool(); 236 setEllipseTool();
237 setPointTool(); 237 setPointTool();
238 238
239 emptyToolBar = new QPEToolBar(this); 239 emptyToolBar = new QPEToolBar(this);
240 emptyToolBar->setHorizontalStretchable(true); 240 emptyToolBar->setHorizontalStretchable(true);
241 emptyToolBar->addSeparator(); 241 emptyToolBar->addSeparator();
242 242
243 // init draw parameters toolbar 243 // init draw parameters toolbar
244 244
245 QPEToolBar* drawParametersToolBar = new QPEToolBar(this); 245 QPEToolBar* drawParametersToolBar = new QPEToolBar(this);
246 246
247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); 247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar);
248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); 248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int)));
249 249
250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); 250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width"));
251 m_pPenWidthSpinBox->setValue(1); 251 m_pPenWidthSpinBox->setValue(1);
252 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); 252 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus);
253 QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) ); 253 QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) );
254 254
255 m_pPenColorToolButton = new QToolButton(drawParametersToolBar); 255 m_pPenColorToolButton = new QToolButton(drawParametersToolBar);
256 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); 256 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor"));
257 QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); 257 QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) );
258 258
259 ColorPopupMenu* penColorPopupMenu = new ColorPopupMenu(Qt::black, m_pPenColorToolButton); 259 OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, m_pPenColorToolButton);
260 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); 260 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&)));
261 261
262 QToolTip::add(m_pPenColorToolButton, tr("Pen Color")); 262 QToolTip::add(m_pPenColorToolButton, tr("Pen Color"));
263 m_pPenColorToolButton->setPopup(penColorPopupMenu); 263 m_pPenColorToolButton->setPopup(penColorPopupMenu);
264 m_pPenColorToolButton->setPopupDelay(0); 264 m_pPenColorToolButton->setPopupDelay(0);
265 265
266 changePenColor(Qt::black); 266 changePenColor(Qt::black);
267 267
268 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); 268 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar);
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 ColorPopupMenu* brushColorPopupMenu = new ColorPopupMenu(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 // init pages 281 // init pages
282 282
283 QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); 283 QFile file(Global::applicationFileName("drawpad", "drawpad.xml"));
284 284
285 if (file.open(IO_ReadOnly)) { 285 if (file.open(IO_ReadOnly)) {
286 m_pDrawPadCanvas->load(&file); 286 m_pDrawPadCanvas->load(&file);
287 file.close(); 287 file.close();
288 } else { 288 } else {
289 m_pDrawPadCanvas->initialPage(); 289 m_pDrawPadCanvas->initialPage();
290 } 290 }
291 291
292 loadConfig(); 292 loadConfig();
293} 293}
294 294
295DrawPad::~DrawPad() 295DrawPad::~DrawPad()
296{ 296{
297 saveConfig(); 297 saveConfig();
298 298
299 QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); 299 QFile file(Global::applicationFileName("drawpad", "drawpad.xml"));
300 300
301 if (file.open(IO_WriteOnly)) { 301 if (file.open(IO_WriteOnly)) {
302 m_pDrawPadCanvas->save(&file); 302 m_pDrawPadCanvas->save(&file);
303 file.close(); 303 file.close();
304 } 304 }