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 3c8242c was
dc5ef15,
checked in by Piotr Rozyczko <rozyczko@…>, 8 years ago
|
Removed qtgui dependency on sasgui and wx SASVIEW-590
|
-
Property mode set to
100644
|
File size:
884 bytes
|
Line | |
---|
1 | from PyQt4 import QtGui |
---|
2 | |
---|
3 | from sas.qtgui.Plotting.PlotterData import Data2D |
---|
4 | |
---|
5 | # Local UI |
---|
6 | from sas.qtgui.UI import main_resources_rc |
---|
7 | from sas.qtgui.Plotting.UI.MaskEditorUI import Ui_MaskEditorUI |
---|
8 | from sas.qtgui.Plotting.Plotter2D import Plotter2DWidget |
---|
9 | |
---|
10 | class MaskEditor(QtGui.QDialog, Ui_MaskEditorUI): |
---|
11 | def __init__(self, parent=None, data=None): |
---|
12 | super(MaskEditor, self).__init__() |
---|
13 | |
---|
14 | assert(isinstance(data, Data2D)) |
---|
15 | |
---|
16 | self.setupUi(self) |
---|
17 | |
---|
18 | self.data = data |
---|
19 | filename = data.name |
---|
20 | self.setWindowTitle("Mask Editor for %s" % filename) |
---|
21 | |
---|
22 | self.plotter = Plotter2DWidget(self, manager=parent, quickplot=True) |
---|
23 | self.plotter.data = self.data |
---|
24 | |
---|
25 | layout = QtGui.QHBoxLayout() |
---|
26 | layout.setContentsMargins(0, 0, 0, 0) |
---|
27 | self.frame.setLayout(layout) |
---|
28 | layout.addWidget(self.plotter) |
---|
29 | |
---|
30 | self.plotter.plot() |
---|
31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.