[QGIS Commit] r9068 -
branches/advanced_printing_branch/src/app/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 17 16:53:12 EDT 2008
Author: timlinux
Date: 2008-08-17 16:53:12 -0400 (Sun, 17 Aug 2008)
New Revision: 9068
Modified:
branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
Log:
Use fallback mechanism of qgisapp::getThemeIcon for icons
Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp 2008-08-16 18:20:28 UTC (rev 9067)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp 2008-08-17 20:53:12 UTC (rev 9068)
@@ -160,26 +160,23 @@
void QgsComposer::setupTheme()
{
- //calculate the active theme path
- QString myThemePath= QgsApplication::activeThemePath();
-
-
- //now set all the icons
- mActionOpenTemplate->setIcon(QIcon(QPixmap(myThemePath + "/mActionFileOpen.png")));
- mActionSaveTemplateAs->setIcon(QIcon(QPixmap(myThemePath + "/mActionFileSaveAs.png")));
- mActionExportAsImage->setIcon(QIcon(QPixmap(myThemePath + "/mActionExportMapServer.png")));
- mActionExportAsSVG->setIcon(QIcon(QPixmap(myThemePath + "/mActionSaveAsSVG.png")));
- mActionPrint->setIcon(QIcon(QPixmap(myThemePath + "/mActionFilePrint.png")));
- mActionZoomAll->setIcon(QIcon(QPixmap(myThemePath + "/mActionZoomFullExtent.png")));
- mActionZoomIn->setIcon(QIcon(QPixmap(myThemePath + "/mActionZoomIn.png")));
- mActionZoomOut->setIcon(QIcon(QPixmap(myThemePath + "/mActionZoomOut.png")));
- mActionRefreshView->setIcon(QIcon(QPixmap(myThemePath + "/mActionDraw.png")));
- mActionAddImage->setIcon(QIcon(QPixmap(myThemePath + "/mActionSaveMapAsImage.png")));
- mActionAddNewMap->setIcon(QIcon(QPixmap(myThemePath + "/mActionAddRasterLayer.png")));
- mActionAddNewLabel->setIcon(QIcon(QPixmap(myThemePath + "/mActionLabel.png")));
- mActionAddNewLegend->setIcon(QIcon(QPixmap(myThemePath + "/mActionAddLegend.png")));
- mActionAddNewScalebar->setIcon(QIcon(QPixmap(myThemePath + "/mActionScaleBar.png")));
- mActionSelectMoveItem->setIcon(QIcon(QPixmap(myThemePath + "/mActionPan.png")));
+ //now set all the icons - getThemeIcon will fall back to default theme if its
+ //missing from active theme
+ mActionOpenTemplate->setIcon(QgisApp::getThemeIcon("/mActionFileOpen.png"));
+ mActionSaveTemplateAs->setIcon(QgisApp::getThemeIcon("/mActionFileSaveAs.png"));
+ mActionExportAsImage->setIcon(QgisApp::getThemeIcon("/mActionExportMapServer.png"));
+ mActionExportAsSVG->setIcon(QgisApp::getThemeIcon("/mActionSaveAsSVG.png"));
+ mActionPrint->setIcon(QgisApp::getThemeIcon("/mActionFilePrint.png"));
+ mActionZoomAll->setIcon(QgisApp::getThemeIcon("/mActionZoomFullExtent.png"));
+ mActionZoomIn->setIcon(QgisApp::getThemeIcon("/mActionZoomIn.png"));
+ mActionZoomOut->setIcon(QgisApp::getThemeIcon("/mActionZoomOut.png"));
+ mActionRefreshView->setIcon(QgisApp::getThemeIcon("/mActionDraw.png"));
+ mActionAddImage->setIcon(QgisApp::getThemeIcon("/mActionSaveMapAsImage.png"));
+ mActionAddNewMap->setIcon(QgisApp::getThemeIcon("/mActionAddRasterLayer.png"));
+ mActionAddNewLabel->setIcon(QgisApp::getThemeIcon("/mActionLabel.png"));
+ mActionAddNewLegend->setIcon(QgisApp::getThemeIcon("/mActionAddLegend.png"));
+ mActionAddNewScalebar->setIcon(QgisApp::getThemeIcon("/mActionScaleBar.png"));
+ mActionSelectMoveItem->setIcon(QgisApp::getThemeIcon("/mActionPan.png"));
}
void QgsComposer::connectSlots()
More information about the QGIS-commit
mailing list