source: sasview/src/sas/qtgui/Plotting/MaskEditor.py @ 464cd07

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since 464cd07 was dc5ef15, checked in by Piotr Rozyczko <rozyczko@…>, 8 years ago

Removed qtgui dependency on sasgui and wx SASVIEW-590

  • Property mode set to 100644
File size: 884 bytes
Line 
1from PyQt4 import QtGui
2
3from sas.qtgui.Plotting.PlotterData import Data2D
4
5# Local UI
6from sas.qtgui.UI import main_resources_rc
7from sas.qtgui.Plotting.UI.MaskEditorUI import Ui_MaskEditorUI
8from sas.qtgui.Plotting.Plotter2D import Plotter2DWidget
9
10class MaskEditor(QtGui.QDialog, Ui_MaskEditorUI):
11    def __init__(self, parent=None, data=None):
12        super(MaskEditor, self).__init__()
13
14        assert(isinstance(data, Data2D))
15
16        self.setupUi(self)
17
18        self.data = data
19        filename = data.name
20        self.setWindowTitle("Mask Editor for %s" % filename)
21
22        self.plotter = Plotter2DWidget(self, manager=parent, quickplot=True)
23        self.plotter.data = self.data
24
25        layout = QtGui.QHBoxLayout()
26        layout.setContentsMargins(0, 0, 0, 0)
27        self.frame.setLayout(layout)
28        layout.addWidget(self.plotter)
29
30        self.plotter.plot()
31
Note: See TracBrowser for help on using the repository browser.