Skip to content
Permalink
Browse files

icon themes support for the mapserver_export plugin

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10381 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty
borysiasty committed Mar 21, 2009
1 parent 2328470 commit 07867324830251842203fa39dc4ba91faa731a79
@@ -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)

File renamed without changes.
@@ -34,9 +34,22 @@ def __init__(self, iface):
# 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 @@
\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>

0 comments on commit 0786732

Please sign in to comment.
You can’t perform that action at this time.