source: sasview/src/sas/qtgui/Plotting/MaskEditor.py @ 83eb5208

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 83eb5208 was 83eb5208, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

Putting files in more ordered fashion

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