1 | # -*- coding: utf-8 -*- |
---|
2 | """ |
---|
3 | Dialog panel to explore the P(r) inversion results for a range |
---|
4 | of D_max value. User picks a number of points and a range of |
---|
5 | distances, then can toggle between inversion outputs and see |
---|
6 | their distribution as a function of D_max. |
---|
7 | """ |
---|
8 | |
---|
9 | # global |
---|
10 | import sys |
---|
11 | import os |
---|
12 | from PyQt4 import QtCore |
---|
13 | from PyQt4 import QtGui |
---|
14 | from PyQt4 import QtWebKit |
---|
15 | |
---|
16 | from twisted.internet import threads |
---|
17 | |
---|
18 | # sas-global |
---|
19 | from sas.qtgui.Plotting.PlotterData import Data1D |
---|
20 | from sas.qtgui.Plotting.Plotter import PlotterWidget |
---|
21 | import sas.qtgui.Utilities.GuiUtils as GuiUtils |
---|
22 | |
---|
23 | # local |
---|
24 | from UI.dmax import Ui_DmaxExplorer |
---|
25 | # from InvariantDetails import DetailsDialog |
---|
26 | # from InvariantUtils import WIDGETS |
---|
27 | |
---|
28 | |
---|
29 | class DmaxWindow(QtGui.QDialog, Ui_DmaxExplorer): |
---|
30 | # The controller which is responsible for managing signal slots connections |
---|
31 | # for the gui and providing an interface to the data model. |
---|
32 | name = "Dmax Explorer" # For displaying in the combo box |
---|
33 | |
---|
34 | def __init__(self, pr_state, parent=None): |
---|
35 | super(DmaxWindow, self).__init__() |
---|
36 | self.setupUi(self) |
---|
37 | |
---|
38 | self.setWindowTitle("Dâââ Explorer") |
---|
39 | |
---|
40 | self.pr_state = pr_state |
---|
41 | self.communicator = GuiUtils.Communicate() |
---|
42 | |
---|
43 | self.plot = PlotterWidget(self, self) |
---|
44 | self.verticalLayout.insertWidget(0, self.plot) |
---|
45 | |
---|
46 | # Let's choose the Standard Item Model. |
---|
47 | self.model = QtGui.QStandardItemModel(self) |
---|
48 | |
---|
49 | # # Connect buttons to slots. |
---|
50 | # # Needs to be done early so default values propagate properly. |
---|
51 | # self.setupSlots() |
---|
52 | |
---|
53 | # # Set up the model. |
---|
54 | # self.setupModel() |
---|
55 | |
---|
56 | # # Set up the mapper |
---|
57 | # self.setupMapper() |
---|
58 | |
---|
59 | |
---|
60 | if __name__ == "__main__": |
---|
61 | APP = QtGui.QApplication([]) |
---|
62 | import qt4reactor |
---|
63 | qt4reactor.install() |
---|
64 | # DO NOT move the following import to the top! |
---|
65 | # (unless you know what you're doing) |
---|
66 | from twisted.internet import reactor |
---|
67 | DLG = DmaxWindow(reactor) |
---|
68 | DLG.show() |
---|
69 | reactor.run() |
---|