@@ -80,6 +80,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
80 | 80 | """ |
|
81 | 81 | self.saveProject() |
|
82 | 82 |
|
|
83 | @pyqtSignature("") | |
|
84 | def on_actionClose_triggered(self): | |
|
85 | """ | |
|
86 | Slot documentation goes here. | |
|
87 | """ | |
|
88 | self.close() | |
|
89 | ||
|
83 | 90 | def on_actionStart_triggered(self): |
|
84 | 91 | """ |
|
85 | 92 | """ |
@@ -287,11 +294,16 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
287 | 294 | self.treeProjectProperties.expandAll() |
|
288 | 295 | |
|
289 | 296 | #Disable tabProject after finish the creation |
|
290 |
|
|
|
297 | self.tabProject.setEnabled(False) | |
|
291 | 298 | self.console.clear() |
|
292 | 299 | self.console.append("Now you can add a Unit Processing") |
|
293 | 300 | self.console.append("If you want to save your project") |
|
294 | 301 | self.console.append("click on your project name in the Tree Project Explorer") |
|
302 | ||
|
303 | ||
|
304 | @pyqtSignature("") | |
|
305 | def on_proClear_clicked(self): | |
|
306 | self.setProjectParam() | |
|
295 | 307 | #----------------Voltage Operation-------------------# |
|
296 | 308 | |
|
297 | 309 | @pyqtSignature("int") |
@@ -822,7 +834,6 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
822 | 834 | except: |
|
823 | 835 | return 0 |
|
824 | 836 | |
|
825 | ||
|
826 | 837 | if self.specGraphCebSave.isChecked(): |
|
827 | 838 | opObj10.addParameter(name='save', value='1', format='bool') |
|
828 | 839 | opObj10.addParameter(name='figpath', value= self.specGraphPath.text(),format='str') |
@@ -856,6 +867,10 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
856 | 867 | for i in self.__arbolDict: |
|
857 | 868 | if self.__arbolDict[i]==self.indexclick: |
|
858 | 869 | self.projectObj=self.__projObjDict[i] |
|
870 | else: | |
|
871 | self.console.clear() | |
|
872 | self.console.append("Please, Select the poject") | |
|
873 | return 0 | |
|
859 | 874 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" |
|
860 | 875 | self.projectObj.readXml(filename) |
|
861 | 876 | #controllerObj.printattr() |
@@ -872,6 +887,10 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
872 | 887 | for i in self.__arbolDict: |
|
873 | 888 | if self.__arbolDict[i]==self.indexclick: |
|
874 | 889 | self.projectObj=self.__projObjDict[i] |
|
890 | else: | |
|
891 | self.console.clear() | |
|
892 | self.console.append("First, Click on current project") | |
|
893 | return 0 | |
|
875 | 894 | |
|
876 | 895 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" |
|
877 | 896 | self.projectObj.writeXml(filename) |
@@ -886,13 +905,30 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
886 | 905 | for i in self.__arbolDict: |
|
887 | 906 | if self.__arbolDict[i]==self.indexclick: |
|
888 | 907 |
if self.__projObjDict.has_key(i)==True: |
|
908 | #self.tabProject.setEnabled(True) | |
|
889 | 909 | self.proName.setText(str(self.__projObjDict[i].name)) |
|
890 | 910 | self.proDataPath.setText(str(self.readUnitConfObjList[i-1].path)) |
|
911 | ||
|
912 | startDate = str(self.readUnitConfObjList[i-1].startDate) | |
|
913 | endDate = str(self.readUnitConfObjList[i-1].endDate) | |
|
914 | self.proComStartDate.clear() | |
|
915 | self.proComEndDate.clear() | |
|
916 | self.proComStartDate.addItem( startDate) | |
|
917 | self.proComEndDate.addItem(endDate) | |
|
918 | startTime=str(self.readUnitConfObjList[i-1].startTime) | |
|
919 | endTime=str(self.readUnitConfObjList[i-1].endTime) | |
|
920 | starlist=startTime.split(":") | |
|
921 | endlist=endTime.split(":") | |
|
922 | self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2])) | |
|
923 | self.proStartTime.setTime(self.time) | |
|
924 | self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2])) | |
|
925 | self.proEndTime.setTime(self.time) | |
|
926 | ||
|
891 | 927 | self.model_2=treeModel() |
|
892 | 928 | self.model_2.setParams(name = str(self.__projObjDict[i].name), |
|
893 | 929 | directorio = str(self.readUnitConfObjList[i-1].path), |
|
894 | 930 | workspace = self.pathWorkSpace, |
|
895 |
remode = " |
|
|
931 | remode = "Off Line", | |
|
896 | 932 | dataformat = self.readUnitConfObjList[i-1].datatype, |
|
897 | 933 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), |
|
898 | 934 | initTime = str(self.readUnitConfObjList[i-1].startTime), |
@@ -946,12 +982,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
946 | 982 | |
|
947 | 983 | def popup(self, pos): |
|
948 | 984 | |
|
949 | menu = QtGui.QMenu() | |
|
950 | quitAction0 = menu.addAction("AddNewProject") | |
|
951 | quitAction1 = menu.addAction("AddNewProcessingUnit") | |
|
952 |
quitAction2 = menu.addAction(" |
|
|
953 |
|
|
|
954 | action = menu.exec_(self.mapToGlobal(pos)) | |
|
985 | self.menu = QtGui.QMenu() | |
|
986 | quitAction0 = self.menu.addAction("AddNewProject") | |
|
987 | quitAction1 = self.menu.addAction("AddNewProcessingUnit") | |
|
988 | quitAction2 = self.menu.addAction("Delete Branch") | |
|
989 | quitAction3 = self.menu.addAction("Exit") | |
|
990 | ||
|
991 | action = self.menu.exec_(self.mapToGlobal(pos)) | |
|
955 | 992 | if action == quitAction0: |
|
956 | 993 | self.setProjectParam() |
|
957 | 994 | if action == quitAction1: |
@@ -961,6 +998,14 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
961 | 998 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
962 | 999 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
963 | 1000 | if action == quitAction2: |
|
1001 | for i in self.__arbolDict: | |
|
1002 | if self.__arbolDict[i]==self.indexclick: | |
|
1003 | self.arbolItem=self.__arbolDict[i] | |
|
1004 | #print self.arbolItem | |
|
1005 | #self.treeProjectExplorer.removeRows(self.arbolItem) | |
|
1006 | self.arbolItem.removeRows(self.arbolItem.row(),1) | |
|
1007 | ||
|
1008 | if action == quitAction3: | |
|
964 | 1009 | return |
|
965 | 1010 | |
|
966 | 1011 | def setProjectParam(self): |
@@ -969,10 +1014,15 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
969 | 1014 | self.tabProject.setEnabled(True) |
|
970 | 1015 | |
|
971 | 1016 | self.proName.clear() |
|
1017 | self.proDataType.setText('.r') | |
|
972 | 1018 | self.proDataPath.clear() |
|
973 | 1019 | self.proComDataType.clear() |
|
974 | 1020 | self.proComDataType.addItem("Voltage") |
|
975 | 1021 | self.proComDataType.addItem("Spectra") |
|
1022 | ||
|
1023 | self.proComStartDate.clear() | |
|
1024 | self.proComEndDate.clear() | |
|
1025 | ||
|
976 | 1026 | startTime="00:00:00" |
|
977 | 1027 | endTime="23:59:59" |
|
978 | 1028 | starlist=startTime.split(":") |
@@ -1040,6 +1090,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1040 | 1090 | |
|
1041 | 1091 | self.procUnitConfObj1 = self.projectObj.addProcUnit(datatype=datatype, inputId=inputId) |
|
1042 | 1092 | self.__upObjDict[self.procUnitConfObj1.id]= self.procUnitConfObj1 |
|
1093 | ||
|
1043 | 1094 | self.parentItem=self.__arbolDict[uporprojectObj.id] |
|
1044 | 1095 | self.numbertree=int(self.procUnitConfObj1.getId())-1 |
|
1045 | 1096 | self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype).arg(self.numbertree)) |
@@ -1054,14 +1105,15 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1054 | 1105 | if walk== 0: |
|
1055 | 1106 | files= os.listdir(path) |
|
1056 | 1107 | for thisFile in files: |
|
1057 | if not os.path.isfile(thisFile): | |
|
1058 | continue | |
|
1059 | 1108 | thisExt = os.path.splitext(thisFile)[-1] |
|
1060 | ||
|
1109 | print thisExt | |
|
1061 | 1110 | if thisExt != ext: |
|
1111 | self.console.clear() | |
|
1112 | self.console.append("There is no datatype selected in the path Directory") | |
|
1113 | self.proOk.setEnabled(False) | |
|
1062 | 1114 | continue |
|
1063 | 1115 | |
|
1064 |
fileList.append( |
|
|
1116 | fileList.append(thisFile) | |
|
1065 | 1117 | |
|
1066 | 1118 | for thisFile in fileList: |
|
1067 | 1119 | |
@@ -1097,13 +1149,19 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1097 | 1149 | continue |
|
1098 | 1150 | |
|
1099 | 1151 | doypath = os.path.join(path, thisDir, expLabel) |
|
1100 | ||
|
1152 | if not os.path.exists(doypath): | |
|
1153 | self.console.clear() | |
|
1154 | self.console.append("Please, Choose the Correct Path") | |
|
1155 | return | |
|
1101 | 1156 | files = os.listdir(doypath) |
|
1102 | 1157 | fileList = [] |
|
1103 | 1158 | |
|
1104 | 1159 | for thisFile in files: |
|
1105 | ||
|
1106 |
if |
|
|
1160 | thisExt=os.path.splitext(thisFile)[-1] | |
|
1161 | if thisExt != ext: | |
|
1162 | self.console.clear() | |
|
1163 | self.console.append("There is no datatype selected in the Path Directory") | |
|
1164 | self.proOk.setEnabled(False) | |
|
1107 | 1165 |
|
|
1108 | 1166 | |
|
1109 | 1167 | if not isRadarFile(thisFile): |
@@ -1132,14 +1190,6 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1132 | 1190 | Method to loads day |
|
1133 | 1191 | """ |
|
1134 | 1192 | ext=str(self.proDataType.text()) |
|
1135 | try: | |
|
1136 | punto = str(ext[1:2]) | |
|
1137 | ext=self.datatype | |
|
1138 | except: | |
|
1139 | self.proOk.setEnabled(False) | |
|
1140 | self.console.clear() | |
|
1141 | self.console.append("Please, Choose DataType") | |
|
1142 | return 0 | |
|
1143 | 1193 |
|
|
1144 | 1194 | #-------------------------# |
|
1145 | 1195 | walk= self.walk |
@@ -1171,8 +1221,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1171 | 1221 | self.tabSpectra.setEnabled(False) |
|
1172 | 1222 | self.tabCorrelation.setEnabled(False) |
|
1173 | 1223 | |
|
1224 | self.actionCreate.setShortcut('Ctrl+P') | |
|
1225 | self.actionStart.setShortcut('Ctrl+R') | |
|
1226 | self.actionSave.setShortcut('Ctrl+S') | |
|
1227 | self.actionClose.setShortcut('Ctrl+Q') | |
|
1228 | ||
|
1174 | 1229 | self.proName.clear() |
|
1175 |
self.proDataPath.setText(' |
|
|
1230 | self.proDataPath.setText('') | |
|
1176 | 1231 | self.console.append("Welcome to Signal Chain please Create a New Project") |
|
1177 | 1232 | self.proStartTime.setDisplayFormat("hh:mm:ss") |
|
1178 | 1233 | self.time =QtCore.QTime() |
@@ -1262,7 +1317,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||
|
1262 | 1317 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
1263 | 1318 | self.treeProjectExplorer.setToolTip('Right clik to add Project or Unit Process') |
|
1264 | 1319 | #tool tip gui project |
|
1265 |
self.proComWalk.setToolTip('Search |
|
|
1320 | self.proComWalk.setToolTip('<b>Search0</b>:<i>Search file in format .r or pdata</i> <b>Search1</b>:<i>Search file in a directory DYYYYDOY</i>') | |
|
1266 | 1321 | self.proComWalk.setCurrentIndex(1) |
|
1267 | 1322 | #tool tip gui volOp |
|
1268 | 1323 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
General Comments 0
You need to be logged in to leave comments.
Login now