forked from AG_QGIS/Plugin_SN_Basis
Refactoring Aufgrund Fehler beim Beenden.
This commit is contained in:
29
main.py
29
main.py
@@ -1,22 +1,21 @@
|
||||
import os
|
||||
|
||||
class lnoSachsenBasis:
|
||||
"""
|
||||
Plugin-Klasse für Basisfunktionen. Stellt Funktionen und Klassen für andere Plugins bereit.
|
||||
"""
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
from sn_basis.ui.navigation import Navigation
|
||||
from sn_basis.ui.dockmanager import DockManager
|
||||
|
||||
class BasisPlugin:
|
||||
def __init__(self, iface):
|
||||
self.iface = iface
|
||||
self.plugin_dir = os.path.dirname(__file__)
|
||||
self.ui = None
|
||||
self.quitting = False
|
||||
QCoreApplication.instance().aboutToQuit.connect(self._on_quit)
|
||||
|
||||
def _on_quit(self):
|
||||
self.quitting = True
|
||||
|
||||
def initGui(self):
|
||||
"""
|
||||
Keine GUI-Integration nötig.
|
||||
"""
|
||||
pass
|
||||
self.ui = Navigation(self.iface)
|
||||
|
||||
def unload(self):
|
||||
"""
|
||||
Keine GUI-Elemente zu entfernen.
|
||||
"""
|
||||
pass
|
||||
if not self.quitting and self.ui:
|
||||
self.ui.remove_all()
|
||||
|
||||
Reference in New Issue
Block a user