bugfixes, added fullscreen mode
This commit is contained in:
parent
30049baf94
commit
4c42e9ceb5
@ -64,11 +64,18 @@ class gui_control(object):
|
||||
QtCore.QObject.connect(self.mainUI.actionStart_FMTOMO_Simulation, QtCore.SIGNAL("triggered()"), self.startFMTOMO)
|
||||
QtCore.QObject.connect(self.mainUI.actionVTK_Visualization, QtCore.SIGNAL("triggered()"), self.startVTKtools)
|
||||
QtCore.QObject.connect(self.mainUI.actionExit, QtCore.SIGNAL("triggered()"), self.exitApp)
|
||||
QtCore.QObject.connect(self.mainUI.actionFullscreen, QtCore.SIGNAL("triggered()"), self.fullscreen)
|
||||
QtCore.QObject.connect(self.mainUI.comboBox_stats, QtCore.SIGNAL("activated(int)"), self.refreshPickedWidgets)
|
||||
QtCore.QObject.connect(self.mainUI.shot_left, QtCore.SIGNAL("clicked()"), self.decreaseShotnumber)
|
||||
QtCore.QObject.connect(self.mainUI.shot_right, QtCore.SIGNAL("clicked()"), self.increaseShotnumber)
|
||||
QtCore.QObject.connect(self.mainUI.plot_shot, QtCore.SIGNAL("clicked()"), self.plotShot)
|
||||
|
||||
def fullscreen(self):
|
||||
if self.mainUI.actionFullscreen.isChecked():
|
||||
MainWindow.showFullScreen()
|
||||
else:
|
||||
MainWindow.showNormal()
|
||||
|
||||
def gen_seisarray(self):
|
||||
disconnect = False
|
||||
if self.checkSeisArrayState():
|
||||
@ -104,6 +111,7 @@ class gui_control(object):
|
||||
self.gssa = Gen_Survey_from_SA(self.mainwindow, self.seisarray)
|
||||
else:
|
||||
self.gssa.start_dialog()
|
||||
self.update_seisarray(self.seisarray)
|
||||
if self.gssa.executed:
|
||||
self.survey = self.gssa.get_survey()
|
||||
self.initNewSurvey()
|
||||
@ -321,6 +329,7 @@ class gui_control(object):
|
||||
self.autopicker = Call_autopicker(self.mainwindow, self.survey)
|
||||
else:
|
||||
self.autopicker.start_dialog()
|
||||
self.autopicker.update_survey(self.survey)
|
||||
|
||||
if self.autopicker.executed:
|
||||
self.setPickState(True)
|
||||
@ -338,6 +347,7 @@ class gui_control(object):
|
||||
self.fmtomo = Call_FMTOMO(self.mainwindow, self.survey)
|
||||
else:
|
||||
self.fmtomo.start_dialog()
|
||||
self.fmtomo.update_survey(self.survey)
|
||||
|
||||
#if self.fmtomo.executed:
|
||||
|
||||
@ -544,7 +554,7 @@ if __name__ == "__main__":
|
||||
MainWindow = QtGui.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(MainWindow)
|
||||
MainWindow.show()
|
||||
MainWindow.showMaximized()
|
||||
gui = gui_control()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'asp3d_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -13,7 +13,7 @@ class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.setEnabled(True)
|
||||
MainWindow.resize(1029, 1074)
|
||||
MainWindow.resize(1280, 1024)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
@ -273,7 +273,7 @@ class Ui_MainWindow(object):
|
||||
self.gridLayout.addLayout(self.formLayout, 0, 0, 1, 1)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1029, 23))
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 23))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menuFile = QtGui.QMenu(self.menubar)
|
||||
self.menuFile.setObjectName("menuFile")
|
||||
@ -287,6 +287,8 @@ class Ui_MainWindow(object):
|
||||
self.menuSimulation.setObjectName("menuSimulation")
|
||||
self.menuTools = QtGui.QMenu(self.menubar)
|
||||
self.menuTools.setObjectName("menuTools")
|
||||
self.menuView = QtGui.QMenu(self.menubar)
|
||||
self.menuView.setObjectName("menuView")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
@ -321,6 +323,9 @@ class Ui_MainWindow(object):
|
||||
self.actionSeismic_Array = QtGui.QAction(MainWindow)
|
||||
self.actionSeismic_Array.setEnabled(False)
|
||||
self.actionSeismic_Array.setObjectName("actionSeismic_Array")
|
||||
self.actionFullscreen = QtGui.QAction(MainWindow)
|
||||
self.actionFullscreen.setCheckable(True)
|
||||
self.actionFullscreen.setObjectName("actionFullscreen")
|
||||
self.menuFile.addSeparator()
|
||||
self.menuFile.addAction(self.actionExit)
|
||||
self.menuSeismic_Array.addAction(self.actionGenerate_new_Seismic_Array)
|
||||
@ -336,12 +341,14 @@ class Ui_MainWindow(object):
|
||||
self.menuPicking.addAction(self.actionPostprocessing)
|
||||
self.menuSimulation.addAction(self.actionStart_FMTOMO_Simulation)
|
||||
self.menuTools.addAction(self.actionVTK_Visualization)
|
||||
self.menuView.addAction(self.actionFullscreen)
|
||||
self.menubar.addAction(self.menuFile.menuAction())
|
||||
self.menubar.addAction(self.menuSurvey.menuAction())
|
||||
self.menubar.addAction(self.menuSeismic_Array.menuAction())
|
||||
self.menubar.addAction(self.menuPicking.menuAction())
|
||||
self.menubar.addAction(self.menuSimulation.menuAction())
|
||||
self.menubar.addAction(self.menuTools.menuAction())
|
||||
self.menubar.addAction(self.menuView.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
@ -365,6 +372,7 @@ class Ui_MainWindow(object):
|
||||
self.menuPicking.setTitle(QtGui.QApplication.translate("MainWindow", "Picking", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.menuSimulation.setTitle(QtGui.QApplication.translate("MainWindow", "Inversion", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.menuTools.setTitle(QtGui.QApplication.translate("MainWindow", "Tools", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.menuView.setTitle(QtGui.QApplication.translate("MainWindow", "View", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionLoad_Seismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Load Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionSave_Seismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Save Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionLoad_Survey.setText(QtGui.QApplication.translate("MainWindow", "Load Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||
@ -379,4 +387,5 @@ class Ui_MainWindow(object):
|
||||
self.actionStart_FMTOMO_Simulation.setText(QtGui.QApplication.translate("MainWindow", "Start FMTOMO Simulation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionVTK_Visualization.setText(QtGui.QApplication.translate("MainWindow", "VTK Visualization", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionSeismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionFullscreen.setText(QtGui.QApplication.translate("MainWindow", "Fullscreen", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'fmtomo_parameters_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'generate_seisarray_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'generate_survey_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'generate_survey_layout_minimal.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'picking_parameters_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'vtk_tools_layout.ui'
|
||||
#
|
||||
# Created: Thu Aug 4 12:07:57 2016
|
||||
# Created: Thu Aug 4 13:55:47 2016
|
||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -134,6 +134,9 @@ class Gen_Survey_from_SA(object):
|
||||
self.refresh_selection()
|
||||
self.executed = False
|
||||
|
||||
def update_seisarray(self, seisarray):
|
||||
self.seisarray = seisarray
|
||||
|
||||
def refresh_selection(self):
|
||||
self.obsdir = self.ui.lineEdit_obs.text()
|
||||
self.fstart = self.ui.fstart.text()
|
||||
@ -238,6 +241,9 @@ class Call_autopicker(object):
|
||||
SRdists.append(shot.getDistance(traceID))
|
||||
self.maxSRdist = max(SRdists)
|
||||
return self.maxSRdist
|
||||
|
||||
def update_survey(self, survey):
|
||||
self.survey = survey
|
||||
|
||||
def initSNRplot(self):
|
||||
self.snrFig = Figure()
|
||||
@ -260,12 +266,15 @@ class Call_autopicker(object):
|
||||
if not refresh:
|
||||
self.plotPicks(ax)
|
||||
else:
|
||||
for line in self.lines:
|
||||
line.remove()
|
||||
self.lines = []
|
||||
self.clear_lines()
|
||||
|
||||
return fig, ax, xlim, ylim
|
||||
|
||||
def clear_lines(self):
|
||||
for line in self.lines:
|
||||
line.remove()
|
||||
self.lines = []
|
||||
|
||||
def finishFigure(self, ax, xlim, ylim):
|
||||
ax.set_xlim(xlim)
|
||||
ax.set_ylim(ylim)
|
||||
@ -297,7 +306,9 @@ class Call_autopicker(object):
|
||||
if refresh == False:
|
||||
xlim, ylim = self.finishNewFigure(ax)
|
||||
|
||||
self.finishFigure(ax, xlim, ylim)
|
||||
if self.survey.picked:
|
||||
self.finishFigure(ax, xlim, ylim)
|
||||
|
||||
self.snrCanvas.draw()
|
||||
|
||||
def plotDynSNR(self, refresh = True):
|
||||
@ -317,7 +328,9 @@ class Call_autopicker(object):
|
||||
if refresh == False:
|
||||
xlim, ylim = self.finishNewFigure(ax)
|
||||
|
||||
self.finishFigure(ax, xlim, ylim)
|
||||
if self.survey.picked:
|
||||
self.finishFigure(ax, xlim, ylim)
|
||||
|
||||
self.snrCanvas.draw()
|
||||
|
||||
def plotSNR(self, refresh = True):
|
||||
@ -363,9 +376,11 @@ class Call_autopicker(object):
|
||||
|
||||
#QtGui.qApp.processEvents() # test
|
||||
self.executed = True
|
||||
self.clear_lines()
|
||||
else:
|
||||
self.refresh_selection()
|
||||
self.executed = False
|
||||
self.clear_lines()
|
||||
|
||||
def refreshFolm(self):
|
||||
self.ui.label_folm.setText('%s %%'%self.ui.slider_folm.value())
|
||||
@ -446,6 +461,9 @@ class Call_FMTOMO(object):
|
||||
self.refresh_selection()
|
||||
self.executed = False
|
||||
|
||||
def update_survey(self, survey):
|
||||
self.survey = survey
|
||||
|
||||
def refresh_selection(self):
|
||||
self.fmtomo_dir = self.ui.fmtomo_dir.text()
|
||||
self.nIter = int(self.ui.nIter.value())
|
||||
|
Loading…
Reference in New Issue
Block a user