-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
900 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
/*************************************************************************** | ||
HuginQGIS | ||
A QGIS plugin | ||
Perform spatial probabilistic analysis using HUGIN Bayesian Networks | ||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ | ||
------------------- | ||
begin : 2019-10-10 | ||
copyright : (C) 2019 by Hugin Expert A/S | ||
email : [email protected] | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
This script initializes the plugin, making it known to QGIS. | ||
""" | ||
|
||
__author__ = 'Hugin Expert A/S' | ||
__date__ = '2019-10-10' | ||
__copyright__ = '(C) 2019 by Hugin Expert A/S' | ||
|
||
|
||
# noinspection PyPep8Naming | ||
def classFactory(iface): # pylint: disable=invalid-name | ||
"""Load HuginQGIS class from file HuginQGIS. | ||
:param iface: A QGIS interface instance. | ||
:type iface: QgsInterface | ||
""" | ||
# | ||
from .hugin_qgis import HuginQGISPlugin | ||
return HuginQGISPlugin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
/*************************************************************************** | ||
HuginQGIS | ||
A QGIS plugin | ||
Perform spatial probabilistic analysis using HUGIN Bayesian Networks | ||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ | ||
------------------- | ||
begin : 2019-10-10 | ||
copyright : (C) 2019 by Hugin Expert A/S | ||
email : [email protected] | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
""" | ||
|
||
__author__ = 'Hugin Expert A/S' | ||
__date__ = '2019-10-10' | ||
__copyright__ = '(C) 2019 by Hugin Expert A/S' | ||
|
||
# This will get replaced with a git SHA1 when you do a git archive | ||
|
||
__revision__ = '$Format:%H$' | ||
|
||
import os | ||
import sys | ||
import inspect | ||
|
||
from qgis.core import QgsProcessingAlgorithm, QgsApplication | ||
from .hugin_qgis_provider import HuginQGISProvider | ||
|
||
cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0] | ||
|
||
if cmd_folder not in sys.path: | ||
sys.path.insert(0, cmd_folder) | ||
|
||
|
||
class HuginQGISPlugin(object): | ||
|
||
def __init__(self): | ||
self.provider = None | ||
|
||
def initProcessing(self): | ||
"""Init Processing provider for QGIS >= 3.8.""" | ||
self.provider = HuginQGISProvider() | ||
QgsApplication.processingRegistry().addProvider(self.provider) | ||
|
||
def initGui(self): | ||
self.initProcessing() | ||
|
||
def unload(self): | ||
QgsApplication.processingRegistry().removeProvider(self.provider) |
Oops, something went wrong.