-
Notifications
You must be signed in to change notification settings - Fork 0
/
vlastniciSearchForm.py
79 lines (61 loc) · 2.9 KB
/
vlastniciSearchForm.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
68
69
70
71
72
73
74
75
76
77
78
79
# -*- coding: utf-8 -*-
"""
/***************************************************************************
vfkPluginDialog
A QGIS plugin
Plugin umoznujici praci s daty katastru nemovitosti
-------------------
begin : 2015-06-11
git sha : $Format:%H$
copyright : (C) 2015 by Stepan Bambula
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
from builtins import str
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtCore import pyqtSignal
from qgis.PyQt.QtWidgets import QWidget
from .ui_vlastnicisearchform import *
class VlastniciSearchForm(QWidget):
# signals
searchEnabled = pyqtSignal(bool)
def __init__(self, parent=None):
super(VlastniciSearchForm, self).__init__(parent)
# Set up the user interface from Designer.
self.ui = Ui_VlastniciSearchForm()
self.ui.setupUi(self)
self.ui.ofoCheckBox.clicked.connect(self.__vlastniciSetRcIcoEnabled)
self.ui.opoCheckBox.clicked.connect(self.__vlastniciSetRcIcoEnabled)
self.ui.ofoCheckBox.clicked.connect(self.__vlastniciSearchEnabled)
self.ui.opoCheckBox.clicked.connect(self.__vlastniciSearchEnabled)
self.ui.sjmCheckBox.clicked.connect(self.__vlastniciSearchEnabled)
def jmeno(self):
return str(self.ui.jmenoLineEdit.text().strip())
def rcIco(self):
return self.ui.rcIcoLineEdit.text().strip()
def isSjm(self):
return self.ui.sjmCheckBox.isChecked()
def isOpo(self):
return self.ui.opoCheckBox.isChecked()
def isOfo(self):
return self.ui.ofoCheckBox.isChecked()
def lv(self):
return self.ui.lvVlastniciLineEdit.text().strip()
def __vlastniciSearchEnabled(self):
if self.ui.ofoCheckBox.isChecked() or self.ui.opoCheckBox.isChecked() or self.ui.sjmCheckBox.isChecked():
self.searchEnabled.emit(True)
else:
self.searchEnabled.emit(False)
def __vlastniciSetRcIcoEnabled(self):
if self.ui.ofoCheckBox.isChecked() or self.ui.opoCheckBox.isChecked():
self.ui.rcIcoLineEdit.setEnabled(True)
else:
self.ui.rcIcoLineEdit.setEnabled(False)