1
2
3
4
5
6 BASE_DIR = "/home/jdura/basin/basin_client"
7
8 SRC_DIR = BASE_DIR + "/client"
9
10 ICON_DIR = BASE_DIR + "/icons"
11
12
13 ICON_DEFAULT = ICON_DIR + "/default.png"
14 ICON_BASIN = ICON_DIR + "/basin.png"
15
16
17 REGEXP_VAR = "[A-Za-z_][0-9A-Za-z_]*"
18 DOUBLE_PRECISION = 2
19
20 STATUS_WAIT = 2.5
21
22 from PyQt4.QtGui import QPushButton
28
29 from PyQt4.QtCore import Qt
30
31 from PyQt4.QtGui import QHBoxLayout
33 - def __init__ (self, parent, set = False, alignment = Qt.AlignLeft):
34 QHBoxLayout.__init__ (self)
35 if set:
36 parent.setLayout (self)
37 else:
38 parent.addLayout (self, alignment)
39
40 from PyQt4.QtGui import QVBoxLayout
42 - def __init__ (self, parent, set = False, alignment = Qt.AlignLeft):
43 QVBoxLayout.__init__ (self)
44 if set:
45 parent.setLayout (self)
46 else:
47 parent.addLayout (self, alignment)
48
49 from PyQt4.QtGui import QLabel
50 from PyQt4.QtGui import QLineEdit
51 -class BTextField (QLineEdit):
52 - def __init__ (self, parent, labelText, fieldText):
53 layout = BQHBoxLayout (parent)
54 label = QLabel (labelText + ":")
55 label.setAlignment (Qt.AlignVCenter | Qt.AlignRight)
56 layout.addWidget (label)
57 QLineEdit.__init__ (self, fieldText)
58 layout.addWidget (self)
59