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

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

Initial, in-progress version. Not really working atm. SASVIEW-787

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