##// END OF EJS Templates
GUI: Every icon were resized
Miguel Valdez -
r667:e6e33e90d008
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: file renamed from schainpy/gui/figures/startServer.png to schainpy/gui/figures/start.png
1 NO CONTENT: file renamed from schainpy/gui/figures/stopServer.png to schainpy/gui/figures/stop.png
@@ -140,7 +140,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
140 140 self.__operationObjDict = {}
141 141
142 142 self.__puLocalFolder2FTP = {}
143 self.__enable = False
143 self.threadStarted = False
144 144
145 145 # self.create_comm()
146 146 self.create_updating_timer()
@@ -792,12 +792,14 class BasicWindow(QMainWindow, Ui_BasicWindow):
792 792 return 0
793 793
794 794 valueList = value.split(',')
795 format = 'float'
795
796 796 if self.volOpComHeights.currentIndex() == 0:
797 format = 'float'
797 798 name_operation = 'selectHeights'
798 799 name_parameter1 = 'minHei'
799 800 name_parameter2 = 'maxHei'
800 801 else:
802 format = 'int'
801 803 name_operation = 'selectHeightsByIndex'
802 804 name_parameter1 = 'minIndex'
803 805 name_parameter2 = 'maxIndex'
@@ -929,7 +931,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
929 931 return 0
930 932
931 933 name_parameter = 'n'
932 format = 'float'
934 format = 'int'
933 935
934 936 opObj = puObj.addOperation(name=name_operation, optype=optype)
935 937
@@ -1303,7 +1305,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
1303 1305 format = 'float'
1304 1306 else:
1305 1307 name_parameter = 'n'
1306 format = 'float'
1308 format = 'int'
1307 1309
1308 1310 value = str(self.specOpIncoherent.text())
1309 1311
@@ -2744,10 +2746,8 class BasicWindow(QMainWindow, Ui_BasicWindow):
2744 2746 self.volOpHeights.clear()
2745 2747 self.volOpCebHeights.setCheckState(0)
2746 2748 else:
2747 value1 = int(opObj.getParameterValue(parameterName='minHei'))
2748 value1 = str(value1)
2749 value2 = int(opObj.getParameterValue(parameterName='maxHei'))
2750 value2 = str(value2)
2749 value1 = str(opObj.getParameterValue(parameterName='minHei'))
2750 value2 = str(opObj.getParameterValue(parameterName='maxHei'))
2751 2751 value = value1 + "," + value2
2752 2752 self.volOpHeights.setText(value)
2753 2753 self.volOpHeights.setEnabled(True)
@@ -4236,10 +4236,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
4236 4236
4237 4237 def updateProcUnitView(self, id):
4238 4238
4239 procUnitConfObj = projectObjView.getProcUnitObj(id)
4240 procUnitConfObj.removeOperations()
4241
4242 return procUnitConfObj
4239 pass
4243 4240
4244 4241 def addPUWindow(self):
4245 4242
@@ -4709,21 +4706,12 class BasicWindow(QMainWindow, Ui_BasicWindow):
4709 4706 def on_comm_updating_timer(self):
4710 4707 # Verifica si algun proceso ha sido inicializado y sigue ejecutandose
4711 4708 # Si el proceso se ha parado actualizar el GUI (stopProject)
4712 if not self.__enable:
4709 if not self.threadStarted:
4713 4710 return
4714 4711
4715 4712 if self.controllerThread.isFinished():
4716 4713 self.stopProject()
4717 4714
4718 # def jobStartedFromThread(self, success):
4719 #
4720 # self.console.clear()
4721 # self.console.append("Job started")
4722 #
4723 # def jobFinishedFromThread(self, success):
4724 #
4725 # self.stopProject()
4726
4727 4715 def playProject(self, ext=".xml", save=1):
4728 4716
4729 4717 projectObj = self.getSelectedProjectObj()
@@ -4758,14 +4746,15 class BasicWindow(QMainWindow, Ui_BasicWindow):
4758 4746 self.console.clear()
4759 4747 self.controllerThread.start()
4760 4748 sleep(0.5)
4761 self.__enable = True
4749 self.threadStarted = True
4762 4750
4763 def stopProject(self):
4751 self.changeStartIcon(started=True)
4764 4752
4765 self.__enable = False
4753 def stopProject(self):
4766 4754
4767 4755 # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.STOP, True))
4768 4756 self.controllerThread.stop()
4757 self.threadStarted = False
4769 4758
4770 4759 while self.controllerThread.isRunning():
4771 4760 sleep(0.5)
@@ -4779,11 +4768,12 class BasicWindow(QMainWindow, Ui_BasicWindow):
4779 4768 self.actionStopToolbar.setEnabled(False)
4780 4769
4781 4770 self.restorePauseIcon()
4771 self.restoreStartIcon()
4782 4772
4783 4773 def pauseProject(self):
4784 4774
4785 4775 # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True))
4786 self.controllerThread.pause()
4776 paused = self.controllerThread.pause()
4787 4777
4788 4778 self.actionStart.setEnabled(False)
4789 4779 self.actionPause.setEnabled(True)
@@ -4792,6 +4782,8 class BasicWindow(QMainWindow, Ui_BasicWindow):
4792 4782 self.actionStarToolbar.setEnabled(False)
4793 4783 self.actionPauseToolbar.setEnabled(True)
4794 4784 self.actionStopToolbar.setEnabled(True)
4785
4786 self.changePauseIcon(paused)
4795 4787
4796 4788 def saveProject(self, filename=None):
4797 4789
@@ -5356,7 +5348,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
5356 5348 def setGUIStatus(self):
5357 5349
5358 5350 self.setWindowTitle("ROJ-Signal Chain")
5359 self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"adn.jpg") ))
5351 self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"logo.png") ))
5360 5352
5361 5353 self.tabWidgetProject.setEnabled(False)
5362 5354 self.tabVoltage.setEnabled(False)
@@ -35,28 +35,44 class Ui_EnvWindow(object):
35 35
36 36 def restorePauseIcon(self):
37 37
38 iconPause = QtGui.QIcon()
39 iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"pause.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
40 self.actionPauseToolbar.setIcon(iconPause)
41
42 self.paused = False
43
44 def changePauseIcon(self):
45
46 if self.paused == False:
47 iconPauseRed = QtGui.QIcon()
48 iconPauseRed.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"pausered.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
49 self.actionPauseToolbar.setIcon(iconPauseRed)
50 self.paused = True
51 return 0
52
53 if self.paused:
54 iconPause = QtGui.QIcon()
55 iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"pause.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
56 self.actionPauseToolbar.setIcon(iconPause)
57 self.paused = False
58 return 0
59
38 icon_name = "pause.png"
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
45 icon_name = "start.png"
46 iconStart = QtGui.QIcon()
47 iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
48 self.actionStarToolbar.setIcon(iconStart)
49
50 def changePauseIcon(self, paused=False):
51
52 if paused == True:
53 icon_name = "pausered.png"
54 else:
55 icon_name = "pause.png"
56
57 iconPause = QtGui.QIcon()
58 iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
59 self.actionPauseToolbar.setIcon(iconPause)
60
61 return
62
63 def changeStartIcon(self, started=False):
64
65 if started == True:
66 icon_name = "startred.png"
67 else:
68 icon_name = "start.png"
69
70 iconStart = QtGui.QIcon()
71 iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH, icon_name) )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
72 self.actionStarToolbar.setIcon(iconStart)
73
74 return
75
60 76 def setupUi(self, MainWindow):
61 77
62 78 self.paused=False
@@ -123,19 +139,22 class Ui_EnvWindow(object):
123 139 MainWindow.setMenuBar(self.menuBar)
124 140
125 141 iconOpen = QtGui.QIcon()
126 iconOpen.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"open.gif") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
142 iconOpen.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"open.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
127 143 iconCreate = QtGui.QIcon()
128 iconCreate.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"project.gif") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
144 iconCreate.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"new.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
129 145 iconSave = QtGui.QIcon()
130 iconSave.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"saveicon.jpeg") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
146 iconSave.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"save.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
131 147 iconStart = QtGui.QIcon()
132 iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"startServer.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
148 iconStart.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"start.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
133 149 iconStop = QtGui.QIcon()
134 iconStop.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"stopServer.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
150 iconStop.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"stop.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
135 151 iconPause = QtGui.QIcon()
136 152 iconPause.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"pause.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
137 153 iconAddPU = QtGui.QIcon()
138 iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"add_PU.gif") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
154 iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"branch.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
155 iconClose = QtGui.QIcon()
156 iconClose.addPixmap(QtGui.QPixmap(_fromUtf8( os.path.join(FIGURES_PATH,"close.png") )), QtGui.QIcon.Normal, QtGui.QIcon.Off)
157
139 158
140 159 self.actionOpen = QtGui.QAction(MainWindow)
141 160 self.actionOpen.setIcon(iconOpen)
@@ -147,6 +166,7 class Ui_EnvWindow(object):
147 166 self.actionSave.setIcon(iconSave)
148 167 self.actionSave.setObjectName(_fromUtf8("actionSave"))
149 168 self.actionClose = QtGui.QAction(MainWindow)
169 self.actionClose.setIcon(iconClose)
150 170 self.actionClose.setObjectName(_fromUtf8("actionClose"))
151 171 self.actionStart = QtGui.QAction(MainWindow)
152 172 self.actionStart.setIcon(iconStart)
@@ -199,8 +219,8 class Ui_EnvWindow(object):
199 219 self.toolBar.addAction(self.actionStopToolbar)
200 220 self.toolBar.addSeparator()
201 221
202 self.actionPause.triggered.connect(self.changePauseIcon)
203 self.actionPauseToolbar.triggered.connect(self.changePauseIcon)
222 # self.actionPause.triggered.connect(self.changePauseIcon)
223 # self.actionPauseToolbar.triggered.connect(self.changePauseIcon)
204 224
205 225 self.menuProject.addAction(self.actionOpen)
206 226 self.menuProject.addAction(self.actionCreate)
@@ -265,12 +285,14 class Ui_EnvWindow(object):
265 285 event.ignore()
266 286
267 287 def aboutEvent(self):
288 title = "Signal Chain Processing Software v%s" %__version__
289 message = """
290 Developed by Jicamarca Radio Observatory
291 Any comment to miguel.urco@jro.igp.gob.pe
292 """
268 293
269 reply = QtGui.QMessageBox.information(self,
270 'About',
271 "Signal Chain Processing Software v%s" %__version__,
272 "Developed by Jicamarca Radio Observatory\nComments to miguel.urco@jro.igp.gob.pe")
273
294 QtGui.QMessageBox.about(self, title, message)
295
274 296
275 297 class Ui_BasicWindow(Ui_EnvWindow, Ui_ProjectTab, Ui_VoltageTab, Ui_SpectraTab, Ui_SpectraHeisTab, Ui_CorrelationTab):
276 298
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now