Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
r6d96bf9 r59183b7 1 1 # global 2 2 import sys 3 import os4 3 from PyQt4 import QtCore 5 4 from PyQt4 import QtGui … … 10 9 11 10 # sas-global 12 from sas.sascalc.invariant import invariant13 11 from sas.qtgui.Plotting.PlotterData import Data1D 14 12 import sas.qtgui.Utilities.GuiUtils as GuiUtils … … 17 15 from UI.CorfuncPanel import Ui_CorfuncDialog 18 16 # from InvariantDetails import DetailsDialog 19 # from InvariantUtils import WIDGETS 17 from CorfuncUtils import WIDGETS as W 20 18 21 19 … … 32 30 self.setWindowTitle("Corfunc Perspective") 33 31 32 self.model = QtGui.QStandardItemModel(self) 34 33 self.communicate = GuiUtils.Communicate() 34 35 # Connect buttons to slots. 36 # Needs to be done early so default values propagate properly. 37 self.setupSlots() 38 39 # Set up the model. 40 self.setupModel() 41 42 # Set up the mapper 43 self.setupMapper() 44 45 def setupSlots(self): 46 self.extractBtn.clicked.connect(self.action) 47 self.extrapolateBtn.clicked.connect(self.action) 48 self.transformBtn.clicked.connect(self.action) 49 50 self.hilbertBtn.clicked.connect(self.action) 51 self.fourierBtn.clicked.connect(self.action) 52 53 def setupModel(self): 54 self.model.setItem(W.W_QMIN, 55 QtGui.QStandardItem("0")) 56 self.model.setItem(W.W_QMAX, 57 QtGui.QStandardItem("0")) 58 self.model.setItem(W.W_QCUTOFF, 59 QtGui.QStandardItem("0")) 60 self.model.setItem(W.W_BACKGROUND, 61 QtGui.QStandardItem("0")) 62 self.model.setItem(W.W_TRANSFORM, 63 QtGui.QStandardItem("Fourier")) 64 65 def setupMapper(self): 66 self.mapper = QtGui.QDataWidgetMapper(self) 67 self.mapper.setOrientation(QtCore.Qt.Vertical) 68 self.mapper.setModel(self.model) 69 70 self.mapper.addMapping(self.qMin, W.W_QMIN) 71 self.mapper.addMapping(self.qMax1, W.W_QMAX) 72 self.mapper.addMapping(self.qMax2, W.W_QCUTOFF) 73 self.mapper.addMapping(self.bg, W.W_BACKGROUND) 74 75 self.mapper.toFirst() 76 77 78 def action(self): 79 print("Called an action!") 80 print(self.model) 81 print(self.mapper) 35 82 36 83 def allowBatch(self):
Note: See TracChangeset
for help on using the changeset viewer.