@@ -79,6 +79,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
79 | Slot documentation goes here. |
|
79 | Slot documentation goes here. | |
80 | """ |
|
80 | """ | |
81 | self.saveProject() |
|
81 | self.saveProject() | |
|
82 | ||||
|
83 | @pyqtSignature("") | |||
|
84 | def on_actionClose_triggered(self): | |||
|
85 | """ | |||
|
86 | Slot documentation goes here. | |||
|
87 | """ | |||
|
88 | self.close() | |||
82 |
|
89 | |||
83 | def on_actionStart_triggered(self): |
|
90 | def on_actionStart_triggered(self): | |
84 | """ |
|
91 | """ | |
@@ -287,11 +294,16 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
287 | self.treeProjectProperties.expandAll() |
|
294 | self.treeProjectProperties.expandAll() | |
288 |
|
295 | |||
289 | #Disable tabProject after finish the creation |
|
296 | #Disable tabProject after finish the creation | |
290 |
|
|
297 | self.tabProject.setEnabled(False) | |
291 | self.console.clear() |
|
298 | self.console.clear() | |
292 | self.console.append("Now you can add a Unit Processing") |
|
299 | self.console.append("Now you can add a Unit Processing") | |
293 | self.console.append("If you want to save your project") |
|
300 | self.console.append("If you want to save your project") | |
294 | self.console.append("click on your project name in the Tree Project Explorer") |
|
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 | #----------------Voltage Operation-------------------# |
|
307 | #----------------Voltage Operation-------------------# | |
296 |
|
308 | |||
297 | @pyqtSignature("int") |
|
309 | @pyqtSignature("int") | |
@@ -821,8 +833,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
821 | opObj10.addParameter(name='zmax', value=zvalueList[1], format='int') |
|
833 | opObj10.addParameter(name='zmax', value=zvalueList[1], format='int') | |
822 | except: |
|
834 | except: | |
823 | return 0 |
|
835 | return 0 | |
824 |
|
836 | |||
825 |
|
||||
826 | if self.specGraphCebSave.isChecked(): |
|
837 | if self.specGraphCebSave.isChecked(): | |
827 | opObj10.addParameter(name='save', value='1', format='bool') |
|
838 | opObj10.addParameter(name='save', value='1', format='bool') | |
828 | opObj10.addParameter(name='figpath', value= self.specGraphPath.text(),format='str') |
|
839 | opObj10.addParameter(name='figpath', value= self.specGraphPath.text(),format='str') | |
@@ -856,15 +867,19 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
856 | for i in self.__arbolDict: |
|
867 | for i in self.__arbolDict: | |
857 | if self.__arbolDict[i]==self.indexclick: |
|
868 | if self.__arbolDict[i]==self.indexclick: | |
858 | self.projectObj=self.__projObjDict[i] |
|
869 | self.projectObj=self.__projObjDict[i] | |
859 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" |
|
870 | else: | |
860 | self.projectObj.readXml(filename) |
|
871 | self.console.clear() | |
861 | #controllerObj.printattr() |
|
872 | self.console.append("Please, Select the poject") | |
862 |
|
873 | return 0 | ||
863 | self.projectObj.createObjects() |
|
874 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" | |
864 |
self.projectObj. |
|
875 | self.projectObj.readXml(filename) | |
865 | self.projectObj.run() |
|
876 | #controllerObj.printattr() | |
866 | self.console.clear() |
|
877 | ||
867 | self.console.append("Please Wait...") |
|
878 | self.projectObj.createObjects() | |
|
879 | self.projectObj.connectObjects() | |||
|
880 | self.projectObj.run() | |||
|
881 | self.console.clear() | |||
|
882 | self.console.append("Please Wait...") | |||
868 |
|
883 | |||
869 |
|
884 | |||
870 | def saveProject(self): |
|
885 | def saveProject(self): | |
@@ -872,12 +887,16 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
872 | for i in self.__arbolDict: |
|
887 | for i in self.__arbolDict: | |
873 | if self.__arbolDict[i]==self.indexclick: |
|
888 | if self.__arbolDict[i]==self.indexclick: | |
874 | self.projectObj=self.__projObjDict[i] |
|
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 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" |
|
895 | filename=self.pathWorkSpace+str(self.projectObj.name)+str(self.projectObj.id)+".xml" | |
877 | self.projectObj.writeXml(filename) |
|
896 | self.projectObj.writeXml(filename) | |
878 | self.console.clear() |
|
897 | self.console.clear() | |
879 | self.console.append("Now, you can push the icon Start in the toolbar or push start in menu run") |
|
898 | self.console.append("Now, you can push the icon Start in the toolbar or push start in menu run") | |
880 |
|
899 | |||
881 |
|
900 | |||
882 | def clickFunction(self,index): |
|
901 | def clickFunction(self,index): | |
883 | self.indexclick= index.model().itemFromIndex(index) |
|
902 | self.indexclick= index.model().itemFromIndex(index) | |
@@ -885,14 +904,31 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
885 | def doubleclickFunction(self): |
|
904 | def doubleclickFunction(self): | |
886 | for i in self.__arbolDict: |
|
905 | for i in self.__arbolDict: | |
887 | if self.__arbolDict[i]==self.indexclick: |
|
906 | if self.__arbolDict[i]==self.indexclick: | |
888 |
if self.__projObjDict.has_key(i)==True: |
|
907 | if self.__projObjDict.has_key(i)==True: | |
|
908 | #self.tabProject.setEnabled(True) | |||
889 | self.proName.setText(str(self.__projObjDict[i].name)) |
|
909 | self.proName.setText(str(self.__projObjDict[i].name)) | |
890 | self.proDataPath.setText(str(self.readUnitConfObjList[i-1].path)) |
|
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 | self.model_2=treeModel() |
|
927 | self.model_2=treeModel() | |
892 | self.model_2.setParams(name = str(self.__projObjDict[i].name), |
|
928 | self.model_2.setParams(name = str(self.__projObjDict[i].name), | |
893 | directorio = str(self.readUnitConfObjList[i-1].path), |
|
929 | directorio = str(self.readUnitConfObjList[i-1].path), | |
894 | workspace = self.pathWorkSpace, |
|
930 | workspace = self.pathWorkSpace, | |
895 |
remode = " |
|
931 | remode = "Off Line", | |
896 | dataformat = self.readUnitConfObjList[i-1].datatype, |
|
932 | dataformat = self.readUnitConfObjList[i-1].datatype, | |
897 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), |
|
933 | date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate), | |
898 | initTime = str(self.readUnitConfObjList[i-1].startTime), |
|
934 | initTime = str(self.readUnitConfObjList[i-1].startTime), | |
@@ -946,12 +982,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
946 |
|
982 | |||
947 | def popup(self, pos): |
|
983 | def popup(self, pos): | |
948 |
|
984 | |||
949 | menu = QtGui.QMenu() |
|
985 | self.menu = QtGui.QMenu() | |
950 | quitAction0 = menu.addAction("AddNewProject") |
|
986 | quitAction0 = self.menu.addAction("AddNewProject") | |
951 | quitAction1 = menu.addAction("AddNewProcessingUnit") |
|
987 | quitAction1 = self.menu.addAction("AddNewProcessingUnit") | |
952 |
quitAction2 = menu.addAction(" |
|
988 | quitAction2 = self.menu.addAction("Delete Branch") | |
953 |
|
|
989 | quitAction3 = self.menu.addAction("Exit") | |
954 | action = menu.exec_(self.mapToGlobal(pos)) |
|
990 | ||
|
991 | action = self.menu.exec_(self.mapToGlobal(pos)) | |||
955 | if action == quitAction0: |
|
992 | if action == quitAction0: | |
956 | self.setProjectParam() |
|
993 | self.setProjectParam() | |
957 | if action == quitAction1: |
|
994 | if action == quitAction1: | |
@@ -961,6 +998,14 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
961 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
998 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") | |
962 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
999 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") | |
963 | if action == quitAction2: |
|
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 | return |
|
1009 | return | |
965 |
|
1010 | |||
966 | def setProjectParam(self): |
|
1011 | def setProjectParam(self): | |
@@ -969,10 +1014,15 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
969 | self.tabProject.setEnabled(True) |
|
1014 | self.tabProject.setEnabled(True) | |
970 |
|
1015 | |||
971 | self.proName.clear() |
|
1016 | self.proName.clear() | |
|
1017 | self.proDataType.setText('.r') | |||
972 | self.proDataPath.clear() |
|
1018 | self.proDataPath.clear() | |
973 | self.proComDataType.clear() |
|
1019 | self.proComDataType.clear() | |
974 | self.proComDataType.addItem("Voltage") |
|
1020 | self.proComDataType.addItem("Voltage") | |
975 | self.proComDataType.addItem("Spectra") |
|
1021 | self.proComDataType.addItem("Spectra") | |
|
1022 | ||||
|
1023 | self.proComStartDate.clear() | |||
|
1024 | self.proComEndDate.clear() | |||
|
1025 | ||||
976 | startTime="00:00:00" |
|
1026 | startTime="00:00:00" | |
977 | endTime="23:59:59" |
|
1027 | endTime="23:59:59" | |
978 | starlist=startTime.split(":") |
|
1028 | starlist=startTime.split(":") | |
@@ -1040,6 +1090,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1040 |
|
1090 | |||
1041 | self.procUnitConfObj1 = self.projectObj.addProcUnit(datatype=datatype, inputId=inputId) |
|
1091 | self.procUnitConfObj1 = self.projectObj.addProcUnit(datatype=datatype, inputId=inputId) | |
1042 | self.__upObjDict[self.procUnitConfObj1.id]= self.procUnitConfObj1 |
|
1092 | self.__upObjDict[self.procUnitConfObj1.id]= self.procUnitConfObj1 | |
|
1093 | ||||
1043 | self.parentItem=self.__arbolDict[uporprojectObj.id] |
|
1094 | self.parentItem=self.__arbolDict[uporprojectObj.id] | |
1044 | self.numbertree=int(self.procUnitConfObj1.getId())-1 |
|
1095 | self.numbertree=int(self.procUnitConfObj1.getId())-1 | |
1045 | self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype).arg(self.numbertree)) |
|
1096 | self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype).arg(self.numbertree)) | |
@@ -1054,14 +1105,15 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1054 | if walk== 0: |
|
1105 | if walk== 0: | |
1055 | files= os.listdir(path) |
|
1106 | files= os.listdir(path) | |
1056 | for thisFile in files: |
|
1107 | for thisFile in files: | |
1057 | if not os.path.isfile(thisFile): |
|
|||
1058 | continue |
|
|||
1059 | thisExt = os.path.splitext(thisFile)[-1] |
|
1108 | thisExt = os.path.splitext(thisFile)[-1] | |
1060 |
|
1109 | print thisExt | ||
1061 | if thisExt != ext: |
|
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 | continue |
|
1114 | continue | |
1063 |
|
1115 | |||
1064 |
fileList.append( |
|
1116 | fileList.append(thisFile) | |
1065 |
|
1117 | |||
1066 | for thisFile in fileList: |
|
1118 | for thisFile in fileList: | |
1067 |
|
1119 | |||
@@ -1097,14 +1149,20 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1097 | continue |
|
1149 | continue | |
1098 |
|
1150 | |||
1099 | doypath = os.path.join(path, thisDir, expLabel) |
|
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 | files = os.listdir(doypath) |
|
1156 | files = os.listdir(doypath) | |
1102 | fileList = [] |
|
1157 | fileList = [] | |
1103 |
|
1158 | |||
1104 | for thisFile in files: |
|
1159 | for thisFile in files: | |
1105 |
|
1160 | thisExt=os.path.splitext(thisFile)[-1] | ||
1106 |
if |
|
1161 | if thisExt != ext: | |
1107 |
|
|
1162 | self.console.clear() | |
|
1163 | self.console.append("There is no datatype selected in the Path Directory") | |||
|
1164 | self.proOk.setEnabled(False) | |||
|
1165 | continue | |||
1108 |
|
1166 | |||
1109 | if not isRadarFile(thisFile): |
|
1167 | if not isRadarFile(thisFile): | |
1110 | self.proOk.setEnabled(False) |
|
1168 | self.proOk.setEnabled(False) | |
@@ -1132,15 +1190,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1132 | Method to loads day |
|
1190 | Method to loads day | |
1133 | """ |
|
1191 | """ | |
1134 | ext=str(self.proDataType.text()) |
|
1192 | ext=str(self.proDataType.text()) | |
1135 | try: |
|
1193 | ||
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 |
|
||||
1144 | #-------------------------# |
|
1194 | #-------------------------# | |
1145 | walk= self.walk |
|
1195 | walk= self.walk | |
1146 |
|
1196 | |||
@@ -1171,8 +1221,13 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1171 | self.tabSpectra.setEnabled(False) |
|
1221 | self.tabSpectra.setEnabled(False) | |
1172 | self.tabCorrelation.setEnabled(False) |
|
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 | self.proName.clear() |
|
1229 | self.proName.clear() | |
1175 |
self.proDataPath.setText(' |
|
1230 | self.proDataPath.setText('') | |
1176 | self.console.append("Welcome to Signal Chain please Create a New Project") |
|
1231 | self.console.append("Welcome to Signal Chain please Create a New Project") | |
1177 | self.proStartTime.setDisplayFormat("hh:mm:ss") |
|
1232 | self.proStartTime.setDisplayFormat("hh:mm:ss") | |
1178 | self.time =QtCore.QTime() |
|
1233 | self.time =QtCore.QTime() | |
@@ -1262,7 +1317,7 class BasicWindow(QMainWindow,Ui_BasicWindow): | |||||
1262 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
1317 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) | |
1263 | self.treeProjectExplorer.setToolTip('Right clik to add Project or Unit Process') |
|
1318 | self.treeProjectExplorer.setToolTip('Right clik to add Project or Unit Process') | |
1264 | #tool tip gui project |
|
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 | self.proComWalk.setCurrentIndex(1) |
|
1321 | self.proComWalk.setCurrentIndex(1) | |
1267 | #tool tip gui volOp |
|
1322 | #tool tip gui volOp | |
1268 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
|
1323 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
General Comments 0
You need to be logged in to leave comments.
Login now