@@ -114,9 +114,11 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
114 | """ |
|
114 | """ | |
115 | if p0==0: |
|
115 | if p0==0: | |
116 | self.online=0 |
|
116 | self.online=0 | |
|
117 | self.proDelay.setText("0") | |||
117 | self.proDelay.setEnabled(False) |
|
118 | self.proDelay.setEnabled(False) | |
118 | elif p0==1: |
|
119 | elif p0==1: | |
119 | self.online=1 |
|
120 | self.online=1 | |
|
121 | self.proDelay.setText("5") | |||
120 | self.proDelay.setEnabled(True) |
|
122 | self.proDelay.setEnabled(True) | |
121 | self.console.clear() |
|
123 | self.console.clear() | |
122 | self.console.append("Choose the type of Walk") |
|
124 | self.console.append("Choose the type of Walk") | |
@@ -149,6 +151,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
149 | self.walk=1 |
|
151 | self.walk=1 | |
150 |
|
152 | |||
151 | self.console.clear() |
|
153 | self.console.clear() | |
|
154 | self.console.append("If you have choose online mode write the delay") | |||
152 | self.console.append("Now, Push the Button Load to charge the date") |
|
155 | self.console.append("Now, Push the Button Load to charge the date") | |
153 |
|
156 | |||
154 | @pyqtSignature("") |
|
157 | @pyqtSignature("") | |
@@ -170,14 +173,14 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
170 | self.console.clear() |
|
173 | self.console.clear() | |
171 | self.console.append("Select the read mode") |
|
174 | self.console.append("Select the read mode") | |
172 |
|
175 | |||
173 |
|
176 | |||
174 | @pyqtSignature("") |
|
177 | @pyqtSignature("") | |
175 | def on_proLoadButton_clicked(self): |
|
178 | def on_proLoadButton_clicked(self): | |
176 | self.proOk.setEnabled(True) |
|
179 | self.proOk.setEnabled(True) | |
177 | self.console.clear() |
|
180 | self.console.clear() | |
178 | self.console.append("You will see the range of date Load") |
|
181 | self.console.append("You will see the range of date Load") | |
179 | self.console.append("First,Don't forget to Choose the Read Mode: OffLine or Online") |
|
182 | self.console.append("First,Don't forget to Choose the Read Mode: OffLine or Online") | |
180 |
self.console.append("The option |
|
183 | self.console.append("The option delay is for default 0") | |
181 | self.loadDays() |
|
184 | self.loadDays() | |
182 |
|
185 | |||
183 |
|
186 | |||
@@ -219,12 +222,31 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
219 |
|
222 | |||
220 | id = self.idp |
|
223 | id = self.idp | |
221 | name = str(self.proName.text()) |
|
224 | name = str(self.proName.text()) | |
|
225 | try: | |||
|
226 | name=str(self.proName.text()) | |||
|
227 | except: | |||
|
228 | self.console.clear() | |||
|
229 | self.console.append("Please Write a name") | |||
|
230 | return 0 | |||
|
231 | ||||
|
232 | ||||
222 | desc=str(self.proDescription.toPlainText()) |
|
233 | desc=str(self.proDescription.toPlainText()) | |
223 | self.projectObj.setup(id = id, name=name, description=desc) |
|
234 | self.projectObj.setup(id = id, name=name, description=desc) | |
224 | datatype = str(self.proComDataType.currentText()) |
|
235 | datatype = str(self.proComDataType.currentText()) | |
225 | path = str(self.proDataPath.text()) |
|
236 | path = str(self.proDataPath.text()) | |
226 | #path='C://data3' |
|
237 | #path='C://data3' | |
227 | online = int(self.online) |
|
238 | online = int(self.online) | |
|
239 | if online ==0: | |||
|
240 | delay=0 | |||
|
241 | else: | |||
|
242 | delay=self.proDelay.text() | |||
|
243 | try: | |||
|
244 | delay=int(self.proDelay.text()) | |||
|
245 | except: | |||
|
246 | self.console.clear() | |||
|
247 | self.console.append("Please Write a number for delay") | |||
|
248 | return 0 | |||
|
249 | ||||
228 | walk = int(self.walk) |
|
250 | walk = int(self.walk) | |
229 | starDate = str(self.proComStartDate.currentText()) |
|
251 | starDate = str(self.proComStartDate.currentText()) | |
230 | endDate = str(self.proComEndDate.currentText()) |
|
252 | endDate = str(self.proComEndDate.currentText()) | |
@@ -238,6 +260,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
238 | startTime= str(reloj1.hour()) +":"+str(reloj1.minute())+":"+ str(reloj1.second()), |
|
260 | startTime= str(reloj1.hour()) +":"+str(reloj1.minute())+":"+ str(reloj1.second()), | |
239 | endTime= str(reloj2.hour()) +":"+str(reloj2.minute())+":"+ str(reloj2.second()), |
|
261 | endTime= str(reloj2.hour()) +":"+str(reloj2.minute())+":"+ str(reloj2.second()), | |
240 | online= online, |
|
262 | online= online, | |
|
263 | delay=delay, | |||
241 | walk= walk) |
|
264 | walk= walk) | |
242 | self.readUnitConfObjList.append(self.readUnitConfObj) |
|
265 | self.readUnitConfObjList.append(self.readUnitConfObj) | |
243 |
|
266 | |||
@@ -251,7 +274,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
251 | self.model_2=treeModel() |
|
274 | self.model_2=treeModel() | |
252 | self.model_2.setParams(name = self.projectObj.name, |
|
275 | self.model_2.setParams(name = self.projectObj.name, | |
253 | directorio = path, |
|
276 | directorio = path, | |
254 |
workspace = |
|
277 | workspace = self.pathWorkSpace, | |
255 | remode = str(self.proComReadMode.currentText()), |
|
278 | remode = str(self.proComReadMode.currentText()), | |
256 | dataformat = datatype, |
|
279 | dataformat = datatype, | |
257 | date = str(starDate)+"-"+str(endDate), |
|
280 | date = str(starDate)+"-"+str(endDate), | |
@@ -833,7 +856,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
833 | for i in self.__arbolDict: |
|
856 | for i in self.__arbolDict: | |
834 | if self.__arbolDict[i]==self.indexclick: |
|
857 | if self.__arbolDict[i]==self.indexclick: | |
835 | self.projectObj=self.__projObjDict[i] |
|
858 | self.projectObj=self.__projObjDict[i] | |
836 |
filename= |
|
859 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" | |
837 | self.projectObj.readXml(filename) |
|
860 | self.projectObj.readXml(filename) | |
838 | #controllerObj.printattr() |
|
861 | #controllerObj.printattr() | |
839 |
|
862 | |||
@@ -849,7 +872,8 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
849 | for i in self.__arbolDict: |
|
872 | for i in self.__arbolDict: | |
850 | if self.__arbolDict[i]==self.indexclick: |
|
873 | if self.__arbolDict[i]==self.indexclick: | |
851 | self.projectObj=self.__projObjDict[i] |
|
874 | self.projectObj=self.__projObjDict[i] | |
852 | filename="C:\WorkspaceGUI\config"+str(self.projectObj.name)+str(self.projectObj.id)+".xml" |
|
875 | ||
|
876 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" | |||
853 | self.projectObj.writeXml(filename) |
|
877 | self.projectObj.writeXml(filename) | |
854 | self.console.clear() |
|
878 | self.console.clear() | |
855 | self.console.append("Now, you can push the icon Start in the toolbar or push start in menu run") |
|
879 | self.console.append("Now, you can push the icon Start in the toolbar or push start in menu run") | |
@@ -867,7 +891,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
867 | self.model_2=treeModel() |
|
891 | self.model_2=treeModel() | |
868 | self.model_2.setParams(name = str(self.__projObjDict[i].name), |
|
892 | self.model_2.setParams(name = str(self.__projObjDict[i].name), | |
869 | directorio = str(self.readUnitConfObjList[i-1].path), |
|
893 | directorio = str(self.readUnitConfObjList[i-1].path), | |
870 |
workspace = |
|
894 | workspace = self.pathWorkSpace, | |
871 | remode = "off Line", |
|
895 | remode = "off Line", | |
872 | dataformat = self.readUnitConfObjList[i-1].datatype, |
|
896 | dataformat = self.readUnitConfObjList[i-1].datatype, | |
873 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), |
|
897 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), | |
@@ -1059,6 +1083,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1059 | if walk == 1: |
|
1083 | if walk == 1: | |
1060 |
|
1084 | |||
1061 | dirList = os.listdir(path) |
|
1085 | dirList = os.listdir(path) | |
|
1086 | ||||
1062 | dirList.sort() |
|
1087 | dirList.sort() | |
1063 |
|
1088 | |||
1064 | dateList = [] |
|
1089 | dateList = [] | |
@@ -1111,6 +1136,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1111 | punto = str(ext[1:2]) |
|
1136 | punto = str(ext[1:2]) | |
1112 | ext=self.datatype |
|
1137 | ext=self.datatype | |
1113 | except: |
|
1138 | except: | |
|
1139 | self.proOk.setEnabled(False) | |||
1114 | self.console.clear() |
|
1140 | self.console.clear() | |
1115 | self.console.append("Please, Choose DataType") |
|
1141 | self.console.append("Please, Choose DataType") | |
1116 | return 0 |
|
1142 | return 0 | |
@@ -1119,6 +1145,11 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1119 | walk= self.walk |
|
1145 | walk= self.walk | |
1120 |
|
1146 | |||
1121 | path=str(self.proDataPath.text()) |
|
1147 | path=str(self.proDataPath.text()) | |
|
1148 | if not os.path.exists(path): | |||
|
1149 | self.proOk.setEnabled(False) | |||
|
1150 | self.console.clear() | |||
|
1151 | self.console.append("Write a correct a path") | |||
|
1152 | return | |||
1122 | self.proComStartDate.clear() |
|
1153 | self.proComStartDate.clear() | |
1123 | self.proComEndDate.clear() |
|
1154 | self.proComEndDate.clear() | |
1124 | #Load List to select start day and end day.(QComboBox) |
|
1155 | #Load List to select start day and end day.(QComboBox) | |
@@ -1128,6 +1159,9 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1128 | self.proComStartDate.addItem(thisDate) |
|
1159 | self.proComStartDate.addItem(thisDate) | |
1129 | self.proComEndDate.addItem(thisDate) |
|
1160 | self.proComEndDate.addItem(thisDate) | |
1130 | self.proComEndDate.setCurrentIndex(self.proComStartDate.count()-1) |
|
1161 | self.proComEndDate.setCurrentIndex(self.proComStartDate.count()-1) | |
|
1162 | ||||
|
1163 | def setWorkSpaceGUI(self,pathWorkSpace): | |||
|
1164 | self.pathWorkSpace = pathWorkSpace | |||
1131 |
|
1165 | |||
1132 | def setParameter(self): |
|
1166 | def setParameter(self): | |
1133 | self.setWindowTitle("ROJ-Signal Chain") |
|
1167 | self.setWindowTitle("ROJ-Signal Chain") | |
@@ -1175,6 +1209,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1175 | self.treeProjectProperties.expandAll() |
|
1209 | self.treeProjectProperties.expandAll() | |
1176 | #set Project |
|
1210 | #set Project | |
1177 | self.proDelay.setEnabled(False) |
|
1211 | self.proDelay.setEnabled(False) | |
|
1212 | self.proDataType.setReadOnly(True) | |||
1178 |
|
1213 | |||
1179 | #set Operation Voltage |
|
1214 | #set Operation Voltage | |
1180 | self.volOpComChannels.setEnabled(False) |
|
1215 | self.volOpComChannels.setEnabled(False) | |
@@ -1227,7 +1262,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1227 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
1262 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) | |
1228 | self.treeProjectExplorer.setToolTip('Right clik to add Project or Unit Process') |
|
1263 | self.treeProjectExplorer.setToolTip('Right clik to add Project or Unit Process') | |
1229 | #tool tip gui project |
|
1264 | #tool tip gui project | |
1230 |
self.proComWalk.setToolTip('Search 0: Search in format .r or pdata ,Search 1 : Search |
|
1265 | self.proComWalk.setToolTip('Search 0: Search file in format .r or pdata ,Search 1 : Search file in a directory DYYYYDOY') | |
1231 | self.proComWalk.setCurrentIndex(1) |
|
1266 | self.proComWalk.setCurrentIndex(1) | |
1232 | #tool tip gui volOp |
|
1267 | #tool tip gui volOp | |
1233 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
|
1268 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
General Comments 0
You need to be logged in to leave comments.
Login now