Skip to content

Commit

Permalink
[processing] add group id to GRASS algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 14, 2017
1 parent 1d482cf commit 6f43954
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -27,6 +27,7 @@

import sys
import os
import re
import uuid
import importlib

Expand Down Expand Up @@ -98,6 +99,8 @@ def __init__(self, descriptionfile):
self._name = ''
self._display_name = ''
self._group = ''
self._groupId = ''
self.groupIdRegex = re.compile('^[^\s\(]+')
self.grass7Name = ''
self.params = []
self.hardcodedStrings = []
Expand Down Expand Up @@ -138,6 +141,9 @@ def displayName(self):
def group(self):
return self._group

def groupId(self):
return self._groupId

def icon(self):
return QgsApplication.getThemeIcon("/providerGrass.svg")

Expand Down Expand Up @@ -191,6 +197,7 @@ def defineCharacteristicsFromFile(self):
# Read the grass group
line = lines.readline().strip('\n').strip()
self._group = QCoreApplication.translate("GrassAlgorithm", line)
self._groupId = self.groupIdRegex.search(line).group(0).lower()
hasRasterOutput = False
hasRasterInput = False
hasVectorInput = False
Expand Down

0 comments on commit 6f43954

Please sign in to comment.