author | drw <drw> | 2005-05-23 22:51:56 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-23 22:51:56 (UTC) |
commit | 71ecaf241641c2c58b997df56074cf4849e6d6c5 (patch) (unidiff) | |
tree | aec19a63d44027eec822775216d9b63e50ff4563 /noncore/graphics/drawpad | |
parent | b153f9739d300b3bc608ea76968b818818fce1d0 (diff) | |
download | opie-71ecaf241641c2c58b997df56074cf4849e6d6c5.zip opie-71ecaf241641c2c58b997df56074cf4849e6d6c5.tar.gz opie-71ecaf241641c2c58b997df56074cf4849e6d6c5.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 85 | ||||
-rw-r--r-- | noncore/graphics/drawpad/thumbnailview.cpp | 22 |
2 files changed, 77 insertions, 30 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index c0f42d9..158a5ed 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp | |||
@@ -34,2 +34,3 @@ | |||
34 | #include <opie2/ocolorpopupmenu.h> | 34 | #include <opie2/ocolorpopupmenu.h> |
35 | #include <opie2/oresource.h> | ||
35 | 36 | ||
@@ -38,3 +39,2 @@ | |||
38 | #include <qtoolbar.h> | 39 | #include <qtoolbar.h> |
39 | #include <qpe/resource.h> | ||
40 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
@@ -109,3 +109,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
109 | 109 | ||
110 | QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this); | 110 | QAction* newPageAction = new QAction(tr("New Page"), Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), |
111 | QString::null, 0, this); | ||
111 | connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); | 112 | connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); |
@@ -114,3 +115,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
114 | 115 | ||
115 | QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadPixmap("drawpad/clear"), QString::null, 0, this); | 116 | QAction* clearPageAction = new QAction(tr("Clear Page"), |
117 | Opie::Core::OResource::loadPixmap("drawpad/clear", Opie::Core::OResource::SmallIcon), | ||
118 | QString::null, 0, this); | ||
116 | connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage())); | 119 | connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage())); |
@@ -119,3 +122,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
119 | 122 | ||
120 | QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this); | 123 | QAction* deletePageAction = new QAction(tr("Delete Page"), |
124 | Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), | ||
125 | QString::null, 0, this); | ||
121 | connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); | 126 | connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); |
@@ -131,3 +136,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
131 | 136 | ||
132 | m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this); | 137 | m_pUndoAction = new QAction(tr("Undo"), Opie::Core::OResource::loadPixmap("undo", Opie::Core::OResource::SmallIcon), |
138 | QString::null, 0, this); | ||
133 | connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); | 139 | connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); |
@@ -136,3 +142,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
136 | 142 | ||
137 | m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("redo"), QString::null, 0, this); | 143 | m_pRedoAction = new QAction(tr("Redo"), Opie::Core::OResource::loadPixmap("redo", Opie::Core::OResource::SmallIcon), |
144 | QString::null, 0, this); | ||
138 | connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo())); | 145 | connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo())); |
@@ -141,3 +148,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
141 | 148 | ||
142 | m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this); | 149 | m_pFirstPageAction = new QAction(tr("First Page"), |
150 | Opie::Core::OResource::loadPixmap("fastback", Opie::Core::OResource::SmallIcon), | ||
151 | QString::null, 0, this); | ||
143 | connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage())); | 152 | connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage())); |
@@ -146,3 +155,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
146 | 155 | ||
147 | m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this); | 156 | m_pPreviousPageAction = new QAction(tr("Previous Page"), |
157 | Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon), | ||
158 | QString::null, 0, this); | ||
148 | connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage())); | 159 | connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage())); |
@@ -151,3 +162,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
151 | 162 | ||
152 | m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this); | 163 | m_pNextPageAction = new QAction(tr("Next Page"), |
164 | Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon), | ||
165 | QString::null, 0, this); | ||
153 | connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage())); | 166 | connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage())); |
@@ -156,3 +169,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
156 | 169 | ||
157 | m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this); | 170 | m_pLastPageAction = new QAction(tr("Last Page"), |
171 | Opie::Core::OResource::loadPixmap("fastforward", Opie::Core::OResource::SmallIcon), | ||
172 | QString::null, 0, this); | ||
158 | connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); | 173 | connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); |
@@ -172,3 +187,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
172 | 187 | ||
173 | m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadPixmap("drawpad/point"), "", 0, this); | 188 | m_pPointToolAction = new QAction(tr("Draw Point"), |
189 | Opie::Core::OResource::loadPixmap("drawpad/point", Opie::Core::OResource::SmallIcon), | ||
190 | "", 0, this); | ||
174 | connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool())); | 191 | connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool())); |
@@ -176,3 +193,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
176 | 193 | ||
177 | m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadPixmap("drawpad/line"), "", 0, this); | 194 | m_pLineToolAction = new QAction(tr("Draw Line"), |
195 | Opie::Core::OResource::loadPixmap("drawpad/line", Opie::Core::OResource::SmallIcon), | ||
196 | "", 0, this); | ||
178 | connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool())); | 197 | connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool())); |
@@ -189,3 +208,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
189 | 208 | ||
190 | m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadPixmap("drawpad/rectangle"), "", 0, this); | 209 | m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), |
210 | Opie::Core::OResource::loadPixmap("drawpad/rectangle", Opie::Core::OResource::SmallIcon), | ||
211 | "", 0, this); | ||
191 | connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool())); | 212 | connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool())); |
@@ -193,3 +214,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
193 | 214 | ||
194 | m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadPixmap("drawpad/filledrectangle"), "", 0, this); | 215 | m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), |
216 | Opie::Core::OResource::loadPixmap("drawpad/filledrectangle", | ||
217 | Opie::Core::OResource::SmallIcon), "", 0, this); | ||
195 | connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool())); | 218 | connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool())); |
@@ -206,3 +229,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
206 | 229 | ||
207 | m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadPixmap("drawpad/ellipse"), "", 0, this); | 230 | m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), |
231 | Opie::Core::OResource::loadPixmap("drawpad/ellipse", Opie::Core::OResource::SmallIcon), | ||
232 | "", 0, this); | ||
208 | connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool())); | 233 | connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool())); |
@@ -210,3 +235,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
210 | 235 | ||
211 | m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadPixmap("drawpad/filledellipse"), "", 0, this); | 236 | m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), |
237 | Opie::Core::OResource::loadPixmap("drawpad/filledellipse", | ||
238 | Opie::Core::OResource::SmallIcon), "", 0, this); | ||
212 | connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool())); | 239 | connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool())); |
@@ -217,3 +244,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
217 | 244 | ||
218 | m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadPixmap("drawpad/text"), QString::null, 0, this); | 245 | m_pTextToolAction = new QAction(tr("Insert Text"), |
246 | Opie::Core::OResource::loadPixmap("drawpad/text", Opie::Core::OResource::SmallIcon), | ||
247 | QString::null, 0, this); | ||
219 | m_pTextToolAction->setToggleAction(true); | 248 | m_pTextToolAction->setToggleAction(true); |
@@ -223,3 +252,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
223 | 252 | ||
224 | m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadPixmap("drawpad/fill"), QString::null, 0, this); | 253 | m_pFillToolAction = new QAction(tr("Fill Region"), |
254 | Opie::Core::OResource::loadPixmap("drawpad/fill", Opie::Core::OResource::SmallIcon), | ||
255 | QString::null, 0, this); | ||
225 | m_pFillToolAction->setToggleAction(true); | 256 | m_pFillToolAction->setToggleAction(true); |
@@ -229,3 +260,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
229 | 260 | ||
230 | m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this); | 261 | m_pEraseToolAction = new QAction(tr("Erase Point"), |
262 | Opie::Core::OResource::loadPixmap("drawpad/erase", Opie::Core::OResource::SmallIcon), | ||
263 | QString::null, 0, this); | ||
231 | m_pEraseToolAction->setToggleAction(true); | 264 | m_pEraseToolAction->setToggleAction(true); |
@@ -256,4 +289,7 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
256 | 289 | ||
290 | bool useBigIcon = qApp->desktop()->size().width() > 330; | ||
291 | |||
257 | m_pPenColorToolButton = new QToolButton(drawParametersToolBar); | 292 | m_pPenColorToolButton = new QToolButton(drawParametersToolBar); |
258 | m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); | 293 | m_pPenColorToolButton->setUsesBigPixmap( useBigIcon ); |
294 | m_pPenColorToolButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/pencolor", Opie::Core::OResource::SmallIcon)); | ||
259 | QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); | 295 | QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); |
@@ -270,3 +306,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) | |||
270 | m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); | 306 | m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); |
271 | m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); | 307 | m_pBrushColorToolButton->setUsesBigPixmap( useBigIcon ); |
308 | m_pBrushColorToolButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/brushcolor", Opie::Core::OResource::SmallIcon)); | ||
272 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); | 309 | QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); |
@@ -556,3 +593,4 @@ void DrawPad::changePenColor(const QColor& color) | |||
556 | painter.begin(m_pPenColorToolButton->pixmap()); | 593 | painter.begin(m_pPenColorToolButton->pixmap()); |
557 | painter.fillRect(QRect(0, 12, 14, 2), m_pen.color()); | 594 | int size = AppLnk::smallIconSize(); |
595 | painter.fillRect(QRect(0, 6*size/7+1, size, size/7), m_pen.color()); | ||
558 | painter.end(); | 596 | painter.end(); |
@@ -568,3 +606,4 @@ void DrawPad::changeBrushColor(const QColor& color) | |||
568 | painter.begin(m_pBrushColorToolButton->pixmap()); | 606 | painter.begin(m_pBrushColorToolButton->pixmap()); |
569 | painter.fillRect(QRect(0, 12, 14, 2), m_brush.color()); | 607 | int size = AppLnk::smallIconSize(); |
608 | painter.fillRect(QRect(0, 6*size/7+1, size, size/7), m_brush.color()); | ||
570 | painter.end(); | 609 | painter.end(); |
diff --git a/noncore/graphics/drawpad/thumbnailview.cpp b/noncore/graphics/drawpad/thumbnailview.cpp index 1ccf484..d190ffe 100644 --- a/noncore/graphics/drawpad/thumbnailview.cpp +++ b/noncore/graphics/drawpad/thumbnailview.cpp | |||
@@ -20,4 +20,5 @@ | |||
20 | 20 | ||
21 | #include <opie2/oresource.h> | ||
22 | |||
21 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
22 | #include <qpe/resource.h> | ||
23 | #include <qpe/timestring.h> | 24 | #include <qpe/timestring.h> |
@@ -241,4 +242,7 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi | |||
241 | 242 | ||
243 | bool useBigIcon = qApp->desktop()->size().width() > 330; | ||
244 | |||
242 | QToolButton* newPageButton = new QToolButton(this); | 245 | QToolButton* newPageButton = new QToolButton(this); |
243 | newPageButton->setIconSet(Resource::loadIconSet("new")); | 246 | newPageButton->setUsesBigPixmap( useBigIcon ); |
247 | newPageButton->setPixmap(Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon)); | ||
244 | newPageButton->setAutoRaise(true); | 248 | newPageButton->setAutoRaise(true); |
@@ -248,3 +252,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi | |||
248 | QToolButton* clearPageButton = new QToolButton(this); | 252 | QToolButton* clearPageButton = new QToolButton(this); |
249 | clearPageButton->setIconSet(Resource::loadIconSet("drawpad/clear")); | 253 | clearPageButton->setUsesBigPixmap( useBigIcon ); |
254 | clearPageButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/clear", Opie::Core::OResource::SmallIcon)); | ||
250 | clearPageButton->setAutoRaise(true); | 255 | clearPageButton->setAutoRaise(true); |
@@ -254,3 +259,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi | |||
254 | QToolButton* deletePageButton = new QToolButton(this); | 259 | QToolButton* deletePageButton = new QToolButton(this); |
255 | deletePageButton->setIconSet(Resource::loadIconSet("trash")); | 260 | deletePageButton->setUsesBigPixmap( useBigIcon ); |
261 | deletePageButton->setPixmap(Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon)); | ||
256 | deletePageButton->setAutoRaise(true); | 262 | deletePageButton->setAutoRaise(true); |
@@ -260,3 +266,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi | |||
260 | m_pMovePageUpButton = new QToolButton(this); | 266 | m_pMovePageUpButton = new QToolButton(this); |
261 | m_pMovePageUpButton->setIconSet(Resource::loadIconSet("up")); | 267 | m_pMovePageUpButton->setUsesBigPixmap( useBigIcon ); |
268 | m_pMovePageUpButton->setPixmap(Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon)); | ||
262 | m_pMovePageUpButton->setAutoRaise(true); | 269 | m_pMovePageUpButton->setAutoRaise(true); |
@@ -264,5 +271,6 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi | |||
264 | QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) ); | 271 | QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) ); |
265 | 272 | ||
266 | m_pMovePageDownButton = new QToolButton(this); | 273 | m_pMovePageDownButton = new QToolButton(this); |
267 | m_pMovePageDownButton->setIconSet(Resource::loadIconSet("down")); | 274 | m_pMovePageDownButton->setUsesBigPixmap( useBigIcon ); |
275 | m_pMovePageDownButton->setPixmap(Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon)); | ||
268 | m_pMovePageDownButton->setAutoRaise(true); | 276 | m_pMovePageDownButton->setAutoRaise(true); |