@@ -57,7 +57,9 class ControllerThread(threading.Thread, Project): | |||||
57 | self.control['stop'] = False |
|
57 | self.control['stop'] = False | |
58 | self.control['pause'] = False |
|
58 | self.control['pause'] = False | |
59 |
|
59 | |||
60 |
self.re |
|
60 | if not self.writeXml(self.filename): | |
|
61 | return | |||
|
62 | ||||
61 | self.createObjects() |
|
63 | self.createObjects() | |
62 | self.connectObjects() |
|
64 | self.connectObjects() | |
63 | Project.run(self) |
|
65 | Project.run(self) |
@@ -2,19 +2,21 | |||||
2 | """ |
|
2 | """ | |
3 | Module implementing MainWindow. |
|
3 | Module implementing MainWindow. | |
4 | #+++++++++++++GUI V1++++++++++++++# |
|
4 | #+++++++++++++GUI V1++++++++++++++# | |
5 |
@author: AlexanderValdezPortocarrero |
|
5 | @author: AlexanderValdezPortocarrero | |
|
6 | ||||
|
7 | #+++++++++++++GUI V2++++++++++++++# | |||
|
8 | @author Miguel Urco | |||
6 | """ |
|
9 | """ | |
7 |
import os, sys |
|
10 | import os, sys | |
8 | import datetime |
|
11 | import datetime | |
9 | import numpy |
|
12 | import numpy | |
10 |
import |
|
13 | import ast | |
|
14 | ||||
|
15 | from Queue import Queue | |||
11 |
|
16 | |||
12 | from collections import OrderedDict |
|
17 | from collections import OrderedDict | |
13 | from os.path import expanduser |
|
18 | from os.path import expanduser | |
14 | from time import sleep |
|
19 | from time import sleep | |
15 | # from gevent import sleep |
|
|||
16 |
|
||||
17 | import ast |
|
|||
18 |
|
20 | |||
19 | from PyQt4.QtGui import QMainWindow |
|
21 | from PyQt4.QtGui import QMainWindow | |
20 | from PyQt4.QtCore import pyqtSignature |
|
22 | from PyQt4.QtCore import pyqtSignature | |
@@ -2405,7 +2407,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2405 | freq = False |
|
2407 | freq = False | |
2406 | height = False |
|
2408 | height = False | |
2407 | db = False |
|
2409 | db = False | |
2408 | time = False |
|
2410 | timerange = False | |
2409 | magnitud = False |
|
2411 | magnitud = False | |
2410 | phase = False |
|
2412 | phase = False | |
2411 | channelList = False |
|
2413 | channelList = False | |
@@ -2426,12 +2428,12 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2426 | if self.specGraphCebRTIplot.checkState(): |
|
2428 | if self.specGraphCebRTIplot.checkState(): | |
2427 | height = True |
|
2429 | height = True | |
2428 | db = True |
|
2430 | db = True | |
2429 | time = True |
|
2431 | timerange = True | |
2430 | channelList = True |
|
2432 | channelList = True | |
2431 |
|
2433 | |||
2432 | if self.specGraphCebCoherencmap.checkState(): |
|
2434 | if self.specGraphCebCoherencmap.checkState(): | |
2433 | height = True |
|
2435 | height = True | |
2434 | time = True |
|
2436 | timerange = True | |
2435 | magnitud = True |
|
2437 | magnitud = True | |
2436 | phase = True |
|
2438 | phase = True | |
2437 |
|
2439 | |||
@@ -2442,14 +2444,14 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2442 |
|
2444 | |||
2443 | if self.specGraphCebRTInoise.checkState(): |
|
2445 | if self.specGraphCebRTInoise.checkState(): | |
2444 | db = True |
|
2446 | db = True | |
2445 | time = True |
|
2447 | timerange = True | |
2446 | channelList = True |
|
2448 | channelList = True | |
2447 |
|
2449 | |||
2448 |
|
2450 | |||
2449 | self.specGgraphFreq.setEnabled(freq) |
|
2451 | self.specGgraphFreq.setEnabled(freq) | |
2450 | self.specGgraphHeight.setEnabled(height) |
|
2452 | self.specGgraphHeight.setEnabled(height) | |
2451 | self.specGgraphDbsrange.setEnabled(db) |
|
2453 | self.specGgraphDbsrange.setEnabled(db) | |
2452 | self.specGgraphTminTmax.setEnabled(time) |
|
2454 | self.specGgraphTminTmax.setEnabled(timerange) | |
2453 |
|
2455 | |||
2454 | self.specGgraphmagnitud.setEnabled(magnitud) |
|
2456 | self.specGgraphmagnitud.setEnabled(magnitud) | |
2455 | self.specGgraphPhase.setEnabled(phase) |
|
2457 | self.specGgraphPhase.setEnabled(phase) | |
@@ -4703,20 +4705,20 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4703 | filename = TEMPORAL_FILE |
|
4705 | filename = TEMPORAL_FILE | |
4704 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) |
|
4706 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) | |
4705 |
|
4707 | |||
4706 |
self.console. |
|
4708 | self.console.clear() | |
|
4709 | self.console.append("Please wait...") | |||
4707 |
|
4710 | |||
4708 | self.controllerThread = ControllerThread(filename) |
|
4711 | self.controllerThread = ControllerThread(filename) | |
4709 |
|
||||
4710 | # QObject.connect( self.controllerThread, SIGNAL( "jobFinished( PyQt_PyObject )" ), self.jobFinishedFromThread ) |
|
|||
4711 | # QObject.connect( self.controllerThread, SIGNAL( "jobStarted( PyQt_PyObject )" ), self.jobStartedFromThread ) |
|
|||
4712 | self.console.clear() |
|
|||
4713 | self.controllerThread.start() |
|
4712 | self.controllerThread.start() | |
|
4713 | ||||
4714 | sleep(0.5) |
|
4714 | sleep(0.5) | |
|
4715 | ||||
4715 | self.threadStarted = True |
|
4716 | self.threadStarted = True | |
4716 |
|
4717 | |||
4717 | self._disable_play_button() |
|
4718 | self._disable_play_button() | |
4718 | self._disable_save_button() |
|
4719 | self._disable_save_button() | |
4719 | self._enable_stop_button() |
|
4720 | self._enable_stop_button() | |
|
4721 | self.console.clear() | |||
4720 |
|
4722 | |||
4721 | def stopProject(self): |
|
4723 | def stopProject(self): | |
4722 |
|
4724 |
General Comments 0
You need to be logged in to leave comments.
Login now