|
44 | 44 | class OTBAlgorithmProvider(AlgorithmProvider): |
45 | 45 |
|
46 | 46 | def __init__(self): |
47 | | - AlgorithmProvider.__init__(self) |
| 47 | + super().__init__() |
48 | 48 | self.activate = True |
49 | 49 |
|
50 | | - def getDescription(self): |
| 50 | + def name(self): |
51 | 51 | version = OTBUtils.getInstalledVersion() |
52 | 52 | return "Orfeo ToolBox ({})".format(version) if version is not None else "Orfeo ToolBox" |
53 | 53 |
|
54 | | - def getName(self): |
| 54 | + def id(self): |
55 | 55 | return "otb" |
56 | 56 |
|
57 | | - def getIcon(self): |
| 57 | + def icon(self): |
58 | 58 | return QIcon(os.path.join(pluginPath, 'images', 'otb.png')) |
59 | 59 |
|
60 | 60 | def _loadAlgorithms(self): |
@@ -86,19 +86,19 @@ def _loadAlgorithms(self): |
86 | 86 |
|
87 | 87 | def initializeSettings(self): |
88 | 88 | AlgorithmProvider.initializeSettings(self) |
89 | | - ProcessingConfig.addSetting(Setting(self.getDescription(), |
| 89 | + ProcessingConfig.addSetting(Setting(self.name(), |
90 | 90 | OTBUtils.OTB_FOLDER, |
91 | 91 | self.tr("OTB command line tools folder"), OTBUtils.findOtbPath(), |
92 | 92 | valuetype=Setting.FOLDER)) |
93 | | - ProcessingConfig.addSetting(Setting(self.getDescription(), |
| 93 | + ProcessingConfig.addSetting(Setting(self.name(), |
94 | 94 | OTBUtils.OTB_LIB_FOLDER, |
95 | 95 | self.tr("OTB applications folder"), OTBUtils.findOtbLibPath(), |
96 | 96 | valuetype=Setting.FOLDER)) |
97 | | - ProcessingConfig.addSetting(Setting(self.getDescription(), |
| 97 | + ProcessingConfig.addSetting(Setting(self.name(), |
98 | 98 | OTBUtils.OTB_SRTM_FOLDER, |
99 | 99 | self.tr("SRTM tiles folder"), OTBUtils.otbSRTMPath(), |
100 | 100 | valuetype=Setting.FOLDER)) |
101 | | - ProcessingConfig.addSetting(Setting(self.getDescription(), |
| 101 | + ProcessingConfig.addSetting(Setting(self.name(), |
102 | 102 | OTBUtils.OTB_GEOID_FILE, |
103 | 103 | self.tr("Geoid file"), OTBUtils.otbGeoidPath(), |
104 | 104 | valuetype=Setting.FOLDER)) |
|
0 commit comments