create a working MainWindow

This commit is contained in:
Sebastian Wehling-Benatelli 2014-12-08 11:38:24 +01:00
parent ef8bd6572e
commit 9e7f20a9fb
3 changed files with 9 additions and 6 deletions

View File

@ -134,7 +134,6 @@ class MainWindow(QMainWindow):
self.fileMenu.addSeparator()
self.fileMenu.addAction(self.fileMenuActions[-1])
def loadData(self, fname=None):
if fname is None:
action = self.sender()
@ -179,8 +178,6 @@ class MainWindow(QMainWindow):
statsButtons = layoutStationButtons(self.getData(), self.getComponent())
_layout.addLayout(statsButtons)
_layout.addWidget(self.DataPlot)
self.setLayout(_layout)
self.setCentralWidget(_widget)
openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon)
quitIcon = self.style().standardIcon(QStyle.SP_MediaStop)
@ -235,6 +232,12 @@ class MainWindow(QMainWindow):
status.addPermanentWidget(self.eventLabel)
status.showMessage("Ready", 500)
statsButtons = layoutStationButtons(self.getData(), self.getComponent())
_layout.addLayout(statsButtons)
_layout.addWidget(self.DataPlot)
_widget.setLayout(_layout)
self.setCentralWidget(_widget)
def okToContinue(self):
if self.dirty:
return self.saveData()

View File

@ -1 +1 @@
9603-dirty
ef8b-dirty

View File

@ -21,7 +21,7 @@ def layoutStationButtons(data, comp):
stationButtons.append(QPushButton('%s'.format(stat)))
except:
for n in range(5):
stationButtons.append(QPushButton('ST%02d'.format(n)))
stationButtons.append(QPushButton('ST{0:02d}'.format(n+1)))
for button in stationButtons:
layout.addWidget(button)
return layout