forked from Planheat/Planheat-Tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
44 lines (36 loc) · 1.36 KB
/
__init__.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
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
"""
/***************************************************************************
PlanHeat
-------------------
begin : 2019-04-25
copyright : (C) 2019 by PlanHeat consortium
email : [email protected]
git sha : $Format:%H$
***************************************************************************/
This script initializes the plugin, making it known to QGIS.
"""
import os
from . import config
# Set up appdata working directory
working_path = os.path.join(os.environ["LOCALAPPDATA"], "QGIS")
if not os.path.exists(working_path):
os.mkdir(working_path)
working_path = os.path.join(working_path, "QGIS3")
if not os.path.exists(working_path):
os.mkdir(working_path)
working_path = os.path.join(working_path, config.WORKING_DIRECTORY_NAME)
if not os.path.exists(working_path):
os.mkdir(working_path)
working_path = os.path.join(working_path, config.TEMP_WORKING_DIRECTORY_NAME)
if not os.path.exists(working_path):
os.mkdir(working_path)
# noinspection PyPep8Naming
def classFactory(iface): # pylint: disable=invalid-name
"""Load PlanHeat class from file PlanHeat.
:param iface: A QGIS interface instance.
:type iface: QgsInterface
"""
#
from .planheat import PlanHeat
return PlanHeat(iface)