Skip to content
Permalink
Browse files

[processing] vectorize and improve menu icons (fixes #14474)

  • Loading branch information
nirvn committed Dec 31, 2016
1 parent d411b67 commit 00ee2ad9899bf3df48e1ccd7f02b55e803e0c92e
Showing with 35 additions and 29 deletions.
  1. +5 −5 python/plugins/processing/ProcessingPlugin.py
  2. +1 −1 python/plugins/processing/core/AlgorithmProvider.py
  3. +1 −1 python/plugins/processing/core/GeoAlgorithm.py
  4. +3 −3 python/plugins/processing/core/ProcessingConfig.py
  5. +1 −1 python/plugins/processing/gui/BatchPanel.py
  6. +1 −1 python/plugins/processing/gui/ConfigDialog.py
  7. +1 −1 python/plugins/processing/gui/CreateNewScriptAction.py
  8. +4 −4 python/plugins/processing/gui/GetScriptsAndModels.py
  9. +1 −1 python/plugins/processing/gui/ToolboxAction.py
  10. BIN python/plugins/processing/images/alg.png
  11. +1 −0 python/plugins/processing/images/alg.svg
  12. BIN python/plugins/processing/images/commander.png
  13. +1 −0 python/plugins/processing/images/commander.svg
  14. BIN python/plugins/processing/images/history.gif
  15. +1 −0 python/plugins/processing/images/history.svg
  16. BIN python/plugins/processing/images/model.png
  17. +1 −0 python/plugins/processing/images/model.svg
  18. BIN python/plugins/processing/images/results.png
  19. +1 −0 python/plugins/processing/images/results.svg
  20. BIN python/plugins/processing/images/script.png
  21. +1 −0 python/plugins/processing/images/script.svg
  22. +2 −2 python/plugins/processing/metadata.txt
  23. +1 −1 python/plugins/processing/modeler/AddModelFromFileAction.py
  24. +1 −1 python/plugins/processing/modeler/CreateNewModelAction.py
  25. +1 −1 python/plugins/processing/modeler/ModelerAlgorithm.py
  26. +1 −1 python/plugins/processing/modeler/ModelerAlgorithmProvider.py
  27. +1 −1 python/plugins/processing/preconfigured/PreconfiguredAlgorithmProvider.py
  28. +1 −1 python/plugins/processing/script/AddScriptFromFileAction.py
  29. +1 −1 python/plugins/processing/script/CreateScriptCollectionPluginAction.py
  30. +1 −1 python/plugins/processing/script/ScriptAlgorithm.py
  31. +1 −1 python/plugins/processing/script/ScriptAlgorithmProvider.py
@@ -72,29 +72,29 @@ def initGui(self):
self.toolboxAction = self.toolbox.toggleViewAction()
self.toolboxAction.setObjectName('toolboxAction')
self.toolboxAction.setIcon(
QIcon(os.path.join(cmd_folder, 'images', 'alg.png')))
QIcon(os.path.join(cmd_folder, 'images', 'alg.svg')))
self.toolboxAction.setText(self.tr('&Toolbox'))
self.iface.registerMainWindowAction(self.toolboxAction, 'Ctrl+Alt+T')
self.menu.addAction(self.toolboxAction)

self.modelerAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'model.png')),
QIcon(os.path.join(cmd_folder, 'images', 'model.svg')),
self.tr('Graphical &Modeler...'), self.iface.mainWindow())
self.modelerAction.setObjectName('modelerAction')
self.modelerAction.triggered.connect(self.openModeler)
self.iface.registerMainWindowAction(self.modelerAction, 'Ctrl+Alt+M')
self.menu.addAction(self.modelerAction)

self.historyAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'history.gif')),
QIcon(os.path.join(cmd_folder, 'images', 'history.svg')),
self.tr('&History...'), self.iface.mainWindow())
self.historyAction.setObjectName('historyAction')
self.historyAction.triggered.connect(self.openHistory)
self.iface.registerMainWindowAction(self.historyAction, 'Ctrl+Alt+H')
self.menu.addAction(self.historyAction)

self.resultsAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'results.png')),
QIcon(os.path.join(cmd_folder, 'images', 'results.svg')),
self.tr('&Results Viewer...'), self.iface.mainWindow())
self.resultsAction.setObjectName('resultsAction')
self.resultsAction.triggered.connect(self.openResults)
@@ -106,7 +106,7 @@ def initGui(self):
self.iface.firstRightStandardMenu().menuAction(), self.menu)

self.commanderAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'commander.png')),
QIcon(os.path.join(cmd_folder, 'images', 'commander.svg')),
self.tr('&Commander'), self.iface.mainWindow())
self.commanderAction.setObjectName('commanderAction')
self.commanderAction.triggered.connect(self.openCommander)
@@ -101,7 +101,7 @@ def getDescription(self):
return self.tr('Generic algorithm provider')

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')

