-
Notifications
You must be signed in to change notification settings - Fork 65
/
provider.py
86 lines (79 loc) · 3.89 KB
/
provider.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
"""
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
import os
from qgis.core import QgsProcessingProvider
from qgis.PyQt.QtGui import QIcon
from .geodesicDensify import GeodesicDensifyAlgorithm
from .geodesicPointDecimate import GeodesicPointDecimateAlgorithm
from .geodesicLineDecimate import GeodesicLineDecimateAlgorithm
from .geodesicLayerMeasure import GeodesicLayerMeasureAlgorithm
from .geodesicTransformation import GeodesicTransformationsAlgorithm
from .xyToLine import XYToLineAlgorithm
from .geodesicFlip import GeodesicFlipAlgorithm
from .createCircle import CreateCircleAlgorithm
from .createDonut import CreateDonutAlgorithm
from .createEllipse import CreateEllipseAlgorithm
from .createLob import CreateLobAlgorithm
from .createPolygon import CreatePolygonAlgorithm
from .idlbreakline import IdlBreakLineAlgorithm
from .createPie import CreatePieAlgorithm
from .createArc import CreateArcAlgorithm
from .createStar import CreateStarAlgorithm
from .createGear import CreateGearAlgorithm
from .createRose import CreateRoseAlgorithm
from .createHypocycloid import CreateHypocycloidAlgorithm
from .createEpicycloid import CreateEpicycloidAlgorithm
from .createPolyfoil import CreatePolyfoilAlgorithm
from .createHeart import CreateHeartAlgorithm
from .createRadialLines import CreateRadialLinesAlgorithm
from .createPointsAlongLob import CreatePointsAlongLobAlgorithm
from .createRings import ConcentricRingsAlgorithm
from .interactiveCreateDonut import InteractiveCreateDonutAlgorithm
from . interactiveConcentricRings import InteractiveConcentricRingsAlgorithm
class ShapeToolsProvider(QgsProcessingProvider):
def unload(self):
QgsProcessingProvider.unload(self)
def loadAlgorithms(self):
self.addAlgorithm(GeodesicDensifyAlgorithm())
self.addAlgorithm(GeodesicPointDecimateAlgorithm())
self.addAlgorithm(GeodesicLineDecimateAlgorithm())
self.addAlgorithm(IdlBreakLineAlgorithm())
self.addAlgorithm(GeodesicLayerMeasureAlgorithm())
self.addAlgorithm(GeodesicTransformationsAlgorithm())
self.addAlgorithm(XYToLineAlgorithm())
self.addAlgorithm(GeodesicFlipAlgorithm())
self.addAlgorithm(CreateEllipseAlgorithm())
self.addAlgorithm(CreateCircleAlgorithm())
self.addAlgorithm(CreateDonutAlgorithm())
self.addAlgorithm(CreateLobAlgorithm())
self.addAlgorithm(CreatePointsAlongLobAlgorithm())
self.addAlgorithm(CreatePieAlgorithm())
self.addAlgorithm(CreateArcAlgorithm())
self.addAlgorithm(CreatePolygonAlgorithm())
self.addAlgorithm(CreateStarAlgorithm())
self.addAlgorithm(CreateGearAlgorithm())
self.addAlgorithm(CreateRoseAlgorithm())
self.addAlgorithm(CreateEpicycloidAlgorithm())
self.addAlgorithm(CreateHypocycloidAlgorithm())
self.addAlgorithm(CreatePolyfoilAlgorithm())
self.addAlgorithm(CreateHeartAlgorithm())
self.addAlgorithm(CreateRadialLinesAlgorithm())
self.addAlgorithm(InteractiveCreateDonutAlgorithm())
self.addAlgorithm(ConcentricRingsAlgorithm())
self.addAlgorithm(InteractiveConcentricRingsAlgorithm())
def icon(self):
return QIcon(os.path.dirname(__file__) + '/images/shapes.png')
def id(self):
return 'shapetools'
def name(self):
return 'Shape tools'
def longName(self):
return self.name()