pktools 2.6.7
Processing Kernel for geospatial data
ProcessingPktoolsPlugin.py
1# -*- coding: utf-8 -*-
2
3"""
4***************************************************************************
5 ProcessingPktoolsPlugin.py
6 ---------------------
7 Date : April 2015
8 Copyright : (C) 2015 by Pieter Kempeneers
9 Email : kempenep at gmail dot com
10***************************************************************************
11* *
12* This program is free software; you can redistribute it and/or modify *
13* it under the terms of the GNU General Public License as published by *
14* the Free Software Foundation; either version 2 of the License, or *
15* (at your option) any later version. *
16* *
17***************************************************************************
18"""
19
20__author__ = 'Pieter Kempeneers'
21__date__ = 'April 2015'
22__copyright__ = '(C) 2015, Pieter Kempeneers'
23# This will get replaced with a git SHA1 when you do a git archive
24__revision__ = '$Format:%H$'
25
26import os, sys
27import inspect
28
29from qgis.core import *
30
31from processing.core.Processing import Processing
32from pktools.pktoolsAlgorithmProvider import pktoolsAlgorithmProvider
33
34cmd_folder = os.path.split(inspect.getfile(inspect.currentframe()))[0]
35
36if cmd_folder not in sys.path:
37 sys.path.insert(0, cmd_folder)
38
39
41 def __init__(self):
42 self.provider = pktoolsAlgorithmProvider()
43
44 def initGui(self):
45 Processing.addProvider(self.provider)
46
47 def unload(self):
48 Processing.removeProvider(self.provider)