mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
icon themes support for the mapserver_export plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk@10381 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
d4faea4145
commit
93ec920905
@ -1,7 +1,7 @@
|
||||
#TODO: Need to configure cmake to run pyrcc4 and pyuic4 as required when the resource
|
||||
# file or the ui change
|
||||
SET(INSTALLER_FILES
|
||||
icon.png
|
||||
mapserver_export.png
|
||||
__init__.py
|
||||
mapserverexportdialog.py
|
||||
mapserverexport.py
|
||||
|
@ -26,9 +26,10 @@ def description():
|
||||
def version():
|
||||
return "Version 0.1"
|
||||
def qgisMinimumVersion():
|
||||
return "1.0"
|
||||
return "1.0"
|
||||
def authorName():
|
||||
return "Gary E. Sherman"
|
||||
def classFactory(iface):
|
||||
# load MapServerExport class from file mapserverexport.py
|
||||
from mapserverexport import MapServerExport
|
||||
return MapServerExport(iface)
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@ -34,9 +34,22 @@ class MapServerExport:
|
||||
# Save reference to the QGIS interface
|
||||
self.iface = iface
|
||||
|
||||
def getThemeIcon(self, theName):
|
||||
myCurThemePath = QgsApplication.activeThemePath() + "/plugins/" + theName;
|
||||
myDefThemePath = QgsApplication.defaultThemePath() + "/plugins/" + theName;
|
||||
myQrcPath = ":/plugins/mapserver_export/" + theName;
|
||||
if QFile.exists(myCurThemePath):
|
||||
return QIcon(myCurThemePath)
|
||||
elif QFile.exists(myDefThemePath):
|
||||
return QIcon(myDefThemePath)
|
||||
elif QFile.exists(myQrcPath):
|
||||
return QIcon(myQrcPath)
|
||||
else:
|
||||
return QIcon()
|
||||
|
||||
def initGui(self):
|
||||
# Create action that will start plugin configuration
|
||||
self.action = QAction(QIcon(":/plugins/mapserver_export/icon.png"), \
|
||||
self.action = QAction(self.getThemeIcon("mapserver_export.png"), \
|
||||
"MapServer Export", self.iface.mainWindow())
|
||||
#self.action.setWhatsThis("Configuration for Zoom To Point plugin")
|
||||
# connect the action to the run method
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
# Resource object code
|
||||
#
|
||||
# Created: Mon Jan 7 20:40:39 2008
|
||||
# by: The Resource Compiler for PyQt (Qt v4.3.2)
|
||||
# Created: pon. sty 12 13:36:27 2009
|
||||
# by: The Resource Compiler for PyQt (Qt v4.3.4)
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
@ -260,10 +260,11 @@ qt_resource_name = "\
|
||||
\x06\x40\x0f\xf4\
|
||||
\x00\x6d\
|
||||
\x00\x61\x00\x70\x00\x73\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00\x5f\x00\x65\x00\x78\x00\x70\x00\x6f\x00\x72\x00\x74\
|
||||
\x00\x08\
|
||||
\x0a\x61\x5a\xa7\
|
||||
\x00\x69\
|
||||
\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
|
||||
\x00\x14\
|
||||
\x0f\xfb\xd7\x47\
|
||||
\x00\x6d\
|
||||
\x00\x61\x00\x70\x00\x73\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\x00\x5f\x00\x65\x00\x78\x00\x70\x00\x6f\x00\x72\x00\x74\x00\x2e\
|
||||
\x00\x70\x00\x6e\x00\x67\
|
||||
"
|
||||
|
||||
qt_resource_struct = "\
|
||||
|
@ -1,6 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/plugins/mapserver_export" >
|
||||
<file>icon.png</file>
|
||||
<file>mapserver_export.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user