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 116260a was
416fa8f,
checked in by Piotr Rozyczko <rozyczko@…>, 8 years ago
|
Initial implementation of the mask editor.
Refactored plotter base to QDialog and reimplemented as local widgets.
Fixed some unit tests.
|
-
Property mode set to
100755
|
File size:
824 bytes
|
Line | |
---|
1 | from PyQt4 import QtGui |
---|
2 | |
---|
3 | from sas.sasgui.guiframe.dataFitting import Data2D |
---|
4 | |
---|
5 | # Local UI |
---|
6 | from sas.qtgui.UI.MaskEditorUI import Ui_MaskEditorUI |
---|
7 | from sas.qtgui.Plotter2D import Plotter2DWidget |
---|
8 | |
---|
9 | class 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.