##// END OF EJS Templates
Feature added to GUI. Power or I/Q plot can be choose from Voltage View
Miguel Valdez -
r740:543b4b6ada50
parent child
Show More
@@ -1107,8 +1107,8 class BasicWindow(QMainWindow, Ui_BasicWindow):
1107 opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1)
1107 opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1)
1108
1108
1109 channelList = str(self.volGraphChannelList.text()).strip()
1109 channelList = str(self.volGraphChannelList.text()).strip()
1110 xvalue = str(self.volGraphfreqrange.text()).strip()
1110 xvalue = str(self.volGraphHeightrange.text()).strip()
1111 yvalue = str(self.volGraphHeightrange.text()).strip()
1111 yvalue = str(self.volGraphIntensityRange.text()).strip()
1112 figpath = str(self.volGraphPath.text()).strip()
1112 figpath = str(self.volGraphPath.text()).strip()
1113 figfile = str(self.volGraphPrefix.text()).strip()
1113 figfile = str(self.volGraphPrefix.text()).strip()
1114
1114
@@ -1119,12 +1119,12 class BasicWindow(QMainWindow, Ui_BasicWindow):
1119
1119
1120 if xvalue != "":
1120 if xvalue != "":
1121 if not isFloatRange(xvalue):
1121 if not isFloatRange(xvalue):
1122 self.console.append("Invalid value '%s' for 'Graphics:Frequncy-Range'" %(xvalue))
1122 self.console.append("Invalid value '%s' for 'Graphics:Height-Range'" %(xvalue))
1123 return 0
1123 return 0
1124
1124
1125 if yvalue != "":
1125 if yvalue != "":
1126 if not isFloatRange(yvalue):
1126 if not isFloatRange(yvalue):
1127 self.console.append("Invalid value '%s' for 'Graphics:Height-Range'" %(yvalue))
1127 self.console.append("Invalid value '%s' for 'Graphics:Amplitude-Range'" %(yvalue))
1128 return 0
1128 return 0
1129
1129
1130
1130
@@ -1142,7 +1142,14 class BasicWindow(QMainWindow, Ui_BasicWindow):
1142
1142
1143 opObj.addParameter(name='ymin', value=yvalueList[0], format='int')
1143 opObj.addParameter(name='ymin', value=yvalueList[0], format='int')
1144 opObj.addParameter(name='ymax', value=yvalueList[1], format='int')
1144 opObj.addParameter(name='ymax', value=yvalueList[1], format='int')
1145
1145
1146 plot_type = self.volComScopeType.currentIndex()
1147
1148 if plot_type == 0:
1149 opObj.addParameter(name='type', value="iq")
1150 if plot_type == 1:
1151 opObj.addParameter(name='type', value="power")
1152
1146 if self.volGraphCebSave.isChecked():
1153 if self.volGraphCebSave.isChecked():
1147 checkPath = True
1154 checkPath = True
1148
1155
@@ -1235,12 +1242,12 class BasicWindow(QMainWindow, Ui_BasicWindow):
1235 if p0 == 0:
1242 if p0 == 0:
1236
1243
1237 self.volGraphChannelList.setEnabled(False)
1244 self.volGraphChannelList.setEnabled(False)
1238 self.volGraphfreqrange.setEnabled(False)
1245 self.volGraphIntensityRange.setEnabled(False)
1239 self.volGraphHeightrange.setEnabled(False)
1246 self.volGraphHeightrange.setEnabled(False)
1240 if p0 == 2:
1247 if p0 == 2:
1241
1248
1242 self.volGraphChannelList.setEnabled(True)
1249 self.volGraphChannelList.setEnabled(True)
1243 self.volGraphfreqrange.setEnabled(True)
1250 self.volGraphIntensityRange.setEnabled(True)
1244 self.volGraphHeightrange.setEnabled(True)
1251 self.volGraphHeightrange.setEnabled(True)
1245
1252
1246 """
1253 """
@@ -3035,23 +3042,23 class BasicWindow(QMainWindow, Ui_BasicWindow):
3035 value = parmObj.getValue()
3042 value = parmObj.getValue()
3036 value = str(value)
3043 value = str(value)
3037 self.volGraphChannelList.setText(value)
3044 self.volGraphChannelList.setText(value)
3038 self.volOpProfile.setEnabled(True)
3045 # self.volOpChannel.setEnabled(True)
3039
3046
3040 parmObj1 = opObj.getParameterObj(parameterName='xmin')
3047 parmObj1 = opObj.getParameterObj(parameterName='ymin')
3041 parmObj2 = opObj.getParameterObj(parameterName='xmax')
3048 parmObj2 = opObj.getParameterObj(parameterName='ymax')
3042
3049
3043 if parmObj1 == None or parmObj2 ==None:
3050 if parmObj1 == None or parmObj2 ==None:
3044 self.volGraphfreqrange.clear()
3051 self.volGraphIntensityRange.clear()
3045 else:
3052 else:
3046 value1 = parmObj1.getValue()
3053 value1 = parmObj1.getValue()
3047 value1 = str(value1)
3054 value1 = str(value1)
3048 value2 = parmObj2.getValue()
3055 value2 = parmObj2.getValue()
3049 value2 = str(value2)
3056 value2 = str(value2)
3050 value = value1 + "," + value2
3057 value = value1 + "," + value2
3051 self.volGraphfreqrange.setText(value)
3058 self.volGraphIntensityRange.setText(value)
3052
3059
3053 parmObj1 = opObj.getParameterObj(parameterName='ymin')
3060 parmObj1 = opObj.getParameterObj(parameterName='xmin')
3054 parmObj2 = opObj.getParameterObj(parameterName='ymax')
3061 parmObj2 = opObj.getParameterObj(parameterName='xmax')
3055
3062
3056 if parmObj1 == None or parmObj2 ==None:
3063 if parmObj1 == None or parmObj2 ==None:
3057 self.volGraphHeightrange.clear()
3064 self.volGraphHeightrange.clear()
@@ -3064,6 +3071,17 class BasicWindow(QMainWindow, Ui_BasicWindow):
3064 value2 = str(value2)
3071 value2 = str(value2)
3065 self.volGraphHeightrange.setText(value)
3072 self.volGraphHeightrange.setText(value)
3066
3073
3074 parmObj = opObj.getParameterObj(parameterName='type')
3075
3076 if parmObj == None:
3077 self.volComScopeType.setCurrentIndex(0)
3078 else:
3079 value = parmObj.getValue()
3080 if value == "iq":
3081 self.volComScopeType.setCurrentIndex(0)
3082 if value == "power":
3083 self.volComScopeType.setCurrentIndex(1)
3084
3067 parmObj = opObj.getParameterObj(parameterName='save')
3085 parmObj = opObj.getParameterObj(parameterName='save')
3068
3086
3069 if parmObj == None:
3087 if parmObj == None:
@@ -5641,7 +5659,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
5641
5659
5642 # set Graph Voltage
5660 # set Graph Voltage
5643 self.volGraphChannelList.setEnabled(False)
5661 self.volGraphChannelList.setEnabled(False)
5644 self.volGraphfreqrange.setEnabled(False)
5662 self.volGraphIntensityRange.setEnabled(False)
5645 self.volGraphHeightrange.setEnabled(False)
5663 self.volGraphHeightrange.setEnabled(False)
5646
5664
5647 # set Operation Spectra
5665 # set Operation Spectra
@@ -5703,7 +5721,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
5703 # self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
5721 # self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
5704 # self.volOpOk.setToolTip('If you have finished, please Ok ')
5722 # self.volOpOk.setToolTip('If you have finished, please Ok ')
5705 # # tool tip gui volGraph
5723 # # tool tip gui volGraph
5706 # self.volGraphfreqrange.setToolTip('Height range. Example: 50,100')
5724 # self.volGraphIntensityRange.setToolTip('Height range. Example: 50,100')
5707 # self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
5725 # self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
5708 # tool tip gui specOp
5726 # tool tip gui specOp
5709 # self.specOpnFFTpoints.setToolTip('Example: 128')
5727 # self.specOpnFFTpoints.setToolTip('Example: 128')
@@ -207,9 +207,9 class Ui_VoltageTab(object):
207 self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
207 self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
208 spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
208 spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
209 self.gridLayout_6.addItem(spacerItem4, 12, 3, 1, 1)
209 self.gridLayout_6.addItem(spacerItem4, 12, 3, 1, 1)
210 self.volGraphfreqrange = QtGui.QLineEdit(self.tabgraphVoltage)
210 self.volGraphIntensityRange = QtGui.QLineEdit(self.tabgraphVoltage)
211 self.volGraphfreqrange.setObjectName(_fromUtf8("volGraphfreqrange"))
211 self.volGraphIntensityRange.setObjectName(_fromUtf8("volGraphIntensityRange"))
212 self.gridLayout_6.addWidget(self.volGraphfreqrange, 9, 1, 1, 6)
212 self.gridLayout_6.addWidget(self.volGraphIntensityRange, 9, 1, 1, 6)
213 self.volGraphPrefix = QtGui.QLineEdit(self.tabgraphVoltage)
213 self.volGraphPrefix = QtGui.QLineEdit(self.tabgraphVoltage)
214 self.volGraphPrefix.setObjectName(_fromUtf8("volGraphPrefix"))
214 self.volGraphPrefix.setObjectName(_fromUtf8("volGraphPrefix"))
215 self.gridLayout_6.addWidget(self.volGraphPrefix, 2, 1, 1, 6)
215 self.gridLayout_6.addWidget(self.volGraphPrefix, 2, 1, 1, 6)
@@ -245,14 +245,28 class Ui_VoltageTab(object):
245 self.gridLayout_6.addWidget(self.label_13, 2, 0, 1, 1)
245 self.gridLayout_6.addWidget(self.label_13, 2, 0, 1, 1)
246 self.label_52 = QtGui.QLabel(self.tabgraphVoltage)
246 self.label_52 = QtGui.QLabel(self.tabgraphVoltage)
247 self.label_52.setObjectName(_fromUtf8("label_52"))
247 self.label_52.setObjectName(_fromUtf8("label_52"))
248
248 self.gridLayout_6.addWidget(self.label_52, 11, 0, 1, 1)
249 self.gridLayout_6.addWidget(self.label_52, 11, 0, 1, 1)
249 spacerItem6 = QtGui.QSpacerItem(40, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
250 spacerItem6 = QtGui.QSpacerItem(40, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
250 self.gridLayout_6.addItem(spacerItem6, 14, 5, 1, 2)
251 self.gridLayout_6.addItem(spacerItem6, 14, 5, 1, 2)
251 spacerItem7 = QtGui.QSpacerItem(18, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
252 spacerItem7 = QtGui.QSpacerItem(18, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
252 self.gridLayout_6.addItem(spacerItem7, 14, 3, 1, 1)
253 self.gridLayout_6.addItem(spacerItem7, 14, 3, 1, 1)
254
255 self.volLabScopeType = QtGui.QLabel(self.tabgraphVoltage)
256 self.volLabScopeType.setObjectName(_fromUtf8("volLabScopeType"))
257 self.gridLayout_6.addWidget(self.volLabScopeType, 7, 0, 1, 1)
258
259 self.volComScopeType = QtGui.QComboBox(self.tabgraphVoltage)
260 self.volComScopeType.setObjectName(_fromUtf8("volComScopeType"))
261 self.volComScopeType.addItem(_fromUtf8(""))
262 self.volComScopeType.addItem(_fromUtf8(""))
263 self.gridLayout_6.addWidget(self.volComScopeType, 7, 1, 1, 6)
264
253 self.volGraphChannelList = QtGui.QLineEdit(self.tabgraphVoltage)
265 self.volGraphChannelList = QtGui.QLineEdit(self.tabgraphVoltage)
254 self.volGraphChannelList.setObjectName(_fromUtf8("volGraphChannelList"))
266 self.volGraphChannelList.setObjectName(_fromUtf8("volGraphChannelList"))
255 self.gridLayout_6.addWidget(self.volGraphChannelList, 8, 1, 1, 6)
267 self.gridLayout_6.addWidget(self.volGraphChannelList, 8, 1, 1, 6)
268
269
256 self.volGraphHeightrange = QtGui.QLineEdit(self.tabgraphVoltage)
270 self.volGraphHeightrange = QtGui.QLineEdit(self.tabgraphVoltage)
257 self.volGraphHeightrange.setObjectName(_fromUtf8("volGraphHeightrange"))
271 self.volGraphHeightrange.setObjectName(_fromUtf8("volGraphHeightrange"))
258 self.gridLayout_6.addWidget(self.volGraphHeightrange, 11, 1, 1, 6)
272 self.gridLayout_6.addWidget(self.volGraphHeightrange, 11, 1, 1, 6)
@@ -353,11 +367,16 class Ui_VoltageTab(object):
353 self.label_14.setText(_translate("MainWindow", "Scope:", None))
367 self.label_14.setText(_translate("MainWindow", "Scope:", None))
354 self.label_8.setText(_translate("MainWindow", "Channel List:", None))
368 self.label_8.setText(_translate("MainWindow", "Channel List:", None))
355 self.label_49.setText(_translate("MainWindow", "Show:", None))
369 self.label_49.setText(_translate("MainWindow", "Show:", None))
356 self.label_51.setText(_translate("MainWindow", "Height range:", None))
370 self.label_51.setText(_translate("MainWindow", "Amplitude/Intensity:", None))
357 self.label_12.setText(_translate("MainWindow", "Path :", None))
371 self.label_12.setText(_translate("MainWindow", "Path :", None))
358 self.label_13.setText(_translate("MainWindow", "Figure name:", None))
372 self.label_13.setText(_translate("MainWindow", "Figure name:", None))
359 self.label_52.setText(_translate("MainWindow", "Amplitude:", None))
373 self.label_52.setText(_translate("MainWindow", "Height range:", None))
360 self.label_50.setText(_translate("MainWindow", "Save:", None))
374 self.label_50.setText(_translate("MainWindow", "Save:", None))
375
376 self.volLabScopeType.setText(_translate("MainWindow", "Scope type:", None))
377 self.volComScopeType.setItemText(0, _translate("MainWindow", "I&Q", None))
378 self.volComScopeType.setItemText(1, _translate("MainWindow", "Power", None))
379
361 self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabgraphVoltage), _translate("MainWindow", "Graphics", None))
380 self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabgraphVoltage), _translate("MainWindow", "Graphics", None))
362
381
363 self.label_36.setText(_translate("MainWindow", "Type:", None))
382 self.label_36.setText(_translate("MainWindow", "Type:", None))
@@ -382,7 +401,7 class Ui_VoltageTab(object):
382 self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
401 self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
383 self.volOpOk.setToolTip('If you have finished, please Ok ')
402 self.volOpOk.setToolTip('If you have finished, please Ok ')
384 # tool tip gui volGraph
403 # tool tip gui volGraph
385 self.volGraphfreqrange.setToolTip('Height range. Example: 50,100')
404 self.volGraphIntensityRange.setToolTip('Height range. Example: 50,100')
386 self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
405 self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
387
406
388 No newline at end of file
407
General Comments 0
You need to be logged in to leave comments. Login now