-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
39 lines (31 loc) · 1.59 KB
/
Copy path__init__.py
File metadata and controls
39 lines (31 loc) · 1.59 KB
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
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
/***************************************************************************
copyright : (C) 2022 Felix von Studsinske
email : felix.vons@gmail.com
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
import inspect
from qgis.gui import QgisInterface
from typing import Type
# Edit this import and references in this file to new name
from .plugin import EasyLabeling
from .submodules.module_base.base_class import Plugin
def get_class() -> Type[EasyLabeling]:
""" returns plugin class """
assert Plugin in inspect.getmro(EasyLabeling), f"main plugin class must base on Plugin class"
return EasyLabeling
# noinspection PyPep8Naming
def classFactory(iface: QgisInterface, **kwargs: dict) -> EasyLabeling: # pylint: disable=invalid-name
"""Loads this plugin an loads it. Automatically called by QGIS
:param iface: A QGIS interface instance.
"""
return get_class()(iface, **kwargs)