docks.py 2.09 KB
Newer Older
1
2
3
# -*- coding: utf-8 -*-
"""
/***************************************************************************
4
                              EO Time Series Viewer
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
                              -------------------
        begin                : 2017-08-04
        git sha              : $Format:%H$
        copyright            : (C) 2017 by HU-Berlin
        email                : benjamin.jakimow@geo.hu-berlin.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/
"""
# noinspection PyPep8Naming
22

23
from qgis.core import *
24
from qgis.gui import QgsDockWidget
25
26
from PyQt5.QtCore import *
from PyQt5.QtGui import *
27

28
from timeseriesviewer import jp, SETTINGS
29
from timeseriesviewer.utils import loadUI, SpatialExtent
30

31
32
class TsvDockWidgetBase(QgsDockWidget):

33
    def __init__(self, parent):
34
        super(QgsDockWidget, self).__init__(parent)
35
        self.setupUi(self)
36
37
38
39
40
41
42
43
44
45
46
47
48

    def _blockSignals(self, widgets, block=True):
        states = dict()
        if isinstance(widgets, dict):
            for w, block in widgets.items():
                states[w] = w.blockSignals(block)
        else:
            for w in widgets:
                states[w] = w.blockSignals(block)
        return states



49

50
51
52
53
if __name__ == '__main__':
    import site, sys
    #add site-packages to sys.path as done by enmapboxplugin.py

54
55
56
    from timeseriesviewer import sandbox
    qgsApp = sandbox.initQgisEnvironment()
    d = RenderingDockUI()
57
    d.show()
58
59
    p = sandbox.SignalPrinter(d)

60
    qgsApp.exec_()
61
    qgsApp.exitQgis()