def getSupportedOutputRasterLayerExtensions(self):
return ['tif']
@@ -52,7 +52,7 @@
class GeoAlgorithm(object):

def __init__(self):
self._icon = QIcon(os.path.dirname(__file__) + '/../images/alg.png')
self._icon = QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
# Parameters needed by the algorithm
self.parameters = list()

@@ -70,7 +70,7 @@ class ProcessingConfig(object):

@staticmethod
def initialize():
icon = QIcon(os.path.dirname(__file__) + '/../images/alg.png')
icon = QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
ProcessingConfig.settingIcons['General'] = icon
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
@@ -167,11 +167,11 @@ def setGroupIcon(group, icon):
@staticmethod
def getGroupIcon(group):
if group == ProcessingConfig.tr('General'):
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
if group in ProcessingConfig.settingIcons:
return ProcessingConfig.settingIcons[group]
else:
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')

@staticmethod
def addSetting(setting):
@@ -73,7 +73,7 @@ def __init__(self, parent, alg):
self.btnRemove.setIcon(QgsApplication.getThemeIcon('/symbologyRemove.svg'))
self.btnOpen.setIcon(QgsApplication.getThemeIcon('/mActionFileOpen.svg'))
self.btnSave.setIcon(QgsApplication.getThemeIcon('/mActionFileSave.svg'))
self.btnAdvanced.setIcon(QIcon(os.path.join(pluginPath, 'images', 'alg.png')))
self.btnAdvanced.setIcon(QIcon(os.path.join(pluginPath, 'images', 'alg.svg')))

