make use of new module widgets, set a matplotlib figure the central GUI element

This commit is contained in:
Sebastian Wehling-Benatelli 2014-03-19 12:16:41 +01:00
parent e347e8eef9
commit fbbfcbcaea

View File

@ -12,6 +12,7 @@ import helpform
from pylot.core.util import _getVersionString
from pylot.core.read.inputs import FilterOptions
from pylot.core.util import FILTERDEFAULTS
from pylot.core.util import MPLWidget
# Version information
__version__ = _getVersionString()
@ -22,6 +23,10 @@ class MainWindow(QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
# create central matplotlib figure widget
dataPlot = setupPlot()
self.setCentralWidget(dataPlot)
filterOptionsP = FILTERDEFAULTS['P']
filterOptionsS = FILTERDEFAULTS['S']
self.filterOptionsP = FilterOptions(**filterOptionsP)
@ -32,7 +37,13 @@ class MainWindow(QMainWindow):
filterDockWidget = FilterOptionsDock(titleString="Filter Options",
parent=self,
filterOptions=filteroptions)
self.
def setupPlot(self):
# create a matplotlib widget
self.DataPlot = MPLWidget()
# create a layout inside the blank widget and add the matplotlib widget
layout = QtGui.QVBoxLayout(self.ui.widget_PlotArea)
layout.addWidget(self.DataPlot, 1)
class PickWindow(QDialog):
@ -65,8 +76,6 @@ class FilterOptionsDock(QDockWidget):
raise OptionsError('%s' % e)
class OptionsError(Exception):
pass