Yaff Icon added, YaffWidget Class created

This commit is contained in:
Markus Rosenstihl 2014-03-20 17:22:33 +01:00
parent a8ad4b68cb
commit cea97a475e
11 changed files with 1028 additions and 11 deletions

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ConductivityGroupBox.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:04 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'PeakGroupBox.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:04 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'PowerLawGroupBox.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:04 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!

19
QDS.py
View File

@ -41,7 +41,8 @@ class AppWindow(QMainWindow):
self.ui.actionAdd_Peak:self.addPeak,
self.ui.actionAdd_Cond:self.addCond,
self.ui.actionAdd_PowerLaw:self.addPowerComplex,
self.ui.actionAdd_Eps_Infty:self.addEpsInfty
self.ui.actionAdd_Eps_Infty:self.addEpsInfty,
self.ui.actionYAFF:self.addYaff,
}
self.myActionGroup = QActionGroup(self)
@ -265,6 +266,22 @@ class AppWindow(QMainWindow):
fig.clear()
def addYaff(self, pos):
_yaff = Conductivity(plt_real=self.ui.pgPlotWidget_real,
plt_imag=self.ui.pgPlotWidget_imag,
limits=self.data.fit_limits)
_yaff.changedData.connect(self.updatePlot)
_yaff.removeObj.connect(self.delParamterObject)
# cond_par = [10**(pos.y() + pos.x())*2*N.pi , 1.0]
# _yaff.setParameter(beta=cond_par)
self.parameterWidget.add(_yaff.widget)
self.function_registry.register_function(_yaff)
self.updatePlot()
def addCond(self, pos):
_conductivity = Conductivity(plt_real=self.ui.pgPlotWidget_real,
plt_imag=self.ui.pgPlotWidget_imag,

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'QDSMain.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:04 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
@ -107,10 +107,19 @@ class Ui_MainWindow(object):
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_eps_infty.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionAdd_Eps_Infty.setIcon(icon3)
self.actionAdd_Eps_Infty.setObjectName(_fromUtf8("actionAdd_Eps_Infty"))
self.actionYAFF = QtGui.QAction(MainWindow)
self.actionYAFF.setCheckable(True)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_yaff.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionYAFF.setIcon(icon4)
self.actionYAFF.setObjectName(_fromUtf8("actionYAFF"))
self.toolBar.addAction(self.actionAdd_Peak)
self.toolBar.addAction(self.actionAdd_Cond)
self.toolBar.addAction(self.actionAdd_PowerLaw)
self.toolBar.addAction(self.actionAdd_Eps_Infty)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionYAFF)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionSave_FitResult)
self.retranslateUi(MainWindow)
@ -128,6 +137,8 @@ class Ui_MainWindow(object):
self.actionAdd_PowerLaw.setToolTip(_translate("MainWindow", "Add (complex) Power Law", None))
self.actionAdd_Eps_Infty.setText(_translate("MainWindow", "Add e_infty", None))
self.actionAdd_Eps_Infty.setToolTip(_translate("MainWindow", "Add eps_infty", None))
self.actionYAFF.setText(_translate("MainWindow", "YAFF", None))
self.actionYAFF.setToolTip(_translate("MainWindow", "Fit with YAFF", None))
from pyqtgraph import PlotWidget
import images_rc

View File

@ -86,6 +86,9 @@
<addaction name="actionAdd_Cond"/>
<addaction name="actionAdd_PowerLaw"/>
<addaction name="actionAdd_Eps_Infty"/>
<addaction name="separator"/>
<addaction name="actionYAFF"/>
<addaction name="separator"/>
<addaction name="actionSave_FitResult"/>
</widget>
<widget class="QDockWidget" name="dockWidget_3">
@ -166,6 +169,21 @@
<string>Add eps_infty</string>
</property>
</action>
<action name="actionYAFF">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="icons/images.qrc">
<normaloff>:/icons/add_yaff.png</normaloff>:/icons/add_yaff.png</iconset>
</property>
<property name="text">
<string>YAFF</string>
</property>
<property name="toolTip">
<string>Fit with YAFF</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'StaticGroupBox.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:04 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'YAFFparameters.ui'
#
# Created: Thu Mar 20 16:44:40 2014
# Created: Thu Mar 20 17:08:05 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!

View File

@ -346,3 +346,4 @@ class Peak(QObject):
self.plt_real.removeItem(self.data_curve_real)
self.removeObj.emit(self)
self.changedData.emit()

View File

@ -1,6 +1,7 @@
<RCC>
<qresource prefix="icons">
<file>add_cond.svg</file>
<file>add_yaff.png</file>
<file>add_eps_infty.png</file>
<file>add_peak.svg</file>
<file>fit_limits.png</file>

File diff suppressed because it is too large Load Diff