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 c6fb57c 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
|
Line | |
---|
1 | from PyQt5 import QtCore |
---|
2 | from PyQt5 import QtGui |
---|
3 | from PyQt5 import QtWidgets |
---|
4 | |
---|
5 | from sas.qtgui.Plotting.PlotterData import Data2D |
---|
6 | |
---|
7 | # Local UI |
---|
8 | from sas.qtgui.UI import main_resources_rc |
---|
9 | from sas.qtgui.Plotting.UI.MaskEditorUI import Ui_MaskEditorUI |
---|
10 | from sas.qtgui.Plotting.Plotter2D import Plotter2DWidget |
---|
11 | |
---|
12 | class MaskEditor(QtWidgets.QDialog, Ui_MaskEditorUI): |
---|
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 | |
---|
27 | layout = QtWidgets.QHBoxLayout() |
---|
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.