forked from firetools/qgis2fds
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqgis2fds.py
32 lines (22 loc) · 825 Bytes
/
qgis2fds.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
# -*- coding: utf-8 -*-
"""qgis2fds"""
__author__ = "Emanuele Gissi"
__date__ = "2020-05-04"
__copyright__ = "(C) 2020 by Emanuele Gissi"
__revision__ = "$Format:%H$" # replaced with git SHA1
import os, sys, inspect
from qgis.core import QgsApplication
from .qgis2fds_provider import qgis2fdsProvider
cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0]
if cmd_folder not in sys.path:
sys.path.insert(0, cmd_folder)
class qgis2fdsPlugin(object):
def __init__(self):
self.provider = None
def initProcessing(self):
self.provider = qgis2fdsProvider()
QgsApplication.processingRegistry().addProvider(self.provider)
def initGui(self):
self.initProcessing()
def unload(self):
QgsApplication.processingRegistry().removeProvider(self.provider)