[change] layout of sub-parameters of PylotParameter changed back to vertical alignment to save horizontal space in tuneautopick window

This commit is contained in:
Marcel Paffrath 2017-07-12 16:49:11 +02:00
parent aa6f4324d0
commit 721874dbb7
2 changed files with 15 additions and 11 deletions

View File

@ -114,7 +114,7 @@ defaults = {'rootpath': {'type': str,
'bpz2': {'type': (float, float), 'bpz2': {'type': (float, float),
'tooltip': 'lower/upper corner freq. of second band pass filter Z-comp. [Hz]', 'tooltip': 'lower/upper corner freq. of second band pass filter Z-comp. [Hz]',
'value': (2, 30), 'value': (2, 30),
'namestring': ('Z-bandpass 2', '', '')}, 'namestring': ('Z-bandpass 2', 'Lower', 'Upper')},
'bph1': {'type': (float, float), 'bph1': {'type': (float, float),
'tooltip': 'lower/upper corner freq. of first band pass filter H-comp. [Hz]', 'tooltip': 'lower/upper corner freq. of first band pass filter H-comp. [Hz]',
@ -124,7 +124,7 @@ defaults = {'rootpath': {'type': str,
'bph2': {'type': (float, float), 'bph2': {'type': (float, float),
'tooltip': 'lower/upper corner freq. of second band pass filter z-comp. [Hz]', 'tooltip': 'lower/upper corner freq. of second band pass filter z-comp. [Hz]',
'value': (2, 20), 'value': (2, 20),
'namestring': ('H-bandpass 2', '', '')}, 'namestring': ('H-bandpass 2', 'Lower', 'Upper')},
'algoP': {'type': str, 'algoP': {'type': str,
'tooltip': 'choose algorithm for P-onset determination (HOS, ARZ, or AR3)', 'tooltip': 'choose algorithm for P-onset determination (HOS, ARZ, or AR3)',
@ -366,17 +366,17 @@ defaults = {'rootpath': {'type': str,
'maxfreq': {'type': (float, float), 'maxfreq': {'type': (float, float),
'tooltip': 'Upper filter frequency [P, S]', 'tooltip': 'Upper filter frequency [P, S]',
'value': (10.0, 10.0), 'value': (10.0, 10.0),
'namestring': ('Upper freq.', '', '')}, 'namestring': ('Upper freq.', 'P', 'S')},
'filter_order': {'type': (int, int), 'filter_order': {'type': (int, int),
'tooltip': 'filter order [P, S]', 'tooltip': 'filter order [P, S]',
'value': (2, 2), 'value': (2, 2),
'namestring': ('Order', '', '')}, 'namestring': ('Order', 'P', 'S')},
'filter_type': {'type': (str, str), 'filter_type': {'type': (str, str),
'tooltip': 'filter type (bandpass, bandstop, lowpass, highpass) [P, S]', 'tooltip': 'filter type (bandpass, bandstop, lowpass, highpass) [P, S]',
'value': ('bandpass' , 'bandpass'), 'value': ('bandpass' , 'bandpass'),
'namestring': ('Type', '', '')} 'namestring': ('Type', 'P', 'S')}
} }
settings_main={ settings_main={

View File

@ -1804,6 +1804,10 @@ class TuneAutopicker(QWidget):
self.add_log() self.add_log()
self.set_stretch() self.set_stretch()
self.resize(1280, 720) self.resize(1280, 720)
if hasattr(parent, 'metadata'):
self.metadata = self.parent.metadata
else:
self.metadata = None
#self.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal) #self.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
#self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint) #self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
@ -2148,7 +2152,7 @@ class TuneAutopicker(QWidget):
return parameters return parameters
def set_stretch(self): def set_stretch(self):
self.tune_layout.setStretch(0, 2) self.tune_layout.setStretch(0, 3)
self.tune_layout.setStretch(1, 1) self.tune_layout.setStretch(1, 1)
def clear_all(self): def clear_all(self):
@ -2330,17 +2334,17 @@ class PylotParaBox(QtGui.QWidget):
def create_multi_box(self, boxes, headline=None): def create_multi_box(self, boxes, headline=None):
box = QtGui.QWidget() box = QtGui.QWidget()
gl = QtGui.QGridLayout() gl = QtGui.QGridLayout()
row = 0 column = 0
if headline: if headline:
for index, item in enumerate(headline): for index, item in enumerate(headline):
if not item: if not item:
continue continue
gl.addWidget(QtGui.QLabel(item), 0, index, 4) gl.addWidget(QtGui.QLabel(item), index, 0, 2)
row = 1 column = 1
for index, b in enumerate(boxes): for index, b in enumerate(boxes):
gl.addWidget(b, row, index) gl.addWidget(b, index, column)
box.setLayout(gl) box.setLayout(gl)
return box, row return box, column
def add_tab(self, layout, name): def add_tab(self, layout, name):
widget = QtGui.QWidget() widget = QtGui.QWidget()