create a working MainWindow
This commit is contained in:
parent
ef8bd6572e
commit
9e7f20a9fb
11
QtPyLoT.py
11
QtPyLoT.py
@ -133,7 +133,6 @@ class MainWindow(QMainWindow):
|
|||||||
self.fileMenu.addAction(action)
|
self.fileMenu.addAction(action)
|
||||||
self.fileMenu.addSeparator()
|
self.fileMenu.addSeparator()
|
||||||
self.fileMenu.addAction(self.fileMenuActions[-1])
|
self.fileMenu.addAction(self.fileMenuActions[-1])
|
||||||
|
|
||||||
|
|
||||||
def loadData(self, fname=None):
|
def loadData(self, fname=None):
|
||||||
if fname is None:
|
if fname is None:
|
||||||
@ -179,9 +178,7 @@ class MainWindow(QMainWindow):
|
|||||||
statsButtons = layoutStationButtons(self.getData(), self.getComponent())
|
statsButtons = layoutStationButtons(self.getData(), self.getComponent())
|
||||||
_layout.addLayout(statsButtons)
|
_layout.addLayout(statsButtons)
|
||||||
_layout.addWidget(self.DataPlot)
|
_layout.addWidget(self.DataPlot)
|
||||||
self.setLayout(_layout)
|
|
||||||
self.setCentralWidget(_widget)
|
|
||||||
|
|
||||||
openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon)
|
openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon)
|
||||||
quitIcon = self.style().standardIcon(QStyle.SP_MediaStop)
|
quitIcon = self.style().standardIcon(QStyle.SP_MediaStop)
|
||||||
saveIcon = self.style().standardIcon(QStyle.SP_DriveHDIcon)
|
saveIcon = self.style().standardIcon(QStyle.SP_DriveHDIcon)
|
||||||
@ -235,6 +232,12 @@ class MainWindow(QMainWindow):
|
|||||||
status.addPermanentWidget(self.eventLabel)
|
status.addPermanentWidget(self.eventLabel)
|
||||||
status.showMessage("Ready", 500)
|
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):
|
def okToContinue(self):
|
||||||
if self.dirty:
|
if self.dirty:
|
||||||
return self.saveData()
|
return self.saveData()
|
||||||
|
@ -1 +1 @@
|
|||||||
9603-dirty
|
ef8b-dirty
|
||||||
|
@ -21,7 +21,7 @@ def layoutStationButtons(data, comp):
|
|||||||
stationButtons.append(QPushButton('%s'.format(stat)))
|
stationButtons.append(QPushButton('%s'.format(stat)))
|
||||||
except:
|
except:
|
||||||
for n in range(5):
|
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:
|
for button in stationButtons:
|
||||||
layout.addWidget(button)
|
layout.addWidget(button)
|
||||||
return layout
|
return layout
|
Loading…
Reference in New Issue
Block a user