Skip to content

Commit 00ee2ad

Browse files
committedDec 31, 2016
[processing] vectorize and improve menu icons (fixes #14474)
1 parent d411b67 commit 00ee2ad

31 files changed

+35
-29
lines changed
 

‎python/plugins/processing/ProcessingPlugin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,29 @@ def initGui(self):
7272
self.toolboxAction = self.toolbox.toggleViewAction()
7373
self.toolboxAction.setObjectName('toolboxAction')
7474
self.toolboxAction.setIcon(
75-
QIcon(os.path.join(cmd_folder, 'images', 'alg.png')))
75+
QIcon(os.path.join(cmd_folder, 'images', 'alg.svg')))
7676
self.toolboxAction.setText(self.tr('&Toolbox'))
7777
self.iface.registerMainWindowAction(self.toolboxAction, 'Ctrl+Alt+T')
7878
self.menu.addAction(self.toolboxAction)
7979

8080
self.modelerAction = QAction(
81-
QIcon(os.path.join(cmd_folder, 'images', 'model.png')),
81+
QIcon(os.path.join(cmd_folder, 'images', 'model.svg')),
8282
self.tr('Graphical &Modeler...'), self.iface.mainWindow())
8383
self.modelerAction.setObjectName('modelerAction')
8484
self.modelerAction.triggered.connect(self.openModeler)
8585
self.iface.registerMainWindowAction(self.modelerAction, 'Ctrl+Alt+M')
8686
self.menu.addAction(self.modelerAction)
8787

8888
self.historyAction = QAction(
89-
QIcon(os.path.join(cmd_folder, 'images', 'history.gif')),
89+
QIcon(os.path.join(cmd_folder, 'images', 'history.svg')),
9090
self.tr('&History...'), self.iface.mainWindow())
9191
self.historyAction.setObjectName('historyAction')
9292
self.historyAction.triggered.connect(self.openHistory)
9393
self.iface.registerMainWindowAction(self.historyAction, 'Ctrl+Alt+H')
9494
self.menu.addAction(self.historyAction)
9595

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

108108
self.commanderAction = QAction(
109-
QIcon(os.path.join(cmd_folder, 'images', 'commander.png')),
109+
QIcon(os.path.join(cmd_folder, 'images', 'commander.svg')),
110110
self.tr('&Commander'), self.iface.mainWindow())
111111
self.commanderAction.setObjectName('commanderAction')
112112
self.commanderAction.triggered.connect(self.openCommander)

‎python/plugins/processing/core/AlgorithmProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def getDescription(self):
101101
return self.tr('Generic algorithm provider')
102102

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

106106
def getSupportedOutputRasterLayerExtensions(self):
107107
return ['tif']

‎python/plugins/processing/core/GeoAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
class GeoAlgorithm(object):
5353

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

‎python/plugins/processing/core/ProcessingConfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class ProcessingConfig(object):
7070

