Package client :: Package Viewers :: Module Constants
[hide private]
[frames] | no frames]

Source Code for Module client.Viewers.Constants

 1  # James Dura jd992@drexel.edu 
 2   
 3  # Basin Client Constants 
 4  # autogenerated by basin_client/build_client.sh 
 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  # Icons 
13  ICON_DEFAULT = ICON_DIR + "/default.png" 
14  ICON_BASIN = ICON_DIR + "/basin.png" 
15  # Some predefined regular expressions, as per QRegExp 
16  # http://www.riverbankcomputing.com/Docs/PyQt4/html/qregexp.html 
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 
23 -class BQPushButton (QPushButton):
24 - def __init__ (self, label, parent, enabled = True):
25 QPushButton.__init__ (self, label) 26 parent.addWidget (self) 27 self.setEnabled (enabled)
28 29 from PyQt4.QtCore import Qt 30 31 from PyQt4.QtGui import QHBoxLayout
32 -class BQHBoxLayout (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
41 -class BQVBoxLayout (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