author | drw <drw> | 2005-05-23 22:51:56 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-23 22:51:56 (UTC) |
commit | 71ecaf241641c2c58b997df56074cf4849e6d6c5 (patch) (side-by-side diff) | |
tree | aec19a63d44027eec822775216d9b63e50ff4563 | |
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 @@ #include <opie2/ocolorpopupmenu.h> +#include <opie2/oresource.h> @@ -38,3 +39,2 @@ #include <qtoolbar.h> -#include <qpe/resource.h> #include <qpe/qpeapplication.h> @@ -109,3 +109,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this); + QAction* newPageAction = new QAction(tr("New Page"), Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); @@ -114,3 +115,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadPixmap("drawpad/clear"), QString::null, 0, this); + QAction* clearPageAction = new QAction(tr("Clear Page"), + Opie::Core::OResource::loadPixmap("drawpad/clear", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage())); @@ -119,3 +122,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this); + QAction* deletePageAction = new QAction(tr("Delete Page"), + Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); @@ -131,3 +136,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this); + m_pUndoAction = new QAction(tr("Undo"), Opie::Core::OResource::loadPixmap("undo", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); @@ -136,3 +142,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("redo"), QString::null, 0, this); + m_pRedoAction = new QAction(tr("Redo"), Opie::Core::OResource::loadPixmap("redo", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo())); @@ -141,3 +148,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this); + m_pFirstPageAction = new QAction(tr("First Page"), + Opie::Core::OResource::loadPixmap("fastback", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage())); @@ -146,3 +155,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this); + m_pPreviousPageAction = new QAction(tr("Previous Page"), + Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage())); @@ -151,3 +162,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this); + m_pNextPageAction = new QAction(tr("Next Page"), + Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage())); @@ -156,3 +169,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this); + m_pLastPageAction = new QAction(tr("Last Page"), + Opie::Core::OResource::loadPixmap("fastforward", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); @@ -172,3 +187,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadPixmap("drawpad/point"), "", 0, this); + m_pPointToolAction = new QAction(tr("Draw Point"), + Opie::Core::OResource::loadPixmap("drawpad/point", Opie::Core::OResource::SmallIcon), + "", 0, this); connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool())); @@ -176,3 +193,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadPixmap("drawpad/line"), "", 0, this); + m_pLineToolAction = new QAction(tr("Draw Line"), + Opie::Core::OResource::loadPixmap("drawpad/line", Opie::Core::OResource::SmallIcon), + "", 0, this); connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool())); @@ -189,3 +208,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadPixmap("drawpad/rectangle"), "", 0, this); + m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), + Opie::Core::OResource::loadPixmap("drawpad/rectangle", Opie::Core::OResource::SmallIcon), + "", 0, this); connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool())); @@ -193,3 +214,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadPixmap("drawpad/filledrectangle"), "", 0, this); + m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), + Opie::Core::OResource::loadPixmap("drawpad/filledrectangle", + Opie::Core::OResource::SmallIcon), "", 0, this); connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool())); @@ -206,3 +229,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadPixmap("drawpad/ellipse"), "", 0, this); + m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), + Opie::Core::OResource::loadPixmap("drawpad/ellipse", Opie::Core::OResource::SmallIcon), + "", 0, this); connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool())); @@ -210,3 +235,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadPixmap("drawpad/filledellipse"), "", 0, this); + m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), + Opie::Core::OResource::loadPixmap("drawpad/filledellipse", + Opie::Core::OResource::SmallIcon), "", 0, this); connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool())); @@ -217,3 +244,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadPixmap("drawpad/text"), QString::null, 0, this); + m_pTextToolAction = new QAction(tr("Insert Text"), + Opie::Core::OResource::loadPixmap("drawpad/text", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); m_pTextToolAction->setToggleAction(true); @@ -223,3 +252,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadPixmap("drawpad/fill"), QString::null, 0, this); + m_pFillToolAction = new QAction(tr("Fill Region"), + Opie::Core::OResource::loadPixmap("drawpad/fill", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); m_pFillToolAction->setToggleAction(true); @@ -229,3 +260,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) - m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this); + m_pEraseToolAction = new QAction(tr("Erase Point"), + Opie::Core::OResource::loadPixmap("drawpad/erase", Opie::Core::OResource::SmallIcon), + QString::null, 0, this); m_pEraseToolAction->setToggleAction(true); @@ -256,4 +289,7 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) + bool useBigIcon = qApp->desktop()->size().width() > 330; + m_pPenColorToolButton = new QToolButton(drawParametersToolBar); - m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); + m_pPenColorToolButton->setUsesBigPixmap( useBigIcon ); + m_pPenColorToolButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/pencolor", Opie::Core::OResource::SmallIcon)); 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*/ ) m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); - m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); + m_pBrushColorToolButton->setUsesBigPixmap( useBigIcon ); + m_pBrushColorToolButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/brushcolor", Opie::Core::OResource::SmallIcon)); 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) painter.begin(m_pPenColorToolButton->pixmap()); - painter.fillRect(QRect(0, 12, 14, 2), m_pen.color()); + int size = AppLnk::smallIconSize(); + painter.fillRect(QRect(0, 6*size/7+1, size, size/7), m_pen.color()); painter.end(); @@ -568,3 +606,4 @@ void DrawPad::changeBrushColor(const QColor& color) painter.begin(m_pBrushColorToolButton->pixmap()); - painter.fillRect(QRect(0, 12, 14, 2), m_brush.color()); + int size = AppLnk::smallIconSize(); + painter.fillRect(QRect(0, 6*size/7+1, size, size/7), m_brush.color()); 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 @@ +#include <opie2/oresource.h> + #include <qpe/config.h> -#include <qpe/resource.h> #include <qpe/timestring.h> @@ -241,4 +242,7 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi + bool useBigIcon = qApp->desktop()->size().width() > 330; + QToolButton* newPageButton = new QToolButton(this); - newPageButton->setIconSet(Resource::loadIconSet("new")); + newPageButton->setUsesBigPixmap( useBigIcon ); + newPageButton->setPixmap(Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon)); newPageButton->setAutoRaise(true); @@ -248,3 +252,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi QToolButton* clearPageButton = new QToolButton(this); - clearPageButton->setIconSet(Resource::loadIconSet("drawpad/clear")); + clearPageButton->setUsesBigPixmap( useBigIcon ); + clearPageButton->setPixmap(Opie::Core::OResource::loadPixmap("drawpad/clear", Opie::Core::OResource::SmallIcon)); clearPageButton->setAutoRaise(true); @@ -254,3 +259,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi QToolButton* deletePageButton = new QToolButton(this); - deletePageButton->setIconSet(Resource::loadIconSet("trash")); + deletePageButton->setUsesBigPixmap( useBigIcon ); + deletePageButton->setPixmap(Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon)); deletePageButton->setAutoRaise(true); @@ -260,3 +266,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi m_pMovePageUpButton = new QToolButton(this); - m_pMovePageUpButton->setIconSet(Resource::loadIconSet("up")); + m_pMovePageUpButton->setUsesBigPixmap( useBigIcon ); + m_pMovePageUpButton->setPixmap(Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon)); m_pMovePageUpButton->setAutoRaise(true); @@ -264,5 +271,6 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) ); - + m_pMovePageDownButton = new QToolButton(this); - m_pMovePageDownButton->setIconSet(Resource::loadIconSet("down")); + m_pMovePageDownButton->setUsesBigPixmap( useBigIcon ); + m_pMovePageDownButton->setPixmap(Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon)); m_pMovePageDownButton->setAutoRaise(true); |