From ed994e987f5aebe91ae5ea2f61dff3a676f9b544 Mon Sep 17 00:00:00 2001 From: marcel Date: Mon, 21 Aug 2017 16:07:57 +0200 Subject: [PATCH] [change] ComparisonDlg -> ComparisonWidget --- QtPyLoT.py | 6 +++--- pylot/core/util/widgets.py | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index d53e4906..e4e54691 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -79,7 +79,7 @@ from pylot.core.util.event import Event from pylot.core.io.location import create_creation_info, create_event from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \ WaveformWidget, WaveformWidgetPG, PropertiesDlg, HelpForm, createAction, PickDlg, \ - getDataType, ComparisonDialog, TuneAutopicker, PylotParaBox, AutoPickDlg + getDataType, ComparisonWidget, TuneAutopicker, PylotParaBox, AutoPickDlg from pylot.core.util.map_projection import map_projection from pylot.core.util.structure import DATASTRUCTURE from pylot.core.util.thread import Thread, Worker @@ -1220,8 +1220,8 @@ class MainWindow(QMainWindow): manupicks = excludeQualityClasses(self.getPicks('manual'), [4], self._inputs['timeerrorsP'], self._inputs['timeerrorsS']) co = Comparison(auto=autopicks, manu=manupicks) - compare_dlg = ComparisonDialog(co, self) - compare_dlg.exec_() + compare_dlg = ComparisonWidget(co, self) + compare_dlg.show() def getPlotWidget(self): return self.dataPlot diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 87978ea1..1a32fa12 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -119,7 +119,7 @@ def createAction(parent, text, slot=None, shortcut=None, icon=None, return action -class ComparisonDialog(QDialog): +class ComparisonWidget(QWidget): def __init__(self, c, parent=None): self._data = c self._stats = c.stations @@ -129,8 +129,9 @@ class ComparisonDialog(QDialog): histCheckBox=None) self._phases = 'PS' self._plotprops = dict(station=list(self.stations)[0], phase=list(self.phases)[0]) - super(ComparisonDialog, self).__init__(parent) + super(ComparisonWidget, self).__init__(parent, 1) self.setupUI() + self.resize(1280, 720) self.plotcomparison() def setupUI(self): @@ -162,17 +163,12 @@ class ComparisonDialog(QDialog): _toolbar.addWidget(_phases_combobox) _toolbar.addWidget(_hist_checkbox) - _buttonbox = QDialogButtonBox(QDialogButtonBox.Close) - _innerlayout.addWidget(self.canvas) - _innerlayout.addWidget(_buttonbox) _outerlayout.addWidget(_toolbar) _outerlayout.addLayout(_innerlayout) - _buttonbox.rejected.connect(self.reject) - - # finally layout the entire dialog + # finally layout the entire widget self.setLayout(_outerlayout) @property