[QGIS Commit] r10381 - trunk/qgis/python/plugins/mapserver_export
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Mar 21 16:27:10 EDT 2009
Author: borysiasty
Date: 2009-03-21 16:27:10 -0400 (Sat, 21 Mar 2009)
New Revision: 10381
Added:
trunk/qgis/python/plugins/mapserver_export/mapserver_export.png
Removed:
trunk/qgis/python/plugins/mapserver_export/icon.png
Modified:
trunk/qgis/python/plugins/mapserver_export/CMakeLists.txt
trunk/qgis/python/plugins/mapserver_export/__init__.py
trunk/qgis/python/plugins/mapserver_export/mapserverexport.py
trunk/qgis/python/plugins/mapserver_export/resources.py
trunk/qgis/python/plugins/mapserver_export/resources.qrc
Log:
icon themes support for the mapserver_export plugin
Modified: trunk/qgis/python/plugins/mapserver_export/CMakeLists.txt
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/CMakeLists.txt 2009-03-21 20:26:46 UTC (rev 10380)
+++ trunk/qgis/python/plugins/mapserver_export/CMakeLists.txt 2009-03-21 20:27:10 UTC (rev 10381)
@@ -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
Modified: trunk/qgis/python/plugins/mapserver_export/__init__.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/__init__.py 2009-03-21 20:26:46 UTC (rev 10380)
+++ trunk/qgis/python/plugins/mapserver_export/__init__.py 2009-03-21 20:27:10 UTC (rev 10381)
@@ -26,9 +26,10 @@
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)
-
Deleted: trunk/qgis/python/plugins/mapserver_export/icon.png
===================================================================
(Binary files differ)
Added: trunk/qgis/python/plugins/mapserver_export/mapserver_export.png
===================================================================
(Binary files differ)
Property changes on: trunk/qgis/python/plugins/mapserver_export/mapserver_export.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/qgis/python/plugins/mapserver_export/mapserverexport.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/mapserverexport.py 2009-03-21 20:26:46 UTC (rev 10380)
+++ trunk/qgis/python/plugins/mapserver_export/mapserverexport.py 2009-03-21 20:27:10 UTC (rev 10381)
@@ -34,9 +34,22 @@
# 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
Modified: trunk/qgis/python/plugins/mapserver_export/resources.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/resources.py 2009-03-21 20:26:46 UTC (rev 10380)
+++ trunk/qgis/python/plugins/mapserver_export/resources.py 2009-03-21 20:27:10 UTC (rev 10381)
@@ -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 = "\
Modified: trunk/qgis/python/plugins/mapserver_export/resources.qrc
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/resources.qrc 2009-03-21 20:26:46 UTC (rev 10380)
+++ trunk/qgis/python/plugins/mapserver_export/resources.qrc 2009-03-21 20:27:10 UTC (rev 10381)
@@ -1,6 +1,6 @@
<RCC>
<qresource prefix="/plugins/mapserver_export" >
- <file>icon.png</file>
+ <file>mapserver_export.png</file>
</qresource>
</RCC>
More information about the QGIS-commit
mailing list