7171
@staticmethod
7272
def initialize():
73-
icon = QIcon(os.path.dirname(__file__) + '/../images/alg.png')
73+
icon = QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
7474
ProcessingConfig.settingIcons['General'] = icon
7575
ProcessingConfig.addSetting(Setting(
7676
ProcessingConfig.tr('General'),
@@ -167,11 +167,11 @@ def setGroupIcon(group, icon):
167167
@staticmethod
168168
def getGroupIcon(group):
169169
if group == ProcessingConfig.tr('General'):
170-
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
170+
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
171171
if group in ProcessingConfig.settingIcons:
172172
return ProcessingConfig.settingIcons[group]
173173
else:
174-
return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
174+
return QIcon(os.path.dirname(__file__) + '/../images/alg.svg')
175175

176176
@staticmethod
177177
def addSetting(setting):

‎python/plugins/processing/gui/BatchPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, parent, alg):
7373
self.btnRemove.setIcon(QgsApplication.getThemeIcon('/symbologyRemove.svg'))
7474
self.btnOpen.setIcon(QgsApplication.getThemeIcon('/mActionFileOpen.svg'))
7575
self.btnSave.setIcon(QgsApplication.getThemeIcon('/mActionFileSave.svg'))
76-
self.btnAdvanced.setIcon(QIcon(os.path.join(pluginPath, 'images', 'alg.png')))
76+
self.btnAdvanced.setIcon(QIcon(os.path.join(pluginPath, 'images', 'alg.svg')))
7777

7878
self.alg = alg
7979
self.parent = parent

‎python/plugins/processing/gui/ConfigDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def fillTreeUsingProviders(self):
160160
Filter 'Providers' items
161161
"""
162162
providersItem = QStandardItem(self.tr('Providers'))
163-
icon = QIcon(os.path.join(pluginPath, 'images', 'alg.png'))
163+
icon = QIcon(os.path.join(pluginPath, 'images', 'alg.svg'))
164164
providersItem.setIcon(icon)
165165
providersItem.setEditable(False)
166166
emptyItem = QStandardItem()

‎python/plugins/processing/gui/CreateNewScriptAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, actionName, scriptType):
4949

5050
def getIcon(self):
5151
if self.scriptType == self.SCRIPT_PYTHON:
52-
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
52+
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
5353
elif self.scriptType == self.SCRIPT_R:
5454
return QIcon(os.path.join(pluginPath, 'images', 'r.svg'))
5555

‎python/plugins/processing/gui/GetScriptsAndModels.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self):
6262
self.group, self.i18n_group = self.trAction('Tools')
6363

6464
def getIcon(self):
65-
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
65+
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
6666

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

9696
def getIcon(self):
97-
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
97+
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
9898

9999
def execute(self):
100100
dlg = GetScriptsAndModelsDialog(GetScriptsAndModelsDialog.MODELS)
@@ -137,11 +137,11 @@ def __init__(self, resourceType):
137137
if self.resourceType == self.MODELS:
138138
self.folder = ModelerUtils.modelsFolders()[0]
139139
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/models/'
140-
self.icon = QIcon(os.path.join(pluginPath, 'images', 'model.png'))
140+
self.icon = QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
141141
elif self.resourceType == self.SCRIPTS:
142142
self.folder = ScriptUtils.scriptsFolders()[0]
143143
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/'
144-
self.icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))
144+
self.icon = QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
145145
else:
146146
self.folder = RUtils.RScriptsFolders()[0]
147147
self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/rscripts/'

‎python/plugins/processing/gui/ToolboxAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def setData(self, toolbox):
3737
self.toolbox = toolbox
3838

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

4242
def tr(self, string, context=''):
4343
if context == '':
-588 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
-333 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
-146 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
-843 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
-1.23 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
-668 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading

‎python/plugins/processing/metadata.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ qgisMinimumVersion=2.13
99
author=Victor Olaya
1010
email=volayaf@gmail.com
1111

12-
icon=images/alg.png
12+
icon=images/alg.svg
1313

1414
homepage=http://qgis.org
1515
tracker=https://hub.qgis.org/projects/quantum-gis/issues
16-
repository=https://github.com/qgis/QGIS
16+
repository=https://github.com/qgis/QGIS

‎python/plugins/processing/modeler/AddModelFromFileAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self):
4646
self.group, self.i18n_group = self.trAction('Tools')
4747

4848
def getIcon(self):
49-
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
49+
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
5050

5151
def execute(self):
5252
settings = QSettings()

‎python/plugins/processing/modeler/CreateNewModelAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self):
4141
self.group, self.i18n_group = self.trAction('Tools')
4242

4343
def getIcon(self):
44-
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
44+
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
4545

4646
def execute(self):
4747
dlg = ModelerDialog()

‎python/plugins/processing/modeler/ModelerAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def __init__(self):
263263
GeoAlgorithm.__init__(self)
264264

265265
def getIcon(self):
266-
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
266+
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
267267

268268
def defineCharacteristics(self):
269269
classes = [ParameterRaster, ParameterVector, ParameterTable, ParameterTableField,

‎python/plugins/processing/modeler/ModelerAlgorithmProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def getName(self):
6767
return 'model'
6868

6969
def getIcon(self):
70-
return QIcon(os.path.join(pluginPath, 'images', 'model.png'))
70+
return QIcon(os.path.join(pluginPath, 'images', 'model.svg'))
7171

7272
def _loadAlgorithms(self):
7373
folders = ModelerUtils.modelsFolders()

‎python/plugins/processing/preconfigured/PreconfiguredAlgorithmProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _loadAlgorithms(self):
5454
self.algs.append(alg)
5555

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

5959
def getName(self):
6060
return 'preconfigured'

‎python/plugins/processing/script/AddScriptFromFileAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self):
4747
self.group, self.i18n_group = self.trAction('Tools')
4848

4949
def getIcon(self):
50-
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
50+
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
5151

5252
def execute(self):
5353
settings = QSettings()

‎python/plugins/processing/script/CreateScriptCollectionPluginAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self):
7777
self.group, self.i18n_group = self.trAction('Tools')
7878

7979
def getIcon(self):
80-
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
80+
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
8181

8282
def execute(self):
8383
dlg = ScriptSelector()

‎python/plugins/processing/script/ScriptAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, descriptionFile, script=None):
5252
"""
5353

5454
GeoAlgorithm.__init__(self)
55-
self._icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))
55+
self._icon = QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
5656

5757
self.script = script
5858
self.allowEdit = True

‎python/plugins/processing/script/ScriptAlgorithmProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def unload(self):
6767
ProcessingConfig.addSetting(ScriptUtils.SCRIPTS_FOLDER)
6868

6969
def getIcon(self):
70-
return QIcon(os.path.join(pluginPath, 'images', 'script.png'))
70+
return QIcon(os.path.join(pluginPath, 'images', 'script.svg'))
7171

7272
def getName(self):
7373
return 'script'

0 commit comments

Comments
 (0)
Please sign in to comment.