-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBase.py
67 lines (52 loc) · 2.41 KB
/
Base.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- coding: utf-8 -*-
"""
/***************************************************************************
**Nombre del plugin
A QGIS plugin
**Descripcion
-------------------
begin : **Fecha
copyright : **COPYRIGHT
email : **Mail de contacto
***************************************************************************/
/***************************************************************************
* *
* 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 *
# any later version. *
* *
***************************************************************************/
"""
import os.path
from qgis.core import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QAction
from istacqgis.BaseDialog import BaseDialog
import istacqgis.gui.generated.resources_rc
try:
import sys
from pydevd import *
except:
None
class Base:
def __init__(self, iface):
self.iface = iface
self.plugin_dir = os.path.dirname(os.path.abspath(__file__))
self.url_to_check = "http://www.gobiernodecanarias.org/istac/QGIS/"
self.url_to_download = "http://www.gobiernodecanarias.org/istac/descargas/QGIS/data/"
def initGui(self):
self.action = QAction(QIcon(":/imgBase/images/istac_c.png"), u"Instituto Canario de Estadística (ISTAC)", self.iface.mainWindow())
self.action.triggered.connect(self.run)
self.iface.addToolBarIcon(self.action)
self.iface.addPluginToMenu(u"&Instituto Canario de Estadística (ISTAC)", self.action)
def unload(self):
self.iface.removePluginMenu(u"&Instituto Canario de Estadística (ISTAC)", self.action)
self.iface.removeToolBarIcon(self.action)
def run(self):
# Dialog
self.dlg_base = BaseDialog(self.iface)
# Base Dialog
self.dlg_base.setWindowFlags(Qt.WindowSystemMenuHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint)
code = self.dlg_base.exec_()