00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 from qt import *
00012
00013
00014 class Create_Devices(QDialog):
00015 def __init__(self,parent = None,name = None,modal = 0,fl = 0):
00016 QDialog.__init__(self,parent,name,modal,fl)
00017
00018 if not name:
00019 self.setName("Create_Devices")
00020
00021
00022 Create_DevicesLayout = QGridLayout(self,1,1,11,6,"Create_DevicesLayout")
00023
00024 self.__serialtxtbox = QLineEdit(self,"__serialtxtbox")
00025
00026 Create_DevicesLayout.addMultiCellWidget(self.__serialtxtbox,1,1,8,10)
00027
00028 self.__hwtypetxtbox = QLineEdit(self,"__hwtypetxtbox")
00029
00030 Create_DevicesLayout.addMultiCellWidget(self.__hwtypetxtbox,3,3,8,10)
00031
00032 self.__responsibletxtbox = QLineEdit(self,"__responsibletxtbox")
00033
00034 Create_DevicesLayout.addMultiCellWidget(self.__responsibletxtbox,5,5,8,10)
00035
00036 self.textLabel2_4_3 = QLabel(self,"textLabel2_4_3")
00037
00038 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_3,0,0,8,9)
00039
00040 self.textLabel2_4_3_2 = QLabel(self,"textLabel2_4_3_2")
00041
00042 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_3_2,2,2,8,9)
00043
00044 self.textLabel2_4_3_2_2_2 = QLabel(self,"textLabel2_4_3_2_2_2")
00045
00046 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_3_2_2_2,6,6,8,9)
00047
00048 self.textLabel2_4_3_2_2 = QLabel(self,"textLabel2_4_3_2_2")
00049
00050 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_3_2_2,4,4,8,9)
00051
00052 self.textLabel2_4_3_2_2_2_2 = QLabel(self,"textLabel2_4_3_2_2_2_2")
00053
00054 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_3_2_2_2_2,9,9,8,9)
00055
00056 layout6 = QVBoxLayout(None,0,6,"layout6")
00057
00058 self.textLabel2_3_2 = QLabel(self,"textLabel2_3_2")
00059 layout6.addWidget(self.textLabel2_3_2)
00060
00061 self.__functiontxtbox = QComboBox(0,self,"__functiontxtbox")
00062 layout6.addWidget(self.__functiontxtbox)
00063
00064 Create_DevicesLayout.addMultiCellLayout(layout6,13,13,0,6)
00065
00066 layout11 = QVBoxLayout(None,0,6,"layout11")
00067
00068 self.textLabel2_2 = QLabel(self,"textLabel2_2")
00069 layout11.addWidget(self.textLabel2_2)
00070
00071 self.__sysnamescmbbox = QComboBox(0,self,"__sysnamescmbbox")
00072 layout11.addWidget(self.__sysnamescmbbox)
00073
00074 Create_DevicesLayout.addMultiCellLayout(layout11,0,1,2,4)
00075
00076 self.__delbutton = QPushButton(self,"__delbutton")
00077 self.__delbutton.setMaximumSize(QSize(21,21))
00078
00079 Create_DevicesLayout.addWidget(self.__delbutton,1,6)
00080
00081 self.__addbutton = QPushButton(self,"__addbutton")
00082 self.__addbutton.setMaximumSize(QSize(21,21))
00083
00084 Create_DevicesLayout.addWidget(self.__addbutton,1,5)
00085
00086 self.__chk_prommode = QCheckBox(self,"__chk_prommode")
00087
00088 Create_DevicesLayout.addMultiCellWidget(self.__chk_prommode,11,11,0,1)
00089
00090 layout5 = QVBoxLayout(None,0,6,"layout5")
00091
00092 self.textLabel2_4_2_2 = QLabel(self,"textLabel2_4_2_2")
00093 layout5.addWidget(self.textLabel2_4_2_2)
00094
00095 self.__startspinbox = QSpinBox(self,"__startspinbox")
00096 layout5.addWidget(self.__startspinbox)
00097
00098 Create_DevicesLayout.addMultiCellLayout(layout5,10,10,0,1)
00099
00100 layout4 = QVBoxLayout(None,0,6,"layout4")
00101
00102 self.textLabel2_4_2_2_2 = QLabel(self,"textLabel2_4_2_2_2")
00103 layout4.addWidget(self.textLabel2_4_2_2_2)
00104
00105 self.__endspinbox = QSpinBox(self,"__endspinbox")
00106 layout4.addWidget(self.__endspinbox)
00107
00108 Create_DevicesLayout.addMultiCellLayout(layout4,10,10,2,6)
00109
00110 self.__paddingchkbox = QCheckBox(self,"__paddingchkbox")
00111
00112 Create_DevicesLayout.addWidget(self.__paddingchkbox,8,0)
00113
00114 self.__paddingspinbox = QSpinBox(self,"__paddingspinbox")
00115 self.__paddingspinbox.setEnabled(0)
00116
00117 Create_DevicesLayout.addMultiCellWidget(self.__paddingspinbox,8,8,1,3)
00118
00119 self.textLabel2_4_2 = QLabel(self,"textLabel2_4_2")
00120
00121 Create_DevicesLayout.addMultiCellWidget(self.textLabel2_4_2,8,8,4,5)
00122 spacer1 = QSpacerItem(310,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
00123 Create_DevicesLayout.addMultiCell(spacer1,14,14,0,8)
00124
00125 self.__okbutton = QPushButton(self,"__okbutton")
00126
00127 Create_DevicesLayout.addWidget(self.__okbutton,14,9)
00128
00129 self.__cancelbutton = QPushButton(self,"__cancelbutton")
00130
00131 Create_DevicesLayout.addWidget(self.__cancelbutton,14,10)
00132
00133 self.__portbutton = QPushButton(self,"__portbutton")
00134
00135 Create_DevicesLayout.addMultiCellWidget(self.__portbutton,13,13,8,10)
00136
00137 self.__commentstxtbox = QTextEdit(self,"__commentstxtbox")
00138
00139 Create_DevicesLayout.addMultiCellWidget(self.__commentstxtbox,10,12,8,10)
00140 spacer4 = QSpacerItem(20,20,QSizePolicy.Fixed,QSizePolicy.Minimum)
00141 Create_DevicesLayout.addItem(spacer4,8,7)
00142
00143 self.__locationtxtbox = QLineEdit(self,"__locationtxtbox")
00144
00145 Create_DevicesLayout.addMultiCellWidget(self.__locationtxtbox,7,7,8,10)
00146
00147 layout9 = QVBoxLayout(None,0,6,"layout9")
00148
00149 self.textLabel2 = QLabel(self,"textLabel2")
00150 layout9.addWidget(self.textLabel2)
00151
00152 self.__systemnametxtbox = QLineEdit(self,"__systemnametxtbox")
00153 self.__systemnametxtbox.setEnabled(0)
00154 layout9.addWidget(self.__systemnametxtbox)
00155
00156 Create_DevicesLayout.addMultiCellLayout(layout9,0,1,0,0)
00157
00158 layout7 = QVBoxLayout(None,0,6,"layout7")
00159
00160 self.textLabel2_4 = QLabel(self,"textLabel2_4")
00161 layout7.addWidget(self.textLabel2_4)
00162
00163 self.__prefixtxtbox = QLineEdit(self,"__prefixtxtbox")
00164 layout7.addWidget(self.__prefixtxtbox)
00165
00166 Create_DevicesLayout.addMultiCellLayout(layout7,6,7,0,6)
00167
00168 self.__chk_node = QCheckBox(self,"__chk_node")
00169
00170 Create_DevicesLayout.addMultiCellWidget(self.__chk_node,12,12,0,4)
00171
00172 layout8 = QVBoxLayout(None,0,6,"layout8")
00173
00174 self.textLabel2_3 = QLabel(self,"textLabel2_3")
00175 layout8.addWidget(self.textLabel2_3)
00176
00177 self.__devicetypetxtbox = QComboBox(0,self,"__devicetypetxtbox")
00178 layout8.addWidget(self.__devicetypetxtbox)
00179
00180 Create_DevicesLayout.addMultiCellLayout(layout8,4,5,0,6)
00181
00182 layout7_2_2 = QVBoxLayout(None,0,6,"layout7_2_2")
00183
00184 self.textLabel2_4_4_2 = QLabel(self,"textLabel2_4_4_2")
00185 layout7_2_2.addWidget(self.textLabel2_4_4_2)
00186
00187 self.__devicetxtbox = QLineEdit(self,"__devicetxtbox")
00188 layout7_2_2.addWidget(self.__devicetxtbox)
00189
00190 Create_DevicesLayout.addMultiCellLayout(layout7_2_2,2,3,0,2)
00191
00192 layout7_2 = QVBoxLayout(None,0,6,"layout7_2")
00193
00194 self.textLabel2_4_4 = QLabel(self,"textLabel2_4_4")
00195 layout7_2.addWidget(self.textLabel2_4_4)
00196
00197 self.__deviceidtxtbox = QLineEdit(self,"__deviceidtxtbox")
00198 layout7_2.addWidget(self.__deviceidtxtbox)
00199
00200 Create_DevicesLayout.addMultiCellLayout(layout7_2,2,3,3,6)
00201
00202 self.languageChange()
00203
00204 self.resize(QSize(579,461).expandedTo(self.minimumSizeHint()))
00205 self.clearWState(Qt.WState_Polished)
00206
00207
00208 def languageChange(self):
00209 self.setCaption(self.__tr("Create Device(s)"))
00210 self.textLabel2_4_3.setText(self.__tr("Serial Number:"))
00211 self.textLabel2_4_3_2.setText(self.__tr("Hardware type:"))
00212 self.textLabel2_4_3_2_2_2.setText(self.__tr("Location:"))
00213 self.textLabel2_4_3_2_2.setText(self.__tr("Responsible:"))
00214 self.textLabel2_4_3_2_2_2_2.setText(self.__tr("Comments:"))
00215 self.textLabel2_3_2.setText(self.__tr("List of Functions :"))
00216 self.textLabel2_2.setText(self.__tr("Add to subsystem:"))
00217 self.__delbutton.setText(self.__tr("-"))
00218 self.__addbutton.setText(self.__tr("+"))
00219 self.__chk_prommode.setText(self.__tr("Promiscuous mode"))
00220 self.textLabel2_4_2_2.setText(self.__tr("Start nr:"))
00221 self.textLabel2_4_2_2_2.setText(self.__tr("Total:"))
00222 self.__paddingchkbox.setText(self.__tr("Pad with 0s?:"))
00223 self.textLabel2_4_2.setText(self.__tr("digits max."))
00224 self.__okbutton.setText(self.__tr("Ok"))
00225 self.__cancelbutton.setText(self.__tr("Cancel"))
00226 self.__portbutton.setText(self.__tr("Create/Modify ports ..."))
00227 self.textLabel2.setText(self.__tr("Create in:"))
00228 self.textLabel2_4.setText(self.__tr("Prefix: (%d - where to place nr)"))
00229 self.__chk_node.setText(self.__tr("This is a node (starts or ends a path)"))
00230 self.textLabel2_3.setText(self.__tr("Device Type:"))
00231 self.textLabel2_4_4_2.setText(self.__tr("Device Name:"))
00232 self.textLabel2_4_4.setText(self.__tr("Device ID:"))
00233
00234
00235 def __tr(self,s,c = None):
00236 return qApp.translate("Create_Devices",s,c)
00237
00238