ESS_GUIESS_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 a7d6a32 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
|
Rev | Line | |
---|
[4992ff2] | 1 | from PyQt5 import QtCore |
---|
| 2 | from PyQt5 import QtGui |
---|
| 3 | from PyQt5 import QtWidgets |
---|
[416fa8f] | 4 | |
---|
[dc5ef15] | 5 | from sas.qtgui.Plotting.PlotterData import Data2D |
---|
[416fa8f] | 6 | |
---|
| 7 | # Local UI |
---|
[cd2cc745] | 8 | from sas.qtgui.UI import main_resources_rc |
---|
[83eb5208] | 9 | from sas.qtgui.Plotting.UI.MaskEditorUI import Ui_MaskEditorUI |
---|
| 10 | from sas.qtgui.Plotting.Plotter2D import Plotter2DWidget |
---|
[416fa8f] | 11 | |
---|
[4992ff2] | 12 | class 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.