-
Notifications
You must be signed in to change notification settings - Fork 0
/
QGeomorfProvider.py
46 lines (29 loc) · 1.16 KB
/
QGeomorfProvider.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
# -*- coding: utf-8 -*-
import os
from PyQt4.QtGui import QIcon
from processing.core.AlgorithmProvider import AlgorithmProvider
from processing.core.ProcessingConfig import Setting, ProcessingConfig
from QGeomorf.NodeIndexing import NodeIndexing
from QGeomorf.ArcUpstreamDownstream import ArcUpstreamDownstream
from QGeomorf.StrahlerOrder import StrahlerOrder
from QGeomorf.BifurcationRatios import BifurcationRatios
pluginPath = os.path.dirname(__file__)
class QGeomorfProvider(AlgorithmProvider):
def __init__(self):
AlgorithmProvider.__init__(self)
self.activate = True
self.alglist = [NodeIndexing(), ArcUpstreamDownstream(), StrahlerOrder(), BifurcationRatios()]
for alg in self.alglist:
alg.provider = self
def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
def unload(self):
AlgorithmProvider.unload(self)
def getName(self):
return 'QGeomorf'
def getDescription(self):
return 'QGeomorf'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'icons', 'enea.png'))
def _loadAlgorithms(self):
self.algs = self.alglist