self.alg = alg
self.parent = parent
@@ -160,7 +160,7 @@ def fillTreeUsingProviders(self):
Filter 'Providers' items
"""
providersItem = QStandardItem(self.tr('Providers'))
icon = QIcon(os.path.join(pluginPath, 'images', 'alg.png'))
icon = QIcon(os.path.join(pluginPath, 'images', 'alg.svg'))
providersItem.setIcon(icon)
providersItem.setEditable(False)
emptyItem = QStandardItem()
@@ -49,7 +49,7 @@ def __init__(self, actionName, scriptType):

def getIcon(self):
if self.scriptType == self.SCRIPT_PYTHON:
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
elif self.scriptType == self.SCRIPT_R:
return QIcon(os.path.join(pluginPath, 'images', 'r.svg'))

@@ -62,7 +62,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))

def execute(self):
dlg = GetScriptsAndModelsDialog(GetScriptsAndModelsDialog.SCRIPTS)
@@ -94,7 +94,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))

def execute(self):
dlg = GetScriptsAndModelsDialog(GetScriptsAndModelsDialog.MODELS)
@@ -137,11 +137,11 @@ def __init__(self, resourceType):
if self.resourceType == self.MODELS:
self.folder = ModelerUtils.modelsFolders()[0]
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/models/'
self.icon = QIcon(os.path.join(pluginPath, 'images', 'model.png'))
self.icon = QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
elif self.resourceType == self.SCRIPTS:
self.folder = ScriptUtils.scriptsFolders()[0]
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/'
self.icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))
self.icon = QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
else:
self.folder = RUtils.RScriptsFolders()[0]
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/rscripts/'
@@ -37,7 +37,7 @@ def setData(self, toolbox):
self.toolbox = toolbox

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')

def tr(self, string, context=''):
if context == '':
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M11.158 1.5l-.803 2.234.012.13.39 1.94-2.26.934-1.095-1.646-.084-.098L5.17 3.98 3.98 5.17l1.014 2.148.098.084 1.646 1.096-.935 2.258-1.94-.39-.13-.01-2.233.802v1.684l2.234.803.13-.012 1.94-.39.934 2.26-1.646 1.095-.098.084L3.98 18.83l1.19 1.19 2.148-1.014.084-.098 1.096-1.646 2.258.935-.39 1.94-.01.13.802 2.233h1.684l.803-2.234-.012-.13-.39-1.94 2.26-.934 1.095 1.646.084.098 2.148 1.014 1.19-1.19-1.014-2.148-.098-.084-1.646-1.096.935-2.258 1.94.39.13.01 2.233-.802v-1.684l-2.234-.803-.13.012-1.94.39-.934-2.26 1.646-1.095.098-.084L20.02 5.17l-1.19-1.19-2.148 1.014-.084.098-1.096 1.646-2.258-.935.39-1.94.01-.13-.802-2.233h-1.684zm.842 8a2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5A2.5 2.5 0 0 1 9.5 12 2.5 2.5 0 0 1 12 9.5z" fill="#98b5d8" stroke="#457abe"/></svg>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12.174 2.714l-1.473 1.5L18.354 12 10.7 19.788l1.474 1.5L21.3 12l-9.126-9.286z" fill="#fff" stroke="#fff" stroke-width="3" stroke-linecap="square"/><path d="M6.174 2.714L4.7 4.214 12.354 12 4.7 19.788l1.474 1.5L15.3 12 6.173 2.714z" fill="#fff" stroke="#fff" stroke-width="3" stroke-linecap="square"/><path d="M12.174 2.714l-1.473 1.5L18.354 12 10.7 19.788l1.474 1.5L21.3 12l-9.126-9.286z" fill="#888a85" stroke="#404040" stroke-linecap="square"/><path d="M6.174 2.714L4.7 4.214 12.354 12 4.7 19.788l1.474 1.5L15.3 12 6.173 2.714z" fill="#888a85" stroke="#404040" stroke-linecap="square"/></svg>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><circle cx="12" cy="12" r="10.5" fill="#f0f3f2" stroke="#404040" stroke-linecap="square"/><path d="M12 11.993V4.508M16.994 14.996l-4.988-2.992" fill="#888a85" stroke="#404040" stroke-linecap="round"/><path d="M9.04 21.914C4.32 19.527.61 13.574 3.72 7.297c2.89-5.12 9.05-5.62 13.186-4.516" fill="none" stroke="#fff" stroke-linecap="round"/><circle cx="12" cy="12" r="10.5" fill="none" stroke="#888a85" stroke-linecap="square"/></svg>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M6.94.5l-.536 1.49.007.086.26 1.292-1.505.624-.73-1.097-.056-.066-1.433-.676-.793.793.675 1.432.065.055 1.097.73-.624 1.506-1.292-.26-.086-.006L.5 6.94v1.12l1.49.536.086-.007 1.292-.26.624 1.505-1.097.73-.066.056-.676 1.433.793.793 1.432-.675.055-.065.73-1.097 1.506.624-.26 1.292-.006.086.535 1.49h1.12l.536-1.49-.007-.086-.26-1.292 1.505-.624.73 1.097.056.066 1.433.676.793-.793-.675-1.432-.065-.055-1.097-.73.624-1.506 1.292.26.086.006 1.49-.535V6.94l-1.49-.536-.086.007-1.292.26-.624-1.505 1.097-.73.066-.056.676-1.433-.793-.793-1.432.675-.055.065-.73 1.097-1.506-.624.26-1.292.006-.086L8.06.5H6.94zm.56 5.333A1.667 1.667 0 0 1 9.167 7.5 1.667 1.667 0 0 1 7.5 9.167 1.667 1.667 0 0 1 5.833 7.5 1.667 1.667 0 0 1 7.5 5.833z" fill="#d31412" fill-opacity=".988" stroke="#bc0f10"/><path d="M20.366 7.35l-.854.88-.022.064-.23.996-1.262-.04-.165-1.01-.018-.064-.795-.935-.813.307.02 1.228.027.06.54.867-.92.864-.83-.597-.058-.034-1.222-.098-.36.792.88.855.064.022.996.23-.04 1.262-1.01.164-.063.02-.934.794.306.814 1.227-.02.06-.027.866-.542.863.922-.598.83-.032.058-.1 1.223.793.36.854-.882.022-.063.23-.995 1.26.04.166 1.01.018.064.795.934.812-.306-.02-1.228-.027-.06-.54-.867.92-.864.83.596.058.033 1.222.097.36-.792-.88-.855-.064-.022-.994-.23.04-1.263 1.01-.164.062-.018.935-.795-.306-.814-1.227.02-.06.027-.867.542-.863-.922.597-.83.033-.058.098-1.223-.792-.36zm-1.31 3.946a1.29 1.292 2.788 0 1 .645 1.71 1.29 1.292 2.788 0 1-1.708.643 1.29 1.292 2.788 0 1-.644-1.71 1.29 1.292 2.788 0 1 1.71-.644z" fill="#7c7c7c" stroke="#686868" stroke-width=".5"/><path d="M11.17 15.2l-.332.913.004.053.157.795-.927.38-.446-.676-.034-.04-.88-.42-.487.486.412.882.04.034.672.452-.386.922-.793-.162-.052-.005-.916.325-.002.69.914.33.052-.003L8.96 20l.38.925-.674.446-.04.035-.418.878.485.49.88-.413.035-.04.45-.672.924.387-.16.793-.006.053.325.917.69.003.332-.913-.004-.053L12 22.04l.927-.38.446.676.034.04.88.418.487-.485-.412-.882-.04-.034-.672-.452.386-.922.793.162.052.005.916-.325.002-.69-.914-.33-.052.003-.795.156-.38-.925.675-.446.04-.035.417-.878-.485-.49-.88.413-.035.04-.45.672-.924-.387.16-.793.006-.053-.325-.917-.69-.003zm.334 3.276a1.024 1.023 43.5 0 1 1.02 1.028 1.024 1.023 43.5 0 1-1.027 1.02 1.024 1.023 43.5 0 1-1.02-1.028 1.024 1.023 43.5 0 1 1.027-1.02z" fill="#98b5d8" stroke="#456fbe" stroke-width=".4" stroke-linejoin="round"/></svg>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><g fill-rule="evenodd" stroke="#888a85" stroke-linejoin="round" fill="#fff"><path d="M4.5 22.5v-21h10l5 5v16z"/><path d="M14.5 1.5v5h5z" fill="#f0f3f2"/></g><path d="M6 7.5h7M6 11.5h12M6 15.5h10M6 19.5h9" fill="#404040" stroke="#404040"/></svg>
Binary file not shown.
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="89.137" x2="147.777" y1="111.921" y2="168.101"><stop offset="0" stop-color="#ffe052"/><stop offset="1" stop-color="#ffc331"/></linearGradient><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="55.549" x2="110.149" y1="77.07" y2="131.853"><stop offset="0" stop-color="#387eb8"/><stop offset="1" stop-color="#366994"/></linearGradient><path overflow="visible" d="M99.75 67.47c-28.032 0-26.28 12.155-26.28 12.155l.03 12.594h26.75V96H62.875s-17.938-2.034-17.938 26.25 15.657 27.28 15.657 27.28h9.343v-13.124s-.503-15.656 15.407-15.656h26.53s14.907.24 14.907-14.406v-24.22s2.264-14.655-27.03-14.655zM85 75.937c2.66 0 4.813 2.15 4.813 4.812 0 2.66-2.152 4.813-4.813 4.813-2.66 0-4.813-2.152-4.813-4.813 0-2.66 2.152-4.813 4.813-4.813z" fill="url(#a)" transform="matrix(.18112 0 0 .18207 -6.14 -10.284)"/><path overflow="visible" d="M100.546 177.315c28.032 0 26.28-12.156 26.28-12.156l-.03-12.595h-26.75v-3.78h37.375s17.94 2.033 17.94-26.25c0-28.286-15.658-27.283-15.658-27.283h-9.343v13.125s.502 15.657-15.408 15.657h-26.53s-14.907-.24-14.907 14.406v24.22s-2.263 14.655 27.03 14.655zm14.75-8.47c-2.66 0-4.812-2.15-4.812-4.81 0-2.663 2.15-4.814 4.812-4.814 2.662 0 4.813 2.152 4.813 4.814 0 2.66-2.152 4.812-4.814 4.812z" fill="url(#b)" transform="matrix(.18112 0 0 .18207 -6.14 -10.284)"/></svg>
@@ -9,8 +9,8 @@ qgisMinimumVersion=2.13
author=Victor Olaya
email=volayaf@gmail.com

icon=images/alg.png
icon=images/alg.svg

homepage=http://qgis.org
tracker=https://hub.qgis.org/projects/quantum-gis/issues
repository=https://github.com/qgis/QGIS
repository=https://github.com/qgis/QGIS
@@ -46,7 +46,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))

def execute(self):
settings = QSettings()
@@ -41,7 +41,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))

def execute(self):
dlg = ModelerDialog()
@@ -263,7 +263,7 @@ def __init__(self):
GeoAlgorithm.__init__(self)

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))

def defineCharacteristics(self):
classes = [ParameterRaster, ParameterVector, ParameterTable, ParameterTableField,
@@ -67,7 +67,7 @@ def getName(self):
return 'model'

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))

def _loadAlgorithms(self):
folders = ModelerUtils.modelsFolders()
@@ -54,7 +54,7 @@ def _loadAlgorithms(self):
self.algs.append(alg)

def getIcon(self):
return QIcon(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'images', 'alg.png'))
return QIcon(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'images', 'alg.svg'))

def getName(self):
return 'preconfigured'
@@ -47,7 +47,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))

def execute(self):
settings = QSettings()
@@ -77,7 +77,7 @@ def __init__(self):
self.group, self.i18n_group = self.trAction('Tools')

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))

def execute(self):
dlg = ScriptSelector()
@@ -52,7 +52,7 @@ def __init__(self, descriptionFile, script=None):
"""

GeoAlgorithm.__init__(self)
self._icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))
self._icon = QIcon(os.path.join(pluginPath, 'images', 'script.svg'))

self.script = script
self.allowEdit = True
@@ -67,7 +67,7 @@ def unload(self):
ProcessingConfig.addSetting(ScriptUtils.SCRIPTS_FOLDER)

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))

def getName(self):
return 'script'

0 comments on commit 00ee2ad

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