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