Skip to content

Commit

Permalink
Merge pull request #69 from QGEP/2022-08_export-label-pos
Browse files Browse the repository at this point in the history
export label positions to interlis
  • Loading branch information
olivierdalang authored Nov 10, 2022
2 parents b9c790d + 91a8a52 commit 2b8060a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 28 additions & 1 deletion qgepplugin/processing_provider/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
***************************************************************************/
"""

import logging
import os

from processing.core.ProcessingConfig import ProcessingConfig, Setting
from PyQt5.QtGui import QIcon
from qgis.core import QgsProcessingProvider
from qgis.core import Qgis, QgsProcessingProvider
from qgis.utils import iface

from .change_reach_direction import ChangeReachDirection
from .flow_times import FlowTimesAlgorithm
Expand All @@ -42,6 +44,8 @@

__revision__ = "$Format:%H$"

logger = logging.getLogger(__package__)


class QgepProcessingProvider(QgsProcessingProvider):
def __init__(self):
Expand All @@ -61,6 +65,15 @@ def __init__(self):
SwmmImportResultsAlgorithm(),
SwmmExecuteAlgorithm(),
]
try:
from ..qgepqwat2ili.qgepqwat2ili.processing_algs.extractlabels_interlis import (
ExtractlabelsInterlisAlgorithm,
)

self.alglist.append(ExtractlabelsInterlisAlgorithm())
except ImportError:
pass

for alg in self.alglist:
alg.provider = self

Expand All @@ -75,6 +88,20 @@ def getAlgs(self):
SwmmImportResultsAlgorithm(),
SwmmExecuteAlgorithm(),
]
try:
from ..qgepqwat2ili.qgepqwat2ili.processing_algs.extractlabels_interlis import (
ExtractlabelsInterlisAlgorithm,
)

algs.append(ExtractlabelsInterlisAlgorithm())

except ImportError as e:
iface.messageBar().pushMessage(
"Error",
"Could not load qgepqwat2ili due to unmet dependencies. See logs for more details.",
level=Qgis.Critical,
)
logger.error(str(e))
return algs

def id(self):
Expand Down

0 comments on commit 2b8060a

Please sign in to comment.