Skip to content

Commit

Permalink
[needs-docs][processing] vectorize and improve remaining geometry too…
Browse files Browse the repository at this point in the history
…ls menu icons
  • Loading branch information
nirvn committed May 15, 2018
1 parent 395e864 commit 5cb8c25
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 11 deletions.
6 changes: 6 additions & 0 deletions images/images.qrc
Expand Up @@ -78,22 +78,28 @@
<file>composer/missing_image.svg</file>
<file>themes/default/algorithms/mAlgorithmBuffer.svg</file>
<file>themes/default/algorithms/mAlgorithmCentroids.svg</file>
<file>themes/default/algorithms/mAlgorithmCheckGeometry.svg</file>
<file>themes/default/algorithms/mAlgorithmClip.svg</file>
<file>themes/default/algorithms/mAlgorithmCollect.svg</file>
<file>themes/default/algorithms/mAlgorithmConvexHull.svg</file>
<file>themes/default/algorithms/mAlgorithmDelaunay.svg</file>
<file>themes/default/algorithms/mAlgorithmDifference.svg</file>
<file>themes/default/algorithms/mAlgorithmDissolve.svg</file>
<file>themes/default/algorithms/mAlgorithmAddGeometryAttributes.svg</file>
<file>themes/default/algorithms/mAlgorithmExtractVertices.svg</file>
<file>themes/default/algorithms/mAlgorithmIntersect.svg</file>
<file>themes/default/algorithms/mAlgorithmLineIntersections.svg</file>
<file>themes/default/algorithms/mAlgorithmLineToPolygon.svg</file>
<file>themes/default/algorithms/mAlgorithmMeanCoordinates.svg</file>
<file>themes/default/algorithms/mAlgorithmMergeLayers.svg</file>
<file>themes/default/algorithms/mAlgorithmMultiToSingle.svg</file>
<file>themes/default/algorithms/mAlgorithmPolygonToLine.svg</file>
<file>themes/default/algorithms/mAlgorithmSimplify.svg</file>
<file>themes/default/algorithms/mAlgorithmSingleToMulti.svg</file>
<file>themes/default/algorithms/mAlgorithmSplitLayer.svg</file>
<file>themes/default/algorithms/mAlgorithmSymmetricalDifference.svg</file>
<file>themes/default/algorithms/mAlgorithmUnion.svg</file>
<file>themes/default/algorithms/mAlgorithmVoronoi.svg</file>
<file>themes/default/cap_flat.svg</file>
<file>themes/default/cap_round.svg</file>
<file>themes/default/cap_square.svg</file>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/algorithms/mAlgorithmDelaunay.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/algorithms/mAlgorithmVoronoi.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/CheckValidity.py
Expand Up @@ -30,7 +30,8 @@
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtCore import QVariant

from qgis.core import (QgsSettings,
from qgis.core import (QgsApplication,
QgsSettings,
QgsGeometry,
QgsFeature,
QgsField,
Expand Down Expand Up @@ -63,7 +64,10 @@ class CheckValidity(QgisAlgorithm):
ERROR_COUNT = 'ERROR_COUNT'

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmCheckGeometry.svg")

def group(self):
return self.tr('Vector geometry')
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/Delaunay.py
Expand Up @@ -30,7 +30,8 @@
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtCore import QVariant

from qgis.core import (QgsField,
from qgis.core import (QgsApplication,
QgsField,
QgsFeatureRequest,
QgsFeatureSink,
QgsFeature,
Expand All @@ -56,7 +57,10 @@ class Delaunay(QgisAlgorithm):
OUTPUT = 'OUTPUT'

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmDelaunay.svg")

def group(self):
return self.tr('Vector geometry')
Expand Down
6 changes: 5 additions & 1 deletion python/plugins/processing/algs/qgis/ExportGeometryInfo.py
Expand Up @@ -32,6 +32,7 @@
from qgis.PyQt.QtCore import QVariant

from qgis.core import (NULL,
QgsApplication,
QgsCoordinateTransform,
QgsField,
QgsFields,
Expand All @@ -58,7 +59,10 @@ class ExportGeometryInfo(QgisAlgorithm):
OUTPUT = 'OUTPUT'

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmAddGeometryAttributes.svg")

def tags(self):
return self.tr('export,add,information,measurements,areas,lengths,perimeters,latitudes,longitudes,x,y,z,extract,points,lines,polygons,sinuosity').split(',')
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/LinesToPolygons.py
Expand Up @@ -29,7 +29,8 @@

from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsFeature,
from qgis.core import (QgsApplication,
QgsFeature,
QgsGeometry,
QgsGeometryCollection,
QgsPolygon,
Expand All @@ -51,7 +52,10 @@
class LinesToPolygons(QgisFeatureBasedAlgorithm):

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmLineToPolygon.svg")

def tags(self):
return self.tr('line,polygon,convert').split(',')
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/PolygonsToLines.py
Expand Up @@ -29,7 +29,8 @@

from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsGeometry,
from qgis.core import (QgsApplication,
QgsGeometry,
QgsGeometryCollection,
QgsMultiLineString,
QgsMultiCurve,
Expand All @@ -44,7 +45,10 @@
class PolygonsToLines(QgisFeatureBasedAlgorithm):

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmPolygonToLine.svg")

def tags(self):
return self.tr('line,polygon,convert').split(',')
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/VoronoiPolygons.py
Expand Up @@ -29,7 +29,8 @@

from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsFeatureRequest,
from qgis.core import (QgsApplication,
QgsFeatureRequest,
QgsFeatureSink,
QgsFeature,
QgsGeometry,
Expand All @@ -56,7 +57,10 @@ class VoronoiPolygons(QgisAlgorithm):
OUTPUT = 'OUTPUT'

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

def svgIconPath(self):
return QgsApplication.iconPath("/algorithms/mAlgorithmVoronoi.svg")

def group(self):
return self.tr('Vector geometry')
Expand Down

0 comments on commit 5cb8c25

Please sign in to comment.