pushbutton layout implemented (variable number of buttons according to the number of stations used)
This commit is contained in:
parent
d9ca0141de
commit
307e960d34
@ -107,7 +107,18 @@ class MainWindow(QMainWindow):
|
|||||||
def layoutStationButtons(self, numStations):
|
def layoutStationButtons(self, numStations):
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
for n in range(numStations):
|
for n in range(numStations):
|
||||||
stationButtons[n] = QPushButton('%s'.format(self.))
|
tr = data.select(component=self.dispOptions.comp)
|
||||||
|
try:
|
||||||
|
stationButtons[n] = QPushButton('%s'.format(
|
||||||
|
tr[n].stats.station))
|
||||||
|
except IndexError:
|
||||||
|
error = QErrorMessage(self)
|
||||||
|
errorString = QString()
|
||||||
|
errorString.setText('''Number of stations does not match number
|
||||||
|
of traces!''')
|
||||||
|
error.showMessage(errorString)
|
||||||
|
self.__del__()
|
||||||
|
layout.addWidget(stationButtons)
|
||||||
|
|
||||||
def helpHelp(self):
|
def helpHelp(self):
|
||||||
if internet_on():
|
if internet_on():
|
||||||
|
Loading…
Reference in New Issue
Block a user