-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathglobal_vars.py
More file actions
35 lines (26 loc) · 857 Bytes
/
global_vars.py
File metadata and controls
35 lines (26 loc) · 857 Bytes
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
"""
This file is part of Giswater 3
The 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 3 of the License,
or (at your option) any later version.
"""
# -*- coding: utf-8 -*-
import os
import sys
from qgis.PyQt.QtCore import QSettings
iface = None
canvas = None
plugin_dir = None
plugin_name = None
settings = None
schema_name = None
def init_global(p_iface, p_canvas, p_plugin_dir, p_plugin_name):
global iface, canvas, plugin_dir, plugin_name
iface = p_iface
canvas = p_canvas
plugin_dir = p_plugin_dir
plugin_name = p_plugin_name
def init_settings(setting_file):
global settings
settings = QSettings(setting_file, QSettings.IniFormat)
settings.setIniCodec(sys.getfilesystemencoding())