1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -20,4 +20,7 VERSIONS: | |||||
20 |
|
20 | |||
21 | 2.1.3.2: |
|
21 | 2.1.3.2: | |
22 | -GUI: user interaction enhanced |
|
22 | -GUI: user interaction enhanced | |
23 | -controller_api.py: Safe access to ControllerThead No newline at end of file |
|
23 | -controller_api.py: Safe access to ControllerThead | |
|
24 | ||||
|
25 | 2.1.3.3: | |||
|
26 | -Colored Button Icons were added to GUI No newline at end of file |
@@ -4,4 +4,4 Created on Feb 7, 2012 | |||||
4 | @author $Author$ |
|
4 | @author $Author$ | |
5 | @version $Id$ |
|
5 | @version $Id$ | |
6 | ''' |
|
6 | ''' | |
7 |
__version__ = "2.1.3. |
|
7 | __version__ = "2.1.3.3" No newline at end of file |
@@ -380,8 +380,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
380 |
|
380 | |||
381 | self.proDataPath.setText(datapath) |
|
381 | self.proDataPath.setText(datapath) | |
382 |
|
382 | |||
383 | self.actionStart.setEnabled(False) |
|
383 | self._disable_play_button() | |
384 | self.actionStarToolbar.setEnabled(False) |
|
384 | self._disable_save_button() | |
385 | self.proOk.setEnabled(False) |
|
385 | self.proOk.setEnabled(False) | |
386 |
|
386 | |||
387 | self.proComStartDate.clear() |
|
387 | self.proComStartDate.clear() | |
@@ -465,11 +465,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
465 | Prepara la configuración del diágrama del Arbol del treeView numero 2 |
|
465 | Prepara la configuración del diágrama del Arbol del treeView numero 2 | |
466 | """ |
|
466 | """ | |
467 |
|
467 | |||
468 | self.actionSaveToolbar.setEnabled(False) |
|
468 | self._disable_play_button() | |
469 | self.actionStarToolbar.setEnabled(False) |
|
469 | self._disable_save_button() | |
470 |
|
||||
471 | self.actionSave.setEnabled(False) |
|
|||
472 | self.actionStart.setEnabled(False) |
|
|||
473 |
|
470 | |||
474 | self.console.clear() |
|
471 | self.console.clear() | |
475 |
|
472 | |||
@@ -510,11 +507,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
510 | self.refreshProjectProperties(projectObjView) |
|
507 | self.refreshProjectProperties(projectObjView) | |
511 | # Disable tabProject after finish the creation |
|
508 | # Disable tabProject after finish the creation | |
512 |
|
509 | |||
513 | self.actionSaveToolbar.setEnabled(True) |
|
510 | self._enable_play_button() | |
514 | self.actionStarToolbar.setEnabled(True) |
|
511 | self._enable_save_button() | |
515 |
|
||||
516 | self.actionSave.setEnabled(True) |
|
|||
517 | self.actionStart.setEnabled(True) |
|
|||
518 |
|
512 | |||
519 | self.console.clear() |
|
513 | self.console.clear() | |
520 | self.console.append("The project parameters were validated") |
|
514 | self.console.append("The project parameters were validated") | |
@@ -744,11 +738,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
744 |
|
738 | |||
745 | checkPath = False |
|
739 | checkPath = False | |
746 |
|
740 | |||
747 | self.actionSaveToolbar.setEnabled(False) |
|
741 | self._disable_play_button() | |
748 | self.actionStarToolbar.setEnabled(False) |
|
742 | self._disable_save_button() | |
749 |
|
||||
750 | self.actionSave.setEnabled(False) |
|
|||
751 | self.actionStart.setEnabled(False) |
|
|||
752 |
|
743 | |||
753 | self.console.clear() |
|
744 | self.console.clear() | |
754 | self.console.append("Checking input parameters ...") |
|
745 | self.console.append("Checking input parameters ...") | |
@@ -1039,11 +1030,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1039 |
|
1030 | |||
1040 | self.console.append("Save your project and press Play button to start signal processing") |
|
1031 | self.console.append("Save your project and press Play button to start signal processing") | |
1041 |
|
1032 | |||
1042 | self.actionSaveToolbar.setEnabled(True) |
|
1033 | self._enable_play_button() | |
1043 | self.actionStarToolbar.setEnabled(True) |
|
1034 | self._enable_save_button() | |
1044 |
|
||||
1045 | self.actionSave.setEnabled(True) |
|
|||
1046 | self.actionStart.setEnabled(True) |
|
|||
1047 |
|
1035 | |||
1048 | return 1 |
|
1036 | return 1 | |
1049 |
|
1037 | |||
@@ -1187,11 +1175,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1187 | addFTP = False |
|
1175 | addFTP = False | |
1188 | checkPath = False |
|
1176 | checkPath = False | |
1189 |
|
1177 | |||
1190 | self.actionSaveToolbar.setEnabled(False) |
|
1178 | self._disable_play_button() | |
1191 | self.actionStarToolbar.setEnabled(False) |
|
1179 | self._disable_save_button() | |
1192 |
|
||||
1193 | self.actionSave.setEnabled(False) |
|
|||
1194 | self.actionStart.setEnabled(False) |
|
|||
1195 |
|
1180 | |||
1196 | self.console.clear() |
|
1181 | self.console.clear() | |
1197 | self.console.append("Checking input parameters ...") |
|
1182 | self.console.append("Checking input parameters ...") | |
@@ -1895,11 +1880,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1895 |
|
1880 | |||
1896 | self.console.append("Save your project and press Play button to start signal processing") |
|
1881 | self.console.append("Save your project and press Play button to start signal processing") | |
1897 |
|
1882 | |||
1898 | self.actionSaveToolbar.setEnabled(True) |
|
1883 | self._enable_play_button() | |
1899 | self.actionStarToolbar.setEnabled(True) |
|
1884 | self._enable_save_button() | |
1900 |
|
||||
1901 | self.actionSave.setEnabled(True) |
|
|||
1902 | self.actionStart.setEnabled(True) |
|
|||
1903 |
|
1885 | |||
1904 | return 1 |
|
1886 | return 1 | |
1905 |
|
1887 | |||
@@ -2053,11 +2035,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2053 | addFTP = False |
|
2035 | addFTP = False | |
2054 | checkPath = False |
|
2036 | checkPath = False | |
2055 |
|
2037 | |||
2056 | self.actionSaveToolbar.setEnabled(False) |
|
2038 | self._disable_play_button() | |
2057 | self.actionStarToolbar.setEnabled(False) |
|
2039 | self._disable_save_button() | |
2058 |
|
||||
2059 | self.actionSave.setEnabled(False) |
|
|||
2060 | self.actionStart.setEnabled(False) |
|
|||
2061 |
|
2040 | |||
2062 | self.console.clear() |
|
2041 | self.console.clear() | |
2063 | self.console.append("Checking input parameters ...") |
|
2042 | self.console.append("Checking input parameters ...") | |
@@ -2300,11 +2279,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2300 |
|
2279 | |||
2301 | self.console.append("Save your project and press Play button to start signal processing") |
|
2280 | self.console.append("Save your project and press Play button to start signal processing") | |
2302 |
|
2281 | |||
2303 | self.actionSaveToolbar.setEnabled(True) |
|
2282 | self._enable_save_button() | |
2304 | self.actionStarToolbar.setEnabled(True) |
|
2283 | self._enable_play_button() | |
2305 |
|
||||
2306 | self.actionSave.setEnabled(True) |
|
|||
2307 | self.actionStart.setEnabled(True) |
|
|||
2308 |
|
2284 | |||
2309 | return 1 |
|
2285 | return 1 | |
2310 | @pyqtSignature("int") |
|
2286 | @pyqtSignature("int") | |
@@ -4644,13 +4620,13 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4644 |
|
4620 | |||
4645 | def openProject(self): |
|
4621 | def openProject(self): | |
4646 |
|
4622 | |||
4647 | self.actionStart.setEnabled(False) |
|
4623 | self._disable_save_button() | |
4648 | self.actionStarToolbar.setEnabled(False) |
|
4624 | self._disable_play_button() | |
4649 |
|
4625 | |||
4650 | self.frame_2.setEnabled(True) |
|
4626 | self.frame_2.setEnabled(True) | |
4651 |
|
4627 | |||
4652 | # print self.dir |
|
4628 | # print self.dir | |
4653 |
filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open |
|
4629 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open a project file", self.pathWorkSpace, self.tr("Html Files (*.xml)"))) | |
4654 |
|
4630 | |||
4655 | projectObjLoad = Project() |
|
4631 | projectObjLoad = Project() | |
4656 |
|
4632 | |||
@@ -4717,8 +4693,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4717 | self.console.clear() |
|
4693 | self.console.clear() | |
4718 | self.console.append("The selected xml file has been loaded successfully") |
|
4694 | self.console.append("The selected xml file has been loaded successfully") | |
4719 |
|
4695 | |||
4720 | self.actionStart.setEnabled(True) |
|
4696 | self._disable_save_button() | |
4721 | self.actionStarToolbar.setEnabled(True) |
|
4697 | self._enable_play_button() | |
4722 |
|
4698 | |||
4723 | def create_updating_timer(self): |
|
4699 | def create_updating_timer(self): | |
4724 | self.comm_data_timer = QtCore.QTimer(self) |
|
4700 | self.comm_data_timer = QtCore.QTimer(self) | |
@@ -4736,28 +4712,29 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4736 |
|
4712 | |||
4737 | def playProject(self, ext=".xml", save=1): |
|
4713 | def playProject(self, ext=".xml", save=1): | |
4738 |
|
4714 | |||
|
4715 | self._disable_play_button() | |||
|
4716 | self._disable_save_button() | |||
|
4717 | ||||
|
4718 | if self.controllerThread: | |||
|
4719 | if self.controllerThread.isRunning(): | |||
|
4720 | self.console.append("There is already another process running") | |||
|
4721 | self._enable_stop_button() | |||
|
4722 | return | |||
|
4723 | ||||
4739 | projectObj = self.getSelectedProjectObj() |
|
4724 | projectObj = self.getSelectedProjectObj() | |
4740 |
|
4725 | |||
4741 | if not projectObj: |
|
4726 | if not projectObj: | |
4742 |
self.console.append("Please select a project |
|
4727 | self.console.append("Please, select a project to start it") | |
4743 | return |
|
4728 | return | |
4744 |
|
4729 | |||
4745 | if save: |
|
4730 | if save: | |
4746 | filename = self.saveProject() |
|
4731 | filename = self.saveProject() | |
4747 | if filename == None: |
|
4732 | if filename == None: | |
4748 |
self.console.append("Process |
|
4733 | self.console.append("Process not initialized.") | |
4749 | return |
|
4734 | return | |
4750 | else: |
|
4735 | else: | |
4751 | filename = TEMPORAL_FILE |
|
4736 | filename = TEMPORAL_FILE | |
4752 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) |
|
4737 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) | |
4753 |
|
||||
4754 | self.actionStart.setEnabled(False) |
|
|||
4755 | self.actionPause.setEnabled(True) |
|
|||
4756 | self.actionStop.setEnabled(True) |
|
|||
4757 |
|
||||
4758 | self.actionStarToolbar.setEnabled(False) |
|
|||
4759 | self.actionPauseToolbar.setEnabled(True) |
|
|||
4760 | self.actionStopToolbar.setEnabled(True) |
|
|||
4761 |
|
4738 | |||
4762 | self.console.append("Please Wait...") |
|
4739 | self.console.append("Please Wait...") | |
4763 |
|
4740 | |||
@@ -4770,7 +4747,9 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4770 | sleep(0.5) |
|
4747 | sleep(0.5) | |
4771 | self.threadStarted = True |
|
4748 | self.threadStarted = True | |
4772 |
|
4749 | |||
4773 | self.changeStartIcon(started=True) |
|
4750 | self._disable_play_button() | |
|
4751 | self._disable_save_button() | |||
|
4752 | self._enable_stop_button() | |||
4774 |
|
4753 | |||
4775 | def stopProject(self): |
|
4754 | def stopProject(self): | |
4776 |
|
4755 | |||
@@ -4780,37 +4759,21 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4780 |
|
4759 | |||
4781 | while self.controllerThread.isRunning(): |
|
4760 | while self.controllerThread.isRunning(): | |
4782 | sleep(0.5) |
|
4761 | sleep(0.5) | |
4783 |
|
||||
4784 | self.actionStart.setEnabled(True) |
|
|||
4785 | self.actionPause.setEnabled(False) |
|
|||
4786 | self.actionStop.setEnabled(False) |
|
|||
4787 |
|
||||
4788 | self.actionStarToolbar.setEnabled(True) |
|
|||
4789 | self.actionPauseToolbar.setEnabled(False) |
|
|||
4790 | self.actionStopToolbar.setEnabled(False) |
|
|||
4791 |
|
4762 | |||
4792 |
self. |
|
4763 | self._disable_stop_button() | |
4793 |
self. |
|
4764 | self._enable_play_button() | |
4794 |
|
4765 | |||
4795 | def pauseProject(self): |
|
4766 | def pauseProject(self): | |
4796 |
|
4767 | |||
4797 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) |
|
4768 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) | |
4798 | paused = self.controllerThread.pause() |
|
4769 | paused = self.controllerThread.pause() | |
4799 |
|
4770 | |||
4800 | self.actionStart.setEnabled(False) |
|
|||
4801 | self.actionPause.setEnabled(True) |
|
|||
4802 | self.actionStop.setEnabled(True) |
|
|||
4803 |
|
||||
4804 | self.actionStarToolbar.setEnabled(False) |
|
|||
4805 | self.actionPauseToolbar.setEnabled(True) |
|
|||
4806 | self.actionStopToolbar.setEnabled(True) |
|
|||
4807 |
|
||||
4808 | self.changePauseIcon(paused) |
|
4771 | self.changePauseIcon(paused) | |
4809 |
|
4772 | |||
4810 | def saveProject(self, filename=None): |
|
4773 | def saveProject(self, filename=None): | |
4811 |
|
4774 | |||
4812 | self.actionStart.setEnabled(False) |
|
4775 | self._disable_save_button() | |
4813 | self.actionStarToolbar.setEnabled(False) |
|
4776 | self._disable_play_button() | |
4814 |
|
4777 | |||
4815 | projectObj = self.getSelectedProjectObj() |
|
4778 | projectObj = self.getSelectedProjectObj() | |
4816 |
|
4779 | |||
@@ -4856,11 +4819,8 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4856 | self.console.append("Project saved") |
|
4819 | self.console.append("Project saved") | |
4857 | self.console.append("Press Play button to start data processing ...") |
|
4820 | self.console.append("Press Play button to start data processing ...") | |
4858 |
|
4821 | |||
4859 | self.actionSaveToolbar.setEnabled(False) |
|
4822 | self._disable_save_button() | |
4860 | self.actionStarToolbar.setEnabled(True) |
|
4823 | self._enable_play_button() | |
4861 |
|
||||
4862 | self.actionSave.setEnabled(False) |
|
|||
4863 | self.actionStart.setEnabled(True) |
|
|||
4864 |
|
4824 | |||
4865 | return filename |
|
4825 | return filename | |
4866 |
|
4826 | |||
@@ -5297,13 +5257,10 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
5297 | """ |
|
5257 | """ | |
5298 | Method to loads day |
|
5258 | Method to loads day | |
5299 | """ |
|
5259 | """ | |
5300 | self.actionSaveToolbar.setEnabled(False) |
|
5260 | self._disable_save_button() | |
5301 | self.actionStarToolbar.setEnabled(False) |
|
5261 | self._disable_play_button() | |
5302 |
|
||||
5303 | self.actionSave.setEnabled(False) |
|
|||
5304 | self.actionStart.setEnabled(False) |
|
|||
5305 |
|
||||
5306 | self.proOk.setEnabled(False) |
|
5262 | self.proOk.setEnabled(False) | |
|
5263 | ||||
5307 | self.proComStartDate.clear() |
|
5264 | self.proComStartDate.clear() | |
5308 | self.proComEndDate.clear() |
|
5265 | self.proComEndDate.clear() | |
5309 |
|
5266 | |||
@@ -5345,17 +5302,13 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
5345 |
|
5302 | |||
5346 | self.dateList = dateStrList |
|
5303 | self.dateList = dateStrList | |
5347 |
|
5304 | |||
5348 | self.proOk.setEnabled(True) |
|
|||
5349 |
|
||||
5350 | self.actionSaveToolbar.setEnabled(True) |
|
|||
5351 | self.actionStarToolbar.setEnabled(True) |
|
|||
5352 |
|
||||
5353 | self.actionSave.setEnabled(True) |
|
|||
5354 | self.actionStart.setEnabled(True) |
|
|||
5355 |
|
||||
5356 | self.console.clear() |
|
5305 | self.console.clear() | |
5357 | self.console.append("Successful load") |
|
5306 | self.console.append("Successful load") | |
5358 |
|
5307 | |||
|
5308 | self.proOk.setEnabled(True) | |||
|
5309 | self._enable_play_button() | |||
|
5310 | self._enable_save_button() | |||
|
5311 | ||||
5359 | return self.dateList |
|
5312 | return self.dateList | |
5360 |
|
5313 | |||
5361 | def setWorkSpaceGUI(self, pathWorkSpace=None): |
|
5314 | def setWorkSpaceGUI(self, pathWorkSpace=None): | |
@@ -5385,6 +5338,52 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
5385 | self.console.setTextColor(color_red) |
|
5338 | self.console.setTextColor(color_red) | |
5386 | self.console.append(text) |
|
5339 | self.console.append(text) | |
5387 | self.console.setTextColor(color_black) |
|
5340 | self.console.setTextColor(color_black) | |
|
5341 | ||||
|
5342 | def _enable_save_button(self): | |||
|
5343 | ||||
|
5344 | self.actionSaveToolbar.setEnabled(True) | |||
|
5345 | self.actionSave.setEnabled(True) | |||
|
5346 | ||||
|
5347 | def _disable_save_button(self): | |||
|
5348 | ||||
|
5349 | self.actionSaveToolbar.setEnabled(False) | |||
|
5350 | self.actionSave.setEnabled(False) | |||
|
5351 | ||||
|
5352 | def _enable_play_button(self): | |||
|
5353 | ||||
|
5354 | self.actionStart.setEnabled(True) | |||
|
5355 | self.actionStarToolbar.setEnabled(True) | |||
|
5356 | ||||
|
5357 | self.changeStartIcon(started=False) | |||
|
5358 | ||||
|
5359 | def _disable_play_button(self): | |||
|
5360 | ||||
|
5361 | self.actionStart.setEnabled(False) | |||
|
5362 | self.actionStarToolbar.setEnabled(False) | |||
|
5363 | ||||
|
5364 | self.changeStartIcon(started=True) | |||
|
5365 | ||||
|
5366 | def _enable_stop_button(self): | |||
|
5367 | ||||
|
5368 | self.actionPause.setEnabled(True) | |||
|
5369 | self.actionStop.setEnabled(True) | |||
|
5370 | ||||
|
5371 | self.actionPauseToolbar.setEnabled(True) | |||
|
5372 | self.actionStopToolbar.setEnabled(True) | |||
|
5373 | ||||
|
5374 | self.changePauseIcon(paused=False) | |||
|
5375 | self.changeStopIcon(started=True) | |||
|
5376 | ||||
|
5377 | def _disable_stop_button(self): | |||
|
5378 | ||||
|
5379 | self.actionPause.setEnabled(False) | |||
|
5380 | self.actionStop.setEnabled(False) | |||
|
5381 | ||||
|
5382 | self.actionPauseToolbar.setEnabled(False) | |||
|
5383 | self.actionStopToolbar.setEnabled(False) | |||
|
5384 | ||||
|
5385 | self.changePauseIcon(paused=False) | |||
|
5386 | self.changeStopIcon(started=False) | |||
5388 |
|
5387 | |||
5389 | def setGUIStatus(self): |
|
5388 | def setGUIStatus(self): | |
5390 |
|
5389 |
@@ -30,46 +30,54 from schainpy import __version__ | |||||
30 |
|
30 | |||
31 | FIGURES_PATH = tools.get_path() |
|
31 | FIGURES_PATH = tools.get_path() | |
32 |
|
32 | |||
|
33 | ICON_START = "start_green.png" | |||
|
34 | ICON_PAUSE = "pause_yellow.png" | |||
|
35 | ICON_STOP = "stop_red.png" | |||
|
36 | ||||
|
37 | ICON_PAUSE_ENA = "restart_yellow.png" | |||
|
38 | ||||
|
39 | ICON_START_DIS = "start.png" | |||
|
40 | ICON_PAUSE_DIS = "pause.png" | |||
|
41 | ICON_STOP_DIS = "stop.png" | |||
|
42 | ||||
33 | class Ui_EnvWindow(object): |
|
43 | class Ui_EnvWindow(object): | |
34 | paused = False |
|
|||
35 |
|
||||
36 | def restorePauseIcon(self): |
|
|||
37 |
|
44 | |||
38 | icon_name = "pause.png" |
|
45 | def changeStartIcon(self, started=False): | |
39 | iconPause = QtGui.QIcon() |
|
|||
40 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
|||
41 | self.actionPauseToolbar.setIcon(iconPause) |
|
|||
42 |
|
||||
43 | def restoreStartIcon(self): |
|
|||
44 |
|
46 | |||
45 | icon_name = "start.png" |
|
47 | if started == False: | |
|
48 | icon_name = ICON_START | |||
|
49 | else: | |||
|
50 | icon_name = ICON_START_DIS | |||
|
51 | ||||
46 | iconStart = QtGui.QIcon() |
|
52 | iconStart = QtGui.QIcon() | |
47 | iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
53 | iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
48 | self.actionStarToolbar.setIcon(iconStart) |
|
54 | self.actionStarToolbar.setIcon(iconStart) | |
|
55 | ||||
|
56 | return | |||
49 |
|
57 | |||
50 | def changePauseIcon(self, paused=False): |
|
58 | def changePauseIcon(self, paused=False): | |
51 |
|
59 | |||
52 | if paused == True: |
|
60 | if paused == True: | |
53 |
icon_name = |
|
61 | icon_name = ICON_PAUSE_ENA | |
54 | else: |
|
62 | else: | |
55 |
icon_name = |
|
63 | icon_name = ICON_PAUSE | |
56 |
|
64 | |||
57 | iconPause = QtGui.QIcon() |
|
65 | iconPause = QtGui.QIcon() | |
58 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
66 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
59 | self.actionPauseToolbar.setIcon(iconPause) |
|
67 | self.actionPauseToolbar.setIcon(iconPause) | |
60 |
|
68 | |||
61 | return |
|
69 | return | |
62 |
|
70 | |||
63 |
def changeSt |
|
71 | def changeStopIcon(self, started=False): | |
64 |
|
72 | |||
65 | if started == True: |
|
73 | if started == True: | |
66 |
icon_name = |
|
74 | icon_name = ICON_STOP | |
67 | else: |
|
75 | else: | |
68 |
icon_name = |
|
76 | icon_name = ICON_STOP_DIS | |
69 |
|
77 | |||
70 |
iconSt |
|
78 | iconStop = QtGui.QIcon() | |
71 |
iconSt |
|
79 | iconStop.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
72 |
self.actionSt |
|
80 | self.actionStopToolbar.setIcon(iconStop) | |
73 |
|
81 | |||
74 | return |
|
82 | return | |
75 |
|
83 | |||
@@ -145,11 +153,11 class Ui_EnvWindow(object): | |||||
145 | iconSave = QtGui.QIcon() |
|
153 | iconSave = QtGui.QIcon() | |
146 | iconSave.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"save.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
154 | iconSave.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"save.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
147 | iconStart = QtGui.QIcon() |
|
155 | iconStart = QtGui.QIcon() | |
148 |
iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, |
|
156 | iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, ICON_START_DIS) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
149 | iconStop = QtGui.QIcon() |
|
157 | iconStop = QtGui.QIcon() | |
150 |
iconStop.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, |
|
158 | iconStop.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, ICON_STOP_DIS) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
151 | iconPause = QtGui.QIcon() |
|
159 | iconPause = QtGui.QIcon() | |
152 |
iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, |
|
160 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, ICON_PAUSE_DIS) )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
153 | iconAddPU = QtGui.QIcon() |
|
161 | iconAddPU = QtGui.QIcon() | |
154 | iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"branch.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
162 | iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"branch.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
155 | iconClose = QtGui.QIcon() |
|
163 | iconClose = QtGui.QIcon() |
General Comments 0
You need to be logged in to leave comments.
Login now