Compare commits
2 Commits
9036a9054e
...
c254ee09b3
Author | SHA1 | Date | |
---|---|---|---|
c254ee09b3 | |||
be32f4f61d |
8
PyLoT.py
8
PyLoT.py
@ -505,6 +505,8 @@ class MainWindow(QMainWindow):
|
||||
"""Show either the documentation
|
||||
homepage (internet connection available),
|
||||
or shipped documentation files.""")
|
||||
logAction = self.createAction(self, "&Show Log", self.showLogWidget,
|
||||
tip="""Display Log""")
|
||||
|
||||
# create button group for component selection
|
||||
|
||||
@ -604,7 +606,7 @@ class MainWindow(QMainWindow):
|
||||
autoPickActions = (self.auto_pick, self.auto_pick_local, self.auto_pick_sge)
|
||||
|
||||
self.helpMenu = self.menuBar().addMenu('&Help')
|
||||
helpActions = (helpAction,)
|
||||
helpActions = (helpAction,logAction)
|
||||
|
||||
fileToolActions = (self.newProjectAction,
|
||||
self.openProjectAction, self.saveProjectAction,
|
||||
@ -771,6 +773,10 @@ class MainWindow(QMainWindow):
|
||||
self.ref_event_button.setEnabled(False)
|
||||
self.test_event_button.setEnabled(False)
|
||||
|
||||
def showLogWidget(self):
|
||||
self.logwidget.show()
|
||||
self.logwidget.activateWindow()
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if event.key() == QtCore.Qt.Key.Key_Control:
|
||||
self._ctrl = True
|
||||
|
@ -131,6 +131,7 @@ class LogWidget(QtWidgets.QWidget):
|
||||
def reset_error(self):
|
||||
# used to make sure that write errors is finished before raising new Message box etc.
|
||||
self.current_active_error = False
|
||||
self.stderr.append(60*'#' + '\n\n')
|
||||
|
||||
|
||||
def getDataType(parent):
|
||||
@ -199,8 +200,8 @@ class ProgressBarWidget(QtWidgets.QWidget):
|
||||
|
||||
|
||||
class AddMetadataWidget(QWidget):
|
||||
def __init__(self, parent=None, metadata=None, windowflag=1):
|
||||
super(AddMetadataWidget, self).__init__(parent, Qt.Window)
|
||||
def __init__(self, parent=None, metadata=None, windowflag=Qt.Window):
|
||||
super(AddMetadataWidget, self).__init__(parent, windowflag)
|
||||
self.inventories_add = []
|
||||
self.inventories_delete = []
|
||||
|
||||
@ -400,7 +401,7 @@ class AddMetadataWidget(QWidget):
|
||||
|
||||
|
||||
class ComparisonWidget(QWidget):
|
||||
def __init__(self, c, parent=None, windowflag=1):
|
||||
def __init__(self, c, parent=None, windowflag=Qt.Window):
|
||||
self._data = c
|
||||
self._stats = c.stations
|
||||
self._canvas = PlotWidget(self)
|
||||
@ -3157,7 +3158,7 @@ class MultiEventWidget(QWidget):
|
||||
|
||||
'''
|
||||
|
||||
def __init__(self, options=None, parent=None, windowflag=1):
|
||||
def __init__(self, options=None, parent=None, windowflag=Qt.Window):
|
||||
QtWidgets.QWidget.__init__(self, parent, windowflag)
|
||||
|
||||
self.options = options
|
||||
@ -3364,7 +3365,7 @@ class CompareEventsWidget(MultiEventWidget):
|
||||
'''
|
||||
|
||||
def __init__(self, parent, options, eventdict, comparisons):
|
||||
MultiEventWidget.__init__(self, options, parent, 1)
|
||||
MultiEventWidget.__init__(self, options, parent, Qt.Window)
|
||||
self.eventdict = eventdict
|
||||
self.comparisons = comparisons
|
||||
self.compare_widget = QtWidgets.QWidget()
|
||||
@ -3409,10 +3410,10 @@ class CompareEventsWidget(MultiEventWidget):
|
||||
self.eventbox.clear()
|
||||
self.fill_eventbox()
|
||||
|
||||
def update_comparison(self, index=0):
|
||||
def update_comparison(self):
|
||||
self.compare_widget.setParent(None)
|
||||
self.compare_widget = ComparisonWidget(
|
||||
self.comparisons[self.eventbox.currentText()], self, 0)
|
||||
self.comparisons[self.eventbox.currentText()], self, Qt.Widget)
|
||||
self.event_layout.insertWidget(1, self.compare_widget)
|
||||
self.set_main_stretch()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user