Index: src/sas/qtgui/DataExplorer.py
===================================================================
--- src/sas/qtgui/DataExplorer.py (revision 965fbd854b36d33e3c78f5ffed0a6040af2ad43e)
+++ src/sas/qtgui/DataExplorer.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -65,4 +65,7 @@
self._helpView = QtWebKit.QWebView()
+ # Fill in the perspectives combo
+ self.initPerspectives()
+
# Custom context menu
self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
@@ -125,4 +128,12 @@
self.cbgraph.setEnabled(len(PlotHelper.currentPlots()) > 0)
self.cmdAppend.setEnabled(len(PlotHelper.currentPlots()) > 0)
+
+ def initPerspectives(self):
+ """
+ Populate the Perspective combobox and define callbacks
+ """
+ self.cbFitting.currentIndexChanged.connect(self.updatePerspectiveCombo)
+ # Set the index so we see the default (Fitting)
+ self.updatePerspectiveCombo(0)
def loadFromURL(self, url):
@@ -389,4 +400,10 @@
self.cbgraph.setCurrentIndex(ind)
+ def updatePerspectiveCombo(self, index):
+ """
+ Notify the gui manager about the new perspective chosen.
+ """
+ self.communicator.perspectiveChangedSignal.emit(self.cbFitting.currentText())
+
def newPlot(self):
"""
Index: src/sas/qtgui/GuiManager.py
===================================================================
--- src/sas/qtgui/GuiManager.py (revision 257bd5712462146ec0fc8f29d198ca47f83ed94f)
+++ src/sas/qtgui/GuiManager.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -29,5 +29,7 @@
# Perspectives
+import Perspectives
from sas.qtgui.Perspectives.Invariant.InvariantPerspective import InvariantWindow
+from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow
from sas.qtgui.DataExplorer import DataExplorerWindow
@@ -98,13 +100,9 @@
"_downloads",
"Tutorial.pdf"))
-
- #==========================================================
- # TEMP PROTOTYPE
- # Add InvariantWindow to the workspace.
- self.invariantWidget = InvariantWindow(self)
- self._workspace.workspace.addWindow(self.invariantWidget)
-
- # Default perspective
- self._current_perspective = self.invariantWidget
+ # Current displayed perspective
+ self._current_perspective = None
+
+ # Invoke the initial perspective
+ self.perspectiveChanged("Fitting")
def addWidgets(self):
@@ -120,4 +118,5 @@
self.dockedFilesWidget = QtGui.QDockWidget("Data Explorer", self._workspace)
self.dockedFilesWidget.setWidget(self.filesWidget)
+
# Disable maximize/minimize and close buttons
self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
@@ -143,4 +142,5 @@
self.KIESSIGCalculator = KiessigPanel(self)
self.SlitSizeCalculator = SlitSizeCalculator(self)
+
def statusBarSetup(self):
"""
@@ -173,4 +173,16 @@
"""
return self._workspace.workspace
+
+ def perspectiveChanged(self, perspective_name):
+ """
+ Respond to change of the perspective signal
+ """
+ # Close the previous perspective
+ if self._current_perspective:
+ self._current_perspective.close()
+ # Default perspective
+ self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](self)
+ self._workspace.workspace.addWindow(self._current_perspective)
+ self._current_perspective.show()
def updatePerspective(self, data):
@@ -322,4 +334,5 @@
self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective)
self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar)
+ self.communicate.perspectiveChangedSignal.connect(self.perspectiveChanged)
def addTriggers(self):
Index: src/sas/qtgui/GuiUtils.py
===================================================================
--- src/sas/qtgui/GuiUtils.py (revision 3bdbfcc5cdff8a3a11a9bb19c1cc8c3660a9c2e2)
+++ src/sas/qtgui/GuiUtils.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -233,4 +233,7 @@
# Current workspace chart's name changed
activeGraphName = QtCore.pyqtSignal(tuple)
+
+ # Current perspective changed
+ perspectiveChangedSignal = QtCore.pyqtSignal(str)
Index: c/sas/qtgui/Perspectives/Fitting/Fitting.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/Fitting.py (revision 4c7dd9f77b5dd095bc4a2131992df337bf40e8fe)
+++ (revision )
@@ -1,150 +1,0 @@
-import sys
-from PyQt4 import QtGui
-from PyQt4 import QtCore
-
-from UI.fitting import Ui_Dialog
-
-class prototype(QtGui.QDialog, Ui_Dialog):
- def __init__(self):
- super(prototype, self).__init__()
- self._model_model = QtGui.QStandardItemModel()
- self._poly_model = QtGui.QStandardItemModel()
- self.setupUi(self)
-
- self.tableView.setModel(self._model_model)
- self.setModelModel()
-
- self.pushButton.setEnabled(False)
- self.checkBox_3.setEnabled(False)
- self.checkBox_4.setEnabled(False)
- self.label_20.setText("---")
- self.label_21.setText("---")
- self.label_24.setText("---")
-
- #self.setTableProperties(self.tableView)
-
- self.tableView_2.setModel(self._poly_model)
- self.setPolyModel()
- self.setTableProperties(self.tableView_2)
-
- for row in range(2):
- c = QtGui.QComboBox()
- c.addItems(['rectangle','array','lognormal','gaussian','schulz',])
- i = self.tableView_2.model().index(row,6)
- self.tableView_2.setIndexWidget(i,c)
-
-
- def setModelModel(self):
- # Crete/overwrite model items
-
- parameters=[]
- p=["scale", "1", "0", "inf", ""]
- for i in xrange(1):
- #for parameter in parameters.keys():
- item1 = QtGui.QStandardItem("background")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("0.001")
- item3 = QtGui.QStandardItem("-inf")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("1/cm")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- item1 = QtGui.QStandardItem("l_radius")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("100")
- item3 = QtGui.QStandardItem("0")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("A")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- item1 = QtGui.QStandardItem("ls_sld")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("3.5e-06")
- item3 = QtGui.QStandardItem("0")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("1/A^2")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- item1 = QtGui.QStandardItem("s_radius")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("25")
- item3 = QtGui.QStandardItem("0")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("A")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- item1 = QtGui.QStandardItem("solvent_sld")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("6.36e-06")
- item3 = QtGui.QStandardItem("0")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("1/A^2")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- item1 = QtGui.QStandardItem("vol_frac_ls")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("0.1")
- item3 = QtGui.QStandardItem("0")
- item4 = QtGui.QStandardItem("inf")
- item5 = QtGui.QStandardItem("")
- self._model_model.appendRow([item1, item2, item3, item4, item5])
-
- self._model_model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter"))
- self._model_model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("Value"))
- self._model_model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min"))
- self._model_model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max"))
- self._model_model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("[Units]"))
-
- def setTableProperties(self, table):
-
- table.setStyleSheet("background-image: url(model.png);")
-
- # Table properties
- table.verticalHeader().setVisible(False)
- table.setAlternatingRowColors(True)
- table.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)
- table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- # Header
- header = table.horizontalHeader()
- header.setResizeMode(QtGui.QHeaderView.Stretch)
- header.setStretchLastSection(True)
-
- def setPolyModel(self):
- item1 = QtGui.QStandardItem("Distribution of radius")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("0")
- item3 = QtGui.QStandardItem("")
- item4 = QtGui.QStandardItem("")
- item5 = QtGui.QStandardItem("35")
- item6 = QtGui.QStandardItem("3")
- item7 = QtGui.QStandardItem("")
- self._poly_model.appendRow([item1, item2, item3, item4, item5, item6, item7])
- item1 = QtGui.QStandardItem("Distribution of thickness")
- item1.setCheckable(True)
- item2 = QtGui.QStandardItem("0")
- item3 = QtGui.QStandardItem("")
- item4 = QtGui.QStandardItem("")
- item5 = QtGui.QStandardItem("35")
- item6 = QtGui.QStandardItem("3")
- item7 = QtGui.QStandardItem("")
- self._poly_model.appendRow([item1, item2, item3, item4, item5, item6, item7])
-
- self._poly_model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter"))
- self._poly_model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("PD[ratio]"))
- self._poly_model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min"))
- self._poly_model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max"))
- self._poly_model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("Npts"))
- self._poly_model.setHeaderData(5, QtCore.Qt.Horizontal, QtCore.QVariant("Nsigs"))
- self._poly_model.setHeaderData(6, QtCore.Qt.Horizontal, QtCore.QVariant("Function"))
-
- self.tableView_2.resizeColumnsToContents()
- header = self.tableView_2.horizontalHeader()
- header.ResizeMode(QtGui.QHeaderView.Stretch)
- header.setStretchLastSection(True)
-
-
-if __name__ == "__main__":
- app = QtGui.QApplication([])
- dlg = prototype()
- dlg.show()
- sys.exit(app.exec_())
Index: src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py (revision 83d6249504661920123f31d028c17441433bf318)
+++ src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -0,0 +1,151 @@
+import sys
+from PyQt4 import QtGui
+from PyQt4 import QtCore
+
+from UI.FittingUI import Ui_FittingUI
+
+class FittingWindow(QtGui.QDialog, Ui_FittingUI):
+ name = "Fitting" # For displaying in the combo box
+ def __init__(self, manager=None, parent=None):
+ super(FittingWindow, self).__init__()
+ self._model_model = QtGui.QStandardItemModel()
+ self._poly_model = QtGui.QStandardItemModel()
+ self.setupUi(self)
+
+ self.tableView.setModel(self._model_model)
+ self.setModelModel()
+
+ self.pushButton.setEnabled(False)
+ self.checkBox_3.setEnabled(False)
+ self.checkBox_4.setEnabled(False)
+ self.label_20.setText("---")
+ self.label_21.setText("---")
+ self.label_24.setText("---")
+
+ #self.setTableProperties(self.tableView)
+
+ self.tableView_2.setModel(self._poly_model)
+ self.setPolyModel()
+ self.setTableProperties(self.tableView_2)
+
+ for row in range(2):
+ c = QtGui.QComboBox()
+ c.addItems(['rectangle','array','lognormal','gaussian','schulz',])
+ i = self.tableView_2.model().index(row,6)
+ self.tableView_2.setIndexWidget(i,c)
+
+
+ def setModelModel(self):
+ # Crete/overwrite model items
+
+ parameters=[]
+ p=["scale", "1", "0", "inf", ""]
+ for i in xrange(1):
+ #for parameter in parameters.keys():
+ item1 = QtGui.QStandardItem("background")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("0.001")
+ item3 = QtGui.QStandardItem("-inf")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("1/cm")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ item1 = QtGui.QStandardItem("l_radius")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("100")
+ item3 = QtGui.QStandardItem("0")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("A")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ item1 = QtGui.QStandardItem("ls_sld")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("3.5e-06")
+ item3 = QtGui.QStandardItem("0")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("1/A^2")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ item1 = QtGui.QStandardItem("s_radius")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("25")
+ item3 = QtGui.QStandardItem("0")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("A")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ item1 = QtGui.QStandardItem("solvent_sld")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("6.36e-06")
+ item3 = QtGui.QStandardItem("0")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("1/A^2")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ item1 = QtGui.QStandardItem("vol_frac_ls")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("0.1")
+ item3 = QtGui.QStandardItem("0")
+ item4 = QtGui.QStandardItem("inf")
+ item5 = QtGui.QStandardItem("")
+ self._model_model.appendRow([item1, item2, item3, item4, item5])
+
+ self._model_model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter"))
+ self._model_model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("Value"))
+ self._model_model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min"))
+ self._model_model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max"))
+ self._model_model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("[Units]"))
+
+ def setTableProperties(self, table):
+
+ table.setStyleSheet("background-image: url(model.png);")
+
+ # Table properties
+ table.verticalHeader().setVisible(False)
+ table.setAlternatingRowColors(True)
+ table.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)
+ table.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+ # Header
+ header = table.horizontalHeader()
+ header.setResizeMode(QtGui.QHeaderView.Stretch)
+ header.setStretchLastSection(True)
+
+ def setPolyModel(self):
+ item1 = QtGui.QStandardItem("Distribution of radius")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("0")
+ item3 = QtGui.QStandardItem("")
+ item4 = QtGui.QStandardItem("")
+ item5 = QtGui.QStandardItem("35")
+ item6 = QtGui.QStandardItem("3")
+ item7 = QtGui.QStandardItem("")
+ self._poly_model.appendRow([item1, item2, item3, item4, item5, item6, item7])
+ item1 = QtGui.QStandardItem("Distribution of thickness")
+ item1.setCheckable(True)
+ item2 = QtGui.QStandardItem("0")
+ item3 = QtGui.QStandardItem("")
+ item4 = QtGui.QStandardItem("")
+ item5 = QtGui.QStandardItem("35")
+ item6 = QtGui.QStandardItem("3")
+ item7 = QtGui.QStandardItem("")
+ self._poly_model.appendRow([item1, item2, item3, item4, item5, item6, item7])
+
+ self._poly_model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter"))
+ self._poly_model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("PD[ratio]"))
+ self._poly_model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min"))
+ self._poly_model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max"))
+ self._poly_model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("Npts"))
+ self._poly_model.setHeaderData(5, QtCore.Qt.Horizontal, QtCore.QVariant("Nsigs"))
+ self._poly_model.setHeaderData(6, QtCore.Qt.Horizontal, QtCore.QVariant("Function"))
+
+ self.tableView_2.resizeColumnsToContents()
+ header = self.tableView_2.horizontalHeader()
+ header.ResizeMode(QtGui.QHeaderView.Stretch)
+ header.setStretchLastSection(True)
+
+
+if __name__ == "__main__":
+ app = QtGui.QApplication([])
+ dlg = FittingWindow()
+ dlg.show()
+ sys.exit(app.exec_())
Index: src/sas/qtgui/Perspectives/Fitting/UI/FittingUI.ui
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UI/FittingUI.ui (revision 83d6249504661920123f31d028c17441433bf318)
+++ src/sas/qtgui/Perspectives/Fitting/UI/FittingUI.ui (revision 83d6249504661920123f31d028c17441433bf318)
@@ -0,0 +1,674 @@
+
+
+ FittingUI
+
+
+
+ 0
+ 0
+ 613
+ 723
+
+
+
+ Fitting Perspective
+
+
+
+ :/res/ball.ico:/res/ball.ico
+
+
+ -
+
+
+ 0
+
+
+
+ FitPage 1
+
+
+
-
+
+
+ File name:
+
+
+
+ -
+
+
+ None
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 482
+ 20
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Fit
+
+
+
+ -
+
+
+ Help
+
+
+
+
+
+ -
+
+
+ 0
+
+
+
+ Model
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Model
+
+
+
-
+
+
-
+
+
+ Category
+
+
+
+ -
+
+
+ Model name
+
+
+
+ -
+
+
+ Structure factor
+
+
+
+ -
+
+
-
+
+ Shapes
+
+
+ -
+
+ Shape-independent
+
+
+
+
+ -
+
+
-
+
+ Binary HS Model
+
+
+ -
+
+ None
+
+
+
+
+ -
+
+
-
+
+ Hard Sphere Structure
+
+
+ -
+
+ None
+
+
+
+
+
+
+ -
+
+
+
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+
+
+
+
+ -
+
+
+ Options
+
+
+
-
+
+
+ true
+
+
+ Polydispersity
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+ Smearing
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ Fitting range
+
+
+
-
+
+
-
+
+
+ Min range
+
+
+
+ -
+
+
+ 0.005
+
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+ -
+
+
+ Max range
+
+
+
+ -
+
+
+ 0.1
+
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 207
+ 20
+
+
+
+
+ -
+
+
+ Fitting error
+
+
+
-
+
+
-
+
+
+ <html><head/><body><p><span style=" font-weight:600;">Ï</span><span style=" font-weight:600; vertical-align:super;">2</span></p></body></html>
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">0.01625</span></p></body></html>
+
+
+
+
+
+
+
+
+
+
+
+
+ Q Range
+
+
+ -
+
+
+ Fitting range
+
+
+
-
+
+
-
+
+
+ Min range
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+ -
+
+
+ Max range
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 217
+ 20
+
+
+
+
+ -
+
+
+ Reset
+
+
+
+ -
+
+
+ Mask Editor
+
+
+
+
+
+
+ -
+
+
+ Data points
+
+
+
-
+
+
-
+
+
+ Npts
+
+
+
+ -
+
+
+ -
+
+
+ Log spaced points
+
+
+
+ -
+
+
+ Npts(Fit)
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>Ï<span style=" vertical-align:super;">2</span>/Npts</p></body></html>
+
+
+
+ -
+
+
+ -
+
+
+ Compute
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 347
+
+
+
+
+
+
+
+
+ Polydisp
+
+
+ -
+
+
+ Polydispersity and Orientational Distribution
+
+
+
-
+
+
+ Add polydispersity
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ Smearing
+
+
+ -
+
+
+ Instrumental Smearing
+
+
+
-
+
+
+ 2
+
+
-
+
+ None
+
+
+ -
+
+ Use dQ Data
+
+
+ -
+
+ Custom Pinhole Smear
+
+
+ -
+
+ Custom Slit Smear
+
+
+
+
+ -
+
+
-
+
+
+ <html><head/><body><p>dQ<span style=" vertical-align:sub;">low</span></p></body></html>
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+ -
+
+
+ <html><head/><body><p>dQ<span style=" vertical-align:sub;">high</span></p></body></html>
+
+
+
+ -
+
+
+ -
+
+
+ <html><head/><body><p>Ã
+<span style=" vertical-align:super;">-1</span></p></body></html>
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 71
+ 20
+
+
+
+
+ -
+
+
+ Weighting
+
+
+
-
+
+
-
+
+
+ None
+
+
+
+ -
+
+
+ Use dI Data
+
+
+
+ -
+
+
+ Use |sqrt(I Data)|
+
+
+
+ -
+
+
+ Use |I Data|
+
+
+
+
+
+
+
+
+
+ comboBox_4
+ groupBox_5
+ horizontalSpacer_2
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 340
+
+
+
+
+
+
+
+
+
+
+
+
+ Fit Page 2
+
+
+
+
+
+
+
+
+
+
+
Index: src/sas/qtgui/Perspectives/Fitting/UI/convert_ui.sh
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UI/convert_ui.sh (revision 83d6249504661920123f31d028c17441433bf318)
+++ src/sas/qtgui/Perspectives/Fitting/UI/convert_ui.sh (revision 83d6249504661920123f31d028c17441433bf318)
@@ -0,0 +1,1 @@
+pyuic.bat -w $1.ui > $1.py
Index: c/sas/qtgui/Perspectives/Fitting/UI/fitting.ui
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UI/fitting.ui (revision 4c7dd9f77b5dd095bc4a2131992df337bf40e8fe)
+++ (revision )
@@ -1,668 +1,0 @@
-
-
- Dialog
-
-
-
- 0
- 0
- 613
- 723
-
-
-
- Dialog
-
-
- -
-
-
- 0
-
-
-
- FitPage 1
-
-
-
-
-
-
- File name:
-
-
-
- -
-
-
- None
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 482
- 20
-
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Fit
-
-
-
- -
-
-
- Help
-
-
-
-
-
- -
-
-
- 0
-
-
-
- Model
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Model
-
-
-
-
-
-
-
-
-
- Category
-
-
-
- -
-
-
- Model name
-
-
-
- -
-
-
- Structure factor
-
-
-
- -
-
-
-
-
- Shapes
-
-
- -
-
- Shape-independent
-
-
-
-
- -
-
-
-
-
- Binary HS Model
-
-
- -
-
- None
-
-
-
-
- -
-
-
-
-
- Hard Sphere Structure
-
-
- -
-
- None
-
-
-
-
-
-
- -
-
-
-
-
-
- QAbstractItemView::ExtendedSelection
-
-
-
-
-
-
- -
-
-
- Options
-
-
-
-
-
-
- true
-
-
- Polydispersity
-
-
- true
-
-
-
- -
-
-
- true
-
-
- Smearing
-
-
- true
-
-
-
-
-
-
- -
-
-
- Fitting range
-
-
-
-
-
-
-
-
-
- Min range
-
-
-
- -
-
-
- 0.005
-
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
- -
-
-
- Max range
-
-
-
- -
-
-
- 0.1
-
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 207
- 20
-
-
-
-
- -
-
-
- Fitting error
-
-
-
-
-
-
-
-
-
- <html><head/><body><p><span style=" font-weight:600;">Ï</span><span style=" font-weight:600; vertical-align:super;">2</span></p></body></html>
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600;">0.01625</span></p></body></html>
-
-
-
-
-
-
-
-
-
-
-
-
- Q Range
-
-
- -
-
-
- Fitting range
-
-
-
-
-
-
-
-
-
- Min range
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
- -
-
-
- Max range
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 217
- 20
-
-
-
-
- -
-
-
- Reset
-
-
-
- -
-
-
- Mask Editor
-
-
-
-
-
-
- -
-
-
- Data points
-
-
-
-
-
-
-
-
-
- Npts
-
-
-
- -
-
-
- -
-
-
- Log spaced points
-
-
-
- -
-
-
- Npts(Fit)
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Ï<span style=" vertical-align:super;">2</span>/Npts</p></body></html>
-
-
-
- -
-
-
- -
-
-
- Compute
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 347
-
-
-
-
-
-
-
-
- Polydisp
-
-
- -
-
-
- Polydispersity and Orientational Distribution
-
-
-
-
-
-
- Add polydispersity
-
-
-
- -
-
-
-
-
-
-
-
-
-
- Smearing
-
-
- -
-
-
- Instrumental Smearing
-
-
-
-
-
-
- 2
-
-
-
-
- None
-
-
- -
-
- Use dQ Data
-
-
- -
-
- Custom Pinhole Smear
-
-
- -
-
- Custom Slit Smear
-
-
-
-
- -
-
-
-
-
-
- <html><head/><body><p>dQ<span style=" vertical-align:sub;">low</span></p></body></html>
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
- -
-
-
- <html><head/><body><p>dQ<span style=" vertical-align:sub;">high</span></p></body></html>
-
-
-
- -
-
-
- -
-
-
- <html><head/><body><p>Ã
-<span style=" vertical-align:super;">-1</span></p></body></html>
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 71
- 20
-
-
-
-
- -
-
-
- Weighting
-
-
-
-
-
-
-
-
-
- None
-
-
-
- -
-
-
- Use dI Data
-
-
-
- -
-
-
- Use |sqrt(I Data)|
-
-
-
- -
-
-
- Use |I Data|
-
-
-
-
-
-
-
-
-
- comboBox_4
- groupBox_5
- horizontalSpacer_2
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 340
-
-
-
-
-
-
-
-
-
-
-
-
- Fit Page 2
-
-
-
-
-
-
-
-
-
Index: src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py (revision b78996786903e718c1fb56b07723e3ceaa7d079f)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -39,4 +39,5 @@
# The controller which is responsible for managing signal slots connections
# for the gui and providing an interface to the data model.
+ name = "Invariant" # For displaying in the combo box
def __init__(self, manager=None, parent=None):
super(InvariantWindow, self).__init__(parent)
@@ -102,10 +103,10 @@
self.setupMapper()
- def closeEvent(self, event):
- """
- Overwrite the default close method of QWidget
- """
- # No close on perspectives - one must always be active.
- event.ignore()
+ #def closeEvent(self, event):
+ # """
+ # Overwrite the default close method of QWidget
+ # """
+ # # No close on perspectives - one must always be active.
+ # event.ignore()
def communicator(self):
Index: src/sas/qtgui/Perspectives/__init__.py
===================================================================
--- src/sas/qtgui/Perspectives/__init__.py (revision f721030e66e61dc6279aa8e024da03b25f8e0d42)
+++ src/sas/qtgui/Perspectives/__init__.py (revision 83d6249504661920123f31d028c17441433bf318)
@@ -0,0 +1,10 @@
+# Available perspectives.
+# When adding a new perspective, this dictionary needs to be updated
+
+from Fitting.FittingPerspective import FittingWindow
+from Invariant.InvariantPerspective import InvariantWindow
+
+PERSPECTIVES = {
+ FittingWindow.name: FittingWindow,
+ InvariantWindow.name: InvariantWindow,
+}