Skip to content

Commit

Permalink
Store theme data in a resource file and pull icons from there as need…
Browse files Browse the repository at this point in the history
…ed. Currently only default and newgis have been moved into the resource, others will follow

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12227 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Nov 22, 2009
1 parent fd1989b commit b364748
Show file tree
Hide file tree
Showing 5 changed files with 417 additions and 157 deletions.
258 changes: 254 additions & 4 deletions images/images.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,256 @@
<RCC>
<qresource prefix="/images" >
<file>icons/qgis-icon-16x16.png</file>
<file>icons/qgis-icon-60x60.png</file>
</qresource>
<qresource prefix="/images" >
<file>themes/newgis/mActionAddGPSLayer.png</file>
<file>themes/newgis/mActionAddImage.png</file>
<file>themes/newgis/mActionAddIsland.png</file>
<file>themes/newgis/mActionAddLayer.png</file>
<file>themes/newgis/mActionAddLegend.png</file>
<file>themes/newgis/mActionAddMap.png</file>
<file>themes/newgis/mActionAddOgrLayer.png</file>
<file>themes/newgis/mActionAddRasterLayer.png</file>
<file>themes/newgis/mActionAddRing.png</file>
<file>themes/newgis/mActionAddSpatiaLiteLayer.png</file>
<file>themes/newgis/mActionAddVertex.png</file>
<file>themes/newgis/mActionAddWfsLayer.png</file>
<file>themes/newgis/mActionAddWmsLayer.png</file>
<file>themes/newgis/mActionCaptureLine.png</file>
<file>themes/newgis/mActionCapturePoint.png</file>
<file>themes/newgis/mActionCapturePolygon.png</file>
<file>themes/newgis/mActionDeletePart.png</file>
<file>themes/newgis/mActionDeleteRing.png</file>
<file>themes/newgis/mActionDeleteSelected.png</file>
<file>themes/newgis/mActionDeleteVertex.png</file>
<file>themes/newgis/mActionDraw.png</file>
<file>themes/newgis/mActionEditCopy.png</file>
<file>themes/newgis/mActionEditCut.png</file>
<file>themes/newgis/mActionEditPaste.png</file>
<file>themes/newgis/mActionFileNew.png</file>
<file>themes/newgis/mActionFileOpen.png</file>
<file>themes/newgis/mActionFilePrint.png</file>
<file>themes/newgis/mActionFileSave.png</file>
<file>themes/newgis/mActionFileSaveAs.png</file>
<file>themes/newgis/mActionGroupItems.png</file>
<file>themes/newgis/mActionHelpContents.png</file>
<file>themes/newgis/mActionHideAllLayers.png</file>
<file>themes/newgis/mActionIdentify.png</file>
<file>themes/newgis/mActionInOverview.png</file>
<file>themes/newgis/mActionLabel.png</file>
<file>themes/newgis/mActionMapTips.png</file>
<file>themes/newgis/mActionMeasure.png</file>
<file>themes/newgis/mActionMeasureArea.png</file>
<file>themes/newgis/mActionMergeFeatures.png</file>
<file>themes/newgis/mActionMoveFeature.png</file>
<file>themes/newgis/mActionMoveItemContent.png</file>
<file>themes/newgis/mActionMoveVertex.png</file>
<file>themes/newgis/mActionNewBookmark.png</file>
<file>themes/newgis/mActionNewVectorLayer.png</file>
<file>themes/newgis/mActionNodeTool.png</file>
<file>themes/newgis/mActionOpenTable.png</file>
<file>themes/newgis/mActionPan.png</file>
<file>themes/newgis/mActionRedo.png</file>
<file>themes/newgis/mActionRemoveLayer.png</file>
<file>themes/newgis/mActionReshape.png</file>
<file>themes/newgis/mActionSaveAsPDF.png</file>
<file>themes/newgis/mActionSaveAsSVG.png</file>
<file>themes/newgis/mActionSaveMapAsImage.png</file>
<file>themes/newgis/mActionScaleBar.png</file>
<file>themes/newgis/mActionSelect.png</file>
<file>themes/newgis/mActionSelectPan.png</file>
<file>themes/newgis/mActionShowAllLayers.png</file>
<file>themes/newgis/mActionShowBookmarks.png</file>
<file>themes/newgis/mActionSimplify.png</file>
<file>themes/newgis/mActionSplitFeatures.png</file>
<file>themes/newgis/mActionToggleEditing.png</file>
<file>themes/newgis/mActionUndo.png</file>
<file>themes/newgis/mActionUngroupItems.png</file>
<file>themes/newgis/mActionUnselectAttributes.png</file>
<file>themes/newgis/mActionZoomFullExtent.png</file>
<file>themes/newgis/mActionZoomIn.png</file>
<file>themes/newgis/mActionZoomLast.png</file>
<file>themes/newgis/mActionZoomNext.png</file>
<file>themes/newgis/mActionZoomOut.png</file>
<file>themes/newgis/mActionZoomToLayer.png</file>
<file>themes/newgis/mActionZoomToSelected.png</file>
<file>themes/default/cap_flat.png</file>
<file>themes/default/cap_round.png</file>
<file>themes/default/cap_square.png</file>
<file>themes/default/clearInput.png</file>
<file>themes/default/extents.png</file>
<file>themes/default/favourites.png</file>
<file>themes/default/geographic.png</file>
<file>themes/default/transformed.png</file>
<file>themes/default/user.png</file>
<file>themes/default/join_bevel.png</file>
<file>themes/default/join_miter.png</file>
<file>themes/default/join_round.png</file>
<file>themes/default/join_style.svg</file>
<file>themes/default/mAction.png</file>
<file>themes/default/mActionAddAllToOverview.png</file>
<file>themes/default/mActionAddBasicShape.png</file>
<file>themes/default/mActionAddImage.png</file>
<file>themes/default/mActionAddIsland.png</file>
<file>themes/default/mActionAddLayer.png</file>
<file>themes/default/mActionAddLegend.png</file>
<file>themes/default/mActionAddMap.png</file>
<file>themes/default/mActionAddNonDbLayer.png</file>
<file>themes/default/mActionAddOgrLayer.png</file>
<file>themes/default/mActionAddRasterLayer.png</file>
<file>themes/default/mActionAddRing.png</file>
<file>themes/default/mActionAddSpatiaLiteLayer.png</file>
<file>themes/default/mActionAddVertex.png</file>
<file>themes/default/mActionAddWmsLayer.png</file>
<file>themes/default/mActionAlignBottom.png</file>
<file>themes/default/mActionAlignHCenter.png</file>
<file>themes/default/mActionAlignLeft.png</file>
<file>themes/default/mActionAlignRight.png</file>
<file>themes/default/mActionAlignTop.png</file>
<file>themes/default/mActionAlignVCenter.png</file>
<file>themes/default/mActionArrowDown.png</file>
<file>themes/default/mActionArrowUp.png</file>
<file>themes/default/mActionCalculateField.png</file>
<file>themes/default/mActionCaptureLine.png</file>
<file>themes/default/mActionCapturePoint.png</file>
<file>themes/default/mActionCapturePolygon.png</file>
<file>themes/default/mActionCheckQgisVersion.png</file>
<file>themes/default/mActionCollapseTree.png</file>
<file>themes/default/mActionContextHelp.png</file>
<file>themes/default/mActionCopySelected.png</file>
<file>themes/default/mActionCustomProjection.png</file>
<file>themes/default/mActionDeleteAttribute.png</file>
<file>themes/default/mActionDeletePart.png</file>
<file>themes/default/mActionDeleteRing.png</file>
<file>themes/default/mActionDeleteSelected.png</file>
<file>themes/default/mActionDeleteVertex.png</file>
<file>themes/default/mActionDeselectAll.png</file>
<file>themes/default/mActionDraw.png</file>
<file>themes/default/mActionEditCopy.png</file>
<file>themes/default/mActionEditCut.png</file>
<file>themes/default/mActionEditPaste.png</file>
<file>themes/default/mActionExpandTree.png</file>
<file>themes/default/mActionExportMapServer.png</file>
<file>themes/default/mActionFileExit.png</file>
<file>themes/default/mActionFileNew.png</file>
<file>themes/default/mActionFileOpen.png</file>
<file>themes/default/mActionFilePrint.png</file>
<file>themes/default/mActionFileSave.png</file>
<file>themes/default/mActionFileSaveAs.png</file>
<file>themes/default/mActionFileSmall.png</file>
<file>themes/default/mActionFolder.png</file>
<file>themes/default/mActionFromSelectedFeature.png</file>
<file>themes/default/mActionGroupItems.png</file>
<file>themes/default/mActionHelpAbout.png</file>
<file>themes/default/mActionHelpContents.png</file>
<file>themes/default/mActionHideAllLayers.png</file>
<file>themes/default/mActionIdentify.png</file>
<file>themes/default/mActionInOverview.png</file>
<file>themes/default/mActionInvertSelection.png</file>
<file>themes/default/mActionLabel.png</file>
<file>themes/default/mActionLowerItems.png</file>
<file>themes/default/mActionMapTips.png</file>
<file>themes/default/mActionMeasure.png</file>
<file>themes/default/mActionMeasureArea.png</file>
<file>themes/default/mActionMergeFeatures.png</file>
<file>themes/default/mActionMoveFeature.png</file>
<file>themes/default/mActionMoveItemContent.png</file>
<file>themes/default/mActionMoveItemsToBottom.png</file>
<file>themes/default/mActionMoveItemsToTop.png</file>
<file>themes/default/mActionMoveVertex.png</file>
<file>themes/default/mActionNewAttribute.png</file>
<file>themes/default/mActionNewBookmark.png</file>
<file>themes/default/mActionNewComposer.png</file>
<file>themes/default/mActionNewFolder.png</file>
<file>themes/default/mActionNewVectorLayer.png</file>
<file>themes/default/mActionNodeTool.png</file>
<file>themes/default/mActionOpenTable.png</file>
<file>themes/default/mActionOptions.png</file>
<file>themes/default/mActionPan.png</file>
<file>themes/default/mActionProjectProperties.png</file>
<file>themes/default/mActionPropertyItem.png</file>
<file>themes/default/mActionQgisHomePage.png</file>
<file>themes/default/mActionRaiseItems.png</file>
<file>themes/default/mActionRedo.png</file>
<file>themes/default/mActionRemove.png</file>
<file>themes/default/mActionRemoveAllFromOverview.png</file>
<file>themes/default/mActionRemoveLayer.png</file>
<file>themes/default/mActionRemoveSelectedFeature.png</file>
<file>themes/default/mActionReshape.png</file>
<file>themes/default/mActionRotatePointSymbols.png</file>
<file>themes/default/mActionSaveAsPDF.png</file>
<file>themes/default/mActionSaveAsSVG.png</file>
<file>themes/default/mActionSaveMapAsImage.png</file>
<file>themes/default/mActionScaleBar.png</file>
<file>themes/default/mActionSelect.png</file>
<file>themes/default/mActionSelectedToTop.png</file>
<file>themes/default/mActionSelectPan.png</file>
<file>themes/default/mActionShowAllLayers.png</file>
<file>themes/default/mActionShowBookmarks.png</file>
<file>themes/default/mActionShowPluginManager.png</file>
<file>themes/default/mActionSimplify.png</file>
<file>themes/default/mActionSplitFeatures.png</file>
<file>themes/default/mActionToggleEditing.png</file>
<file>themes/default/mActionUndo.png</file>
<file>themes/default/mActionUngroupItems.png</file>
<file>themes/default/mActionUnselectAttributes.png</file>
<file>themes/default/mActionZoomFullExtent.png</file>
<file>themes/default/mActionZoomIn.png</file>
<file>themes/default/mActionZoomLast.png</file>
<file>themes/default/mActionZoomNext.png</file>
<file>themes/default/mActionZoomOut.png</file>
<file>themes/default/mActionZoomToLayer.png</file>
<file>themes/default/mActionZoomToSelected.png</file>
<file>themes/default/mIconDelete.png</file>
<file>themes/default/mIconEditable.png</file>
<file>themes/default/mIconFirst.png</file>
<file>themes/default/mIconGeometryLayer.png</file>
<file>themes/default/mIconLast.png</file>
<file>themes/default/mIconLayer.png</file>
<file>themes/default/mIconLineLayer.png</file>
<file>themes/default/mIconLock.png</file>
<file>themes/default/mIconNew.png</file>
<file>themes/default/mIconNext.png</file>
<file>themes/default/mIconNoPyramid.png</file>
<file>themes/default/mIconPointLayer.png</file>
<file>themes/default/mIconPolygonLayer.png</file>
<file>themes/default/mIconPrevious.png</file>
<file>themes/default/mIconProjectionDisabled.png</file>
<file>themes/default/mIconProjectionEnabled.png</file>
<file>themes/default/mIconProjectionProblem.png</file>
<file>themes/default/mIconProperties.png</file>
<file>themes/default/mIconPyramid.png</file>
<file>themes/default/mIconSymbology.png</file>
<file>themes/default/mIconUnknownLayerType.png</file>
<file>themes/default/mIconWaitingForLayerType.png</file>
<file>themes/default/mMapserverExport.png</file>
<file>themes/default/rendererCategorizedSymbol.png</file>
<file>themes/default/rendererGraduatedSymbol.png</file>
<file>themes/default/rendererSingleSymbol.png</file>
<file>themes/default/symbologyAdd.png</file>
<file>themes/default/symbologyDown.png</file>
<file>themes/default/symbologyEdit.png</file>
<file>themes/default/symbologyLock.png</file>
<file>themes/default/symbologyRemove.png</file>
<file>themes/default/symbologyUp.png</file>
<file>themes/default/tracking.png</file>
<file>themes/default/qgis.xpm</file>
<file>themes/newgis/propertyicons/action.png</file>
<file>themes/newgis/propertyicons/attributes.png</file>
<file>themes/newgis/propertyicons/colormap.png</file>
<file>themes/newgis/propertyicons/CRS.png</file>
<file>themes/newgis/propertyicons/diagram.png</file>
<file>themes/newgis/propertyicons/digitising.png</file>
<file>themes/newgis/propertyicons/general.png</file>
<file>themes/newgis/propertyicons/histogram.png</file>
<file>themes/newgis/propertyicons/labels.png</file>
<file>themes/newgis/propertyicons/locale.png</file>
<file>themes/newgis/propertyicons/map_tools.png</file>
<file>themes/newgis/propertyicons/metadata.png</file>
<file>themes/newgis/propertyicons/network_and_proxy.png</file>
<file>themes/newgis/propertyicons/overlay.png</file>
<file>themes/newgis/propertyicons/pyramids.png</file>
<file>themes/newgis/propertyicons/rendering.png</file>
<file>themes/newgis/propertyicons/symbology.png</file>
<file>themes/newgis/propertyicons/transparency.png</file>
<file>icons/qgis-icon-16x16.png</file>
<file>icons/qgis-icon-60x60.png</file>
</qresource>
</RCC>
4 changes: 4 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ IF (HAVE_SPATIALITE)
ENDIF (HAVE_SPATIALITE)


SET(IMAGE_RCCS ../../images/images.qrc)

QT4_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})

QT4_WRAP_CPP(QGIS_APP_MOC_SRCS ${QGIS_APP_MOC_HDRS})


Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :


// add the themes to the combo box on the option dialog
QDir myThemeDir( QgsApplication::pkgDataPath() + "/themes/" );
QDir myThemeDir( ":/images/themes/" );
myThemeDir.setFilter( QDir::Dirs );
QStringList myDirList = myThemeDir.entryList( QStringList( "*" ) );
cmbTheme->clear();
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ const QString QgsApplication::pkgDataPath()
}
const QString QgsApplication::defaultThemePath()
{
return mPkgDataPath + "/themes/default/";
return ":/images/themes/default/";
}
const QString QgsApplication::activeThemePath()
{
return mPkgDataPath + "/themes/" + mThemeName + "/";
return ":/images/themes/" + mThemeName + "/";
}

/*!
Expand Down
Loading

0 comments on commit b364748

Please sign in to comment.