Skip to content

Commit

Permalink
[processing] remove unused icons and use SVG icon for Heatmap algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Feb 1, 2018
1 parent 3ab6e5c commit 55759a4
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -122,6 +122,7 @@
<file>themes/default/grass_mapset_open.png</file>
<file>themes/default/grass_mapset_search.png</file>
<file>themes/default/histogram.svg</file>
<file>themes/default/heatmap.svg</file>
<file>themes/default/join_bevel.svg</file>
<file>themes/default/join_miter.svg</file>
<file>themes/default/join_round.svg</file>
Expand Down
7 changes: 2 additions & 5 deletions python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -26,7 +26,6 @@
__revision__ = '$Format:%H$'

import shutil
import inspect
import os
import sys

Expand Down Expand Up @@ -55,9 +54,7 @@
from processing.gui.menus import removeMenus, initializeMenus, createMenus
from processing.core.ProcessingResults import resultsList

cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0]
if cmd_folder not in sys.path:
sys.path.insert(0, cmd_folder)
pluginPath = os.path.dirname(__file__)


class ProcessingOptionsFactory(QgsOptionsWidgetFactory):
Expand Down Expand Up @@ -208,7 +205,7 @@ def initGui(self):
self.menu.addAction(self.modelerAction)

self.historyAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'history.svg')),
QIcon(os.path.join(pluginPath, 'images', 'history.svg')),
self.tr('&History...'), self.iface.mainWindow())
self.historyAction.setObjectName('historyAction')
self.historyAction.triggered.connect(self.openHistory)
Expand Down
5 changes: 3 additions & 2 deletions python/plugins/processing/algs/qgis/Heatmap.py
Expand Up @@ -30,7 +30,8 @@

from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsFeatureRequest,
from qgis.core import (QgsApplication,
QgsFeatureRequest,
QgsRasterFileWriter,
QgsProcessing,
QgsProcessingException,
Expand Down Expand Up @@ -61,7 +62,7 @@ class Heatmap(QgisAlgorithm):
OUTPUT = 'OUTPUT'

def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'heatmap.png'))
return QgsApplication.getThemeIcon("/heatmap.svg")

def tags(self):
return self.tr('heatmap,kde,hotspot').split(',')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/images/CMakeLists.txt
@@ -1,4 +1,4 @@
FILE(GLOB IMAGE_FILES *.png *.gif *.svg)
FILE(GLOB IMAGE_FILES *.png *.svg)

ADD_SUBDIRECTORY(ftools)
ADD_SUBDIRECTORY(gdaltools)
Expand Down
1 change: 0 additions & 1 deletion python/plugins/processing/images/commander.svg

This file was deleted.

Binary file removed python/plugins/processing/images/edithelp.png
Binary file not shown.
Binary file removed python/plugins/processing/images/heatmap.png
Binary file not shown.
Binary file removed python/plugins/processing/images/otb.png
Binary file not shown.
Binary file removed python/plugins/processing/images/runalgorithm.png
Binary file not shown.
Binary file removed python/plugins/processing/images/saga.png
Binary file not shown.
Binary file removed python/plugins/processing/images/tool.png
Binary file not shown.

0 comments on commit 55759a4

Please sign in to comment.