initial commit

This commit is contained in:
Markus Rosenstihl 2013-06-14 08:44:34 +02:00
commit 737763ea1b
29 changed files with 5068 additions and 0 deletions

2
.hgignore Normal file
View File

@ -0,0 +1,2 @@
syntax: glob
*.pyc

196
ConductivityGroupBox.py Normal file
View File

@ -0,0 +1,196 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ConductivityGroupBox.ui'
#
# Created: Fri Jun 7 16:23:12 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_ConductivityGroupBox(object):
def setupUi(self, ConductivityGroupBox):
ConductivityGroupBox.setObjectName(_fromUtf8("ConductivityGroupBox"))
ConductivityGroupBox.resize(289, 168)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(ConductivityGroupBox.sizePolicy().hasHeightForWidth())
ConductivityGroupBox.setSizePolicy(sizePolicy)
ConductivityGroupBox.setMinimumSize(QtCore.QSize(0, 150))
self.gridLayout_2 = QtGui.QGridLayout(ConductivityGroupBox)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.gridLayout.setSpacing(5)
self.gridLayout.setContentsMargins(0, 0, -1, -1)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.checkBox_2 = QtGui.QCheckBox(ConductivityGroupBox)
self.checkBox_2.setText(_fromUtf8(""))
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
self.gridLayout.addWidget(self.checkBox_2, 2, 4, 1, 1)
self.checkBox_1 = QtGui.QCheckBox(ConductivityGroupBox)
self.checkBox_1.setLayoutDirection(QtCore.Qt.LeftToRight)
self.checkBox_1.setText(_fromUtf8(""))
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
self.gridLayout.addWidget(self.checkBox_1, 1, 4, 1, 1)
self.lineEdit_3 = QtGui.QLineEdit(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_3.sizePolicy().hasHeightForWidth())
self.lineEdit_3.setSizePolicy(sizePolicy)
self.lineEdit_3.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
self.gridLayout.addWidget(self.lineEdit_3, 3, 1, 1, 1)
self.label_3 = QtGui.QLabel(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
self.pushButton_2 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
self.pushButton_2.setSizePolicy(sizePolicy)
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
self.gridLayout.addWidget(self.pushButton_2, 1, 3, 1, 1)
self.label_2 = QtGui.QLabel(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.pushButton_5 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
self.pushButton_5.setSizePolicy(sizePolicy)
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
self.gridLayout.addWidget(self.pushButton_5, 3, 2, 1, 1)
self.pushButton_6 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_6.sizePolicy().hasHeightForWidth())
self.pushButton_6.setSizePolicy(sizePolicy)
self.pushButton_6.setObjectName(_fromUtf8("pushButton_6"))
self.gridLayout.addWidget(self.pushButton_6, 3, 3, 1, 1)
self.lineEdit_2 = QtGui.QLineEdit(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_2.sizePolicy().hasHeightForWidth())
self.lineEdit_2.setSizePolicy(sizePolicy)
self.lineEdit_2.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
self.gridLayout.addWidget(self.lineEdit_2, 2, 1, 1, 1)
self.lineEdit_1 = QtGui.QLineEdit(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_1.sizePolicy().hasHeightForWidth())
self.lineEdit_1.setSizePolicy(sizePolicy)
self.lineEdit_1.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_1.setObjectName(_fromUtf8("lineEdit_1"))
self.gridLayout.addWidget(self.lineEdit_1, 1, 1, 1, 1)
self.checkBox_3 = QtGui.QCheckBox(ConductivityGroupBox)
self.checkBox_3.setText(_fromUtf8(""))
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
self.gridLayout.addWidget(self.checkBox_3, 3, 4, 1, 1)
self.label_1 = QtGui.QLabel(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
self.label_1.setSizePolicy(sizePolicy)
self.label_1.setAlignment(QtCore.Qt.AlignCenter)
self.label_1.setObjectName(_fromUtf8("label_1"))
self.gridLayout.addWidget(self.label_1, 1, 0, 1, 1)
self.pushButton_3 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_3.sizePolicy().hasHeightForWidth())
self.pushButton_3.setSizePolicy(sizePolicy)
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
self.gridLayout.addWidget(self.pushButton_3, 2, 2, 1, 1)
self.pushButton_4 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_4.sizePolicy().hasHeightForWidth())
self.pushButton_4.setSizePolicy(sizePolicy)
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
self.gridLayout.addWidget(self.pushButton_4, 2, 3, 1, 1)
self.pushButton_1 = QtGui.QPushButton(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_1.sizePolicy().hasHeightForWidth())
self.pushButton_1.setSizePolicy(sizePolicy)
self.pushButton_1.setAutoDefault(False)
self.pushButton_1.setDefault(False)
self.pushButton_1.setFlat(False)
self.pushButton_1.setObjectName(_fromUtf8("pushButton_1"))
self.gridLayout.addWidget(self.pushButton_1, 1, 2, 1, 1)
self.label = QtGui.QLabel(ConductivityGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 0, 4, 1, 1)
self.removeButton = QtGui.QPushButton(ConductivityGroupBox)
self.removeButton.setObjectName(_fromUtf8("removeButton"))
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
self.retranslateUi(ConductivityGroupBox)
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), ConductivityGroupBox.hide)
QtCore.QMetaObject.connectSlotsByName(ConductivityGroupBox)
def retranslateUi(self, ConductivityGroupBox):
ConductivityGroupBox.setWindowTitle(_translate("ConductivityGroupBox", "GroupBox", None))
ConductivityGroupBox.setTitle(_translate("ConductivityGroupBox", "GroupBox", None))
self.lineEdit_3.setText(_translate("ConductivityGroupBox", "0.0", None))
self.label_3.setText(_translate("ConductivityGroupBox", "α", None))
self.pushButton_2.setText(_translate("ConductivityGroupBox", "+", None))
self.label_2.setText(_translate("ConductivityGroupBox", "σ", None))
self.pushButton_5.setText(_translate("ConductivityGroupBox", "-", None))
self.pushButton_6.setText(_translate("ConductivityGroupBox", "+", None))
self.lineEdit_2.setText(_translate("ConductivityGroupBox", "0.00e+00", None))
self.lineEdit_1.setText(_translate("ConductivityGroupBox", "0.00e+00", None))
self.label_1.setText(_translate("ConductivityGroupBox", "ε<sub>static</sub>", None))
self.pushButton_3.setText(_translate("ConductivityGroupBox", "-", None))
self.pushButton_4.setText(_translate("ConductivityGroupBox", "+", None))
self.pushButton_1.setText(_translate("ConductivityGroupBox", "-", None))
self.label.setText(_translate("ConductivityGroupBox", "Fix", None))
self.removeButton.setText(_translate("ConductivityGroupBox", "Remove", None))

308
ConductivityGroupBox.ui Normal file
View File

@ -0,0 +1,308 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConductivityGroupBox</class>
<widget class="QGroupBox" name="ConductivityGroupBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>289</width>
<height>168</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="windowTitle">
<string>GroupBox</string>
</property>
<property name="title">
<string>GroupBox</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="spacing">
<number>5</number>
</property>
<item row="2" column="4">
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="checkBox_1">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.0</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>α</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>σ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButton_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="pushButton_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.00e+00</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.00e+00</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ε&lt;sub&gt;static&lt;/sub&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButton_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="pushButton_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Fix</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="removeButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>removeButton</sender>
<signal>clicked()</signal>
<receiver>ConductivityGroupBox</receiver>
<slot>hide()</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>48</y>
</hint>
<hint type="destinationlabel">
<x>144</x>
<y>80</y>
</hint>
</hints>
</connection>
</connections>
</ui>

75
ConductivityWidget.py Normal file
View File

@ -0,0 +1,75 @@
# -*- encoding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import ConductivityGroupBox
class ConductivityWidget(QGroupBox):
changedTable = pyqtSignal()
def __init__(self, parent=None):
QGroupBox.__init__(self)
super(ConductivityWidget, self).__init__(parent)
self.setTitle(u"Conductivity …")
self.ui = ConductivityGroupBox.Ui_ConductivityGroupBox()
self.ui.setupUi(self)
self.lineEdits = [self.ui.lineEdit_1,
self.ui.lineEdit_2,
self.ui.lineEdit_3]
self.fixedCheckBoxes = [self.ui.checkBox_1,
self.ui.checkBox_2,
self.ui.checkBox_3]
for le in self.lineEdits:
le.editingFinished.connect(self.changedTable.emit)
self.signalMapper = QSignalMapper(self)
for i, button in enumerate([self.ui.pushButton_1,
self.ui.pushButton_2,
self.ui.pushButton_3,
self.ui.pushButton_4,
self.ui.pushButton_5,
self.ui.pushButton_6,
]):
self.signalMapper.setMapping(button,i)
button.clicked.connect(self.signalMapper.map)
self.signalMapper.mapped.connect(self.changeValues)
def changeValues(self, num):
logstep = 1.29154967 # 10 log even steps per decade
linstep = 0.05
# 0-3 down/up for d_eps and tau, respectively
# 4-7 down, up for a, b
if num == 0:
self.ui.lineEdit_1.setText("%.2e"%(self.ui.lineEdit_1.text().toDouble()[0]/logstep))
if num == 1:
self.ui.lineEdit_1.setText("%.2e"%(self.ui.lineEdit_1.text().toDouble()[0]*logstep))
if num == 2:
self.ui.lineEdit_2.setText("%.2e"%(self.ui.lineEdit_2.text().toDouble()[0]/logstep))
if num == 3:
self.ui.lineEdit_2.setText("%.2e"%(self.ui.lineEdit_2.text().toDouble()[0]*logstep))
if num == 4:
self.ui.lineEdit_3.setText("%.2e"%(self.ui.lineEdit_3.text().toDouble()[0]-linstep))
if num == 5:
self.ui.lineEdit_3.setText("%.2e"%(self.ui.lineEdit_3.text().toDouble()[0]+linstep))
self.changedTable.emit()
def fixedParameter(self):
return [0 if cb.isChecked() else 1 for cb in self.fixedCheckBoxes]
def setColor(self, color):
r,g,b = color
palette = self.palette()
palette.setColor(QPalette.Foreground, QColor(r,g,b))
self.setPalette(palette)
def getTable(self):
tmp = [i.text().toDouble()[0] # selects the number, ignores the status
for i in self.lineEdits ]
print "peakParams:",tmp
return tmp
def update(self):
self.changedTable.emit()
def updateTable(self, *args):
for i,arg in enumerate(args):
self.lineEdits[i].setText("%g"%(args[i]))

5
Makefile Normal file
View File

@ -0,0 +1,5 @@
all:
pyrcc4 icons/images.qrc -o images_rc.py
pyuic4 QDSMain.ui -o QDSMain.py
pyuic4 PeakGroupBox.ui -o PeakGroupBox.py
pyuic4 ConductivityGroupBox.ui -o ConductivityGroupBox.py

124
MatplotlibWidget.py Normal file
View File

@ -0,0 +1,124 @@
# -*- coding: utf-8 -*-
#
# Copyright © 2009 Pierre Raybaut
# Licensed under the terms of the MIT License
"""
MatplotlibWidget
================
Example of matplotlib widget for PyQt4
Copyright © 2009 Pierre Raybaut
This software is licensed under the terms of the MIT License
Derived from 'embedding_in_pyqt4.py':
Copyright © 2005 Florent Rougon, 2006 Darren Dale
"""
__version__ = "1.0.0"
from PyQt4.QtGui import QSizePolicy
from PyQt4.QtCore import QSize
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as Canvas
from matplotlib.figure import Figure
from matplotlib import rcParams
rcParams['font.size'] = 9
class MatplotlibWidget(Canvas):
"""
MatplotlibWidget inherits PyQt4.QtGui.QWidget
and matplotlib.backend_bases.FigureCanvasBase
Options: option_name (default_value)
-------
parent (None): parent widget
title (''): figure title
xlabel (''): X-axis label
ylabel (''): Y-axis label
xlim (None): X-axis limits ([min, max])
ylim (None): Y-axis limits ([min, max])
xscale ('linear'): X-axis scale
yscale ('linear'): Y-axis scale
width (4): width in inches
height (3): height in inches
dpi (100): resolution in dpi
hold (False): if False, figure will be cleared each time plot is called
Widget attributes:
-----------------
figure: instance of matplotlib.figure.Figure
axes: figure axes
Example:
-------
self.widget = MatplotlibWidget(self, yscale='log', hold=True)
from numpy import linspace
x = linspace(-10, 10)
self.widget.axes.plot(x, x**2)
self.wdiget.axes.plot(x, x**3)
"""
def __init__(self, parent=None, title='', xlabel='', ylabel='',
xlim=None, ylim=None, xscale='linear', yscale='linear',
width=6, height=4, dpi=100, hold=False):
self.figure = Figure(figsize=(width, height), dpi=dpi)
self.axes = self.figure.add_subplot(111)
self.axes.set_title(title)
self.axes.set_xlabel(xlabel)
self.axes.set_ylabel(ylabel)
if xscale is not None:
self.axes.set_xscale(xscale)
if yscale is not None:
self.axes.set_yscale(yscale)
if xlim is not None:
self.axes.set_xlim(*xlim)
if ylim is not None:
self.axes.set_ylim(*ylim)
self.axes.hold(hold)
Canvas.__init__(self, self.figure)
self.setParent(parent)
Canvas.setSizePolicy(self, QSizePolicy.Expanding, QSizePolicy.Expanding)
Canvas.updateGeometry(self)
def sizeHint(self):
w, h = self.get_width_height()
return QSize(w, h)
def minimumSizeHint(self):
return QSize(10, 10)
#===============================================================================
# Example
#===============================================================================
if __name__ == '__main__':
import sys
from PyQt4.QtGui import QMainWindow, QApplication
from numpy import linspace
class ApplicationWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.mplwidget = MatplotlibWidget(self, title='Example',
xlabel='Linear scale',
ylabel='Log scale',
hold=True, yscale='log')
self.mplwidget.setFocus()
self.setCentralWidget(self.mplwidget)
self.plot(self.mplwidget.axes)
def plot(self, axes):
x = linspace(-10, 10)
axes.plot(x, x**2)
axes.plot(x, x**3)
app = QApplication(sys.argv)
win = ApplicationWindow()
win.show()
sys.exit(app.exec_())

263
PeakGroupBox.py Normal file
View File

@ -0,0 +1,263 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PeakGroupBox.ui'
#
# Created: Fri Jun 7 16:23:12 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_PeakGroupBox(object):
def setupUi(self, PeakGroupBox):
PeakGroupBox.setObjectName(_fromUtf8("PeakGroupBox"))
PeakGroupBox.setEnabled(True)
PeakGroupBox.resize(385, 230)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(PeakGroupBox.sizePolicy().hasHeightForWidth())
PeakGroupBox.setSizePolicy(sizePolicy)
PeakGroupBox.setMinimumSize(QtCore.QSize(275, 210))
PeakGroupBox.setFlat(False)
PeakGroupBox.setCheckable(False)
self.gridLayout_2 = QtGui.QGridLayout(PeakGroupBox)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.gridLayout.setSpacing(5)
self.gridLayout.setContentsMargins(0, 0, -1, -1)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.checkBox_2 = QtGui.QCheckBox(PeakGroupBox)
self.checkBox_2.setText(_fromUtf8(""))
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
self.gridLayout.addWidget(self.checkBox_2, 2, 4, 1, 1)
self.lineEdit_3 = QtGui.QLineEdit(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_3.sizePolicy().hasHeightForWidth())
self.lineEdit_3.setSizePolicy(sizePolicy)
self.lineEdit_3.setMinimumSize(QtCore.QSize(128, 0))
self.lineEdit_3.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
self.gridLayout.addWidget(self.lineEdit_3, 3, 1, 1, 1)
self.checkBox_3 = QtGui.QCheckBox(PeakGroupBox)
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
self.gridLayout.addWidget(self.checkBox_3, 3, 4, 1, 1)
self.pushButton_7 = QtGui.QPushButton(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
self.pushButton_7.setSizePolicy(sizePolicy)
self.pushButton_7.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_7.setObjectName(_fromUtf8("pushButton_7"))
self.gridLayout.addWidget(self.pushButton_7, 4, 2, 1, 1)
self.label_2 = QtGui.QLabel(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.lineEdit_4 = QtGui.QLineEdit(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_4.sizePolicy().hasHeightForWidth())
self.lineEdit_4.setSizePolicy(sizePolicy)
self.lineEdit_4.setMinimumSize(QtCore.QSize(128, 0))
self.lineEdit_4.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4"))
self.gridLayout.addWidget(self.lineEdit_4, 4, 1, 1, 1)
self.pushButton_1 = QtGui.QPushButton(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_1.sizePolicy().hasHeightForWidth())
self.pushButton_1.setSizePolicy(sizePolicy)
self.pushButton_1.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_1.setAutoDefault(False)
self.pushButton_1.setDefault(False)
self.pushButton_1.setFlat(False)
self.pushButton_1.setObjectName(_fromUtf8("pushButton_1"))
self.gridLayout.addWidget(self.pushButton_1, 1, 2, 1, 1)
self.pushButton_6 = QtGui.QPushButton(PeakGroupBox)
self.pushButton_6.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_6.sizePolicy().hasHeightForWidth())
self.pushButton_6.setSizePolicy(sizePolicy)
self.pushButton_6.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_6.setObjectName(_fromUtf8("pushButton_6"))
self.gridLayout.addWidget(self.pushButton_6, 3, 3, 1, 1)
self.label = QtGui.QLabel(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 0, 4, 1, 1)
self.pushButton_5 = QtGui.QPushButton(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
self.pushButton_5.setSizePolicy(sizePolicy)
self.pushButton_5.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
self.gridLayout.addWidget(self.pushButton_5, 3, 2, 1, 1)
self.removeButton = QtGui.QPushButton(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.removeButton.sizePolicy().hasHeightForWidth())
self.removeButton.setSizePolicy(sizePolicy)
self.removeButton.setMinimumSize(QtCore.QSize(124, 0))
self.removeButton.setObjectName(_fromUtf8("removeButton"))
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1)
self.pushButton_8 = QtGui.QPushButton(PeakGroupBox)
self.pushButton_8.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
self.pushButton_8.setSizePolicy(sizePolicy)
self.pushButton_8.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_8.setObjectName(_fromUtf8("pushButton_8"))
self.gridLayout.addWidget(self.pushButton_8, 4, 3, 1, 1)
self.label_3 = QtGui.QLabel(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
self.pushButton_4 = QtGui.QPushButton(PeakGroupBox)
self.pushButton_4.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_4.sizePolicy().hasHeightForWidth())
self.pushButton_4.setSizePolicy(sizePolicy)
self.pushButton_4.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
self.gridLayout.addWidget(self.pushButton_4, 2, 3, 1, 1)
self.label_1 = QtGui.QLabel(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
self.label_1.setSizePolicy(sizePolicy)
self.label_1.setAlignment(QtCore.Qt.AlignCenter)
self.label_1.setObjectName(_fromUtf8("label_1"))
self.gridLayout.addWidget(self.label_1, 1, 0, 1, 1)
self.lineEdit_2 = QtGui.QLineEdit(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_2.sizePolicy().hasHeightForWidth())
self.lineEdit_2.setSizePolicy(sizePolicy)
self.lineEdit_2.setMinimumSize(QtCore.QSize(128, 0))
self.lineEdit_2.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
self.gridLayout.addWidget(self.lineEdit_2, 2, 1, 1, 1)
self.checkBox_1 = QtGui.QCheckBox(PeakGroupBox)
self.checkBox_1.setLayoutDirection(QtCore.Qt.LeftToRight)
self.checkBox_1.setText(_fromUtf8(""))
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
self.gridLayout.addWidget(self.checkBox_1, 1, 4, 1, 1)
self.lineEdit_1 = QtGui.QLineEdit(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_1.sizePolicy().hasHeightForWidth())
self.lineEdit_1.setSizePolicy(sizePolicy)
self.lineEdit_1.setMinimumSize(QtCore.QSize(128, 0))
self.lineEdit_1.setMaximumSize(QtCore.QSize(90, 16777215))
self.lineEdit_1.setObjectName(_fromUtf8("lineEdit_1"))
self.gridLayout.addWidget(self.lineEdit_1, 1, 1, 1, 1)
self.pushButton_3 = QtGui.QPushButton(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_3.sizePolicy().hasHeightForWidth())
self.pushButton_3.setSizePolicy(sizePolicy)
self.pushButton_3.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
self.gridLayout.addWidget(self.pushButton_3, 2, 2, 1, 1)
self.label_4 = QtGui.QLabel(PeakGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
self.label_4.setSizePolicy(sizePolicy)
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
self.checkBox_4 = QtGui.QCheckBox(PeakGroupBox)
self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
self.gridLayout.addWidget(self.checkBox_4, 4, 4, 1, 1)
self.pushButton_2 = QtGui.QPushButton(PeakGroupBox)
self.pushButton_2.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
self.pushButton_2.setSizePolicy(sizePolicy)
self.pushButton_2.setMinimumSize(QtCore.QSize(64, 0))
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
self.gridLayout.addWidget(self.pushButton_2, 1, 3, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
self.retranslateUi(PeakGroupBox)
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), PeakGroupBox.hide)
QtCore.QMetaObject.connectSlotsByName(PeakGroupBox)
def retranslateUi(self, PeakGroupBox):
PeakGroupBox.setWindowTitle(_translate("PeakGroupBox", "GroupBox", None))
PeakGroupBox.setTitle(_translate("PeakGroupBox", "GroupBox", None))
self.lineEdit_3.setText(_translate("PeakGroupBox", "0.0", None))
self.checkBox_3.setText(_translate("PeakGroupBox", "CD", None))
self.pushButton_7.setText(_translate("PeakGroupBox", "-", None))
self.label_2.setText(_translate("PeakGroupBox", "τ", None))
self.lineEdit_4.setText(_translate("PeakGroupBox", "0.0", None))
self.pushButton_1.setText(_translate("PeakGroupBox", "-", None))
self.pushButton_6.setText(_translate("PeakGroupBox", "+", None))
self.label.setText(_translate("PeakGroupBox", "Fix", None))
self.pushButton_5.setText(_translate("PeakGroupBox", "-", None))
self.removeButton.setText(_translate("PeakGroupBox", "Remove", None))
self.pushButton_8.setText(_translate("PeakGroupBox", "+", None))
self.label_3.setText(_translate("PeakGroupBox", "γ", None))
self.pushButton_4.setText(_translate("PeakGroupBox", "+", None))
self.label_1.setText(_translate("PeakGroupBox", "Δε", None))
self.lineEdit_2.setText(_translate("PeakGroupBox", "0.00e+00", None))
self.lineEdit_1.setText(_translate("PeakGroupBox", "0.00e+00", None))
self.pushButton_3.setText(_translate("PeakGroupBox", "-", None))
self.label_4.setText(_translate("PeakGroupBox", "β", None))
self.checkBox_4.setText(_translate("PeakGroupBox", "CC", None))
self.pushButton_2.setText(_translate("PeakGroupBox", "+", None))

481
PeakGroupBox.ui Normal file
View File

@ -0,0 +1,481 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PeakGroupBox</class>
<widget class="QGroupBox" name="PeakGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>385</width>
<height>230</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>275</width>
<height>210</height>
</size>
</property>
<property name="windowTitle">
<string>GroupBox</string>
</property>
<property name="title">
<string>GroupBox</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0" columnstretch="0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="spacing">
<number>5</number>
</property>
<item row="2" column="4">
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.0</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>CD</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pushButton_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>τ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit_4">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.0</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="pushButton_6">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Fix</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButton_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="removeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>124</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="pushButton_8">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>γ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="pushButton_4">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Δε</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_2">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.00e+00</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="checkBox_1">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_1">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0.00e+00</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButton_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>β</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QCheckBox" name="checkBox_4">
<property name="text">
<string>CC</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>removeButton</sender>
<signal>clicked()</signal>
<receiver>PeakGroupBox</receiver>
<slot>hide()</slot>
<hints>
<hint type="sourcelabel">
<x>82</x>
<y>42</y>
</hint>
<hint type="destinationlabel">
<x>131</x>
<y>88</y>
</hint>
</hints>
</connection>
</connections>
</ui>

87
PeakWidget.py Normal file
View File

@ -0,0 +1,87 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import PeakGroupBox
class PeakWidget(QGroupBox):
changedTable = pyqtSignal()
def __init__(self, parent=None):
QGroupBox.__init__(self)
super(PeakWidget, self).__init__(parent)
self.ui = PeakGroupBox.Ui_PeakGroupBox()
self.ui.setupUi(self)
self.lineEdits = [self.ui.lineEdit_1,
self.ui.lineEdit_2,
self.ui.lineEdit_3,
self.ui.lineEdit_4]
self.fixedCheckBoxes = [self.ui.checkBox_1,
self.ui.checkBox_2,
self.ui.checkBox_3,
self.ui.checkBox_4]
for le in self.lineEdits:
le.editingFinished.connect(self.changedTable.emit)
self.signalMapper = QSignalMapper(self)
for i, button in enumerate([self.ui.pushButton_1,
self.ui.pushButton_2,
self.ui.pushButton_3,
self.ui.pushButton_4,
self.ui.pushButton_5,
self.ui.pushButton_6,
self.ui.pushButton_7,
self.ui.pushButton_8,
]):
self.signalMapper.setMapping(button,i)
button.clicked.connect(self.signalMapper.map)
self.signalMapper.mapped.connect(self.changeValues)
def changeValues(self, num):
logstep = 1.29154967 # 10 log even steps per decade
linstep = 0.05
# 0-3 down/up for d_eps and tau, respectively
# 4-7 down, up for a, b
if num == 0:
self.ui.lineEdit_1.setText("%.2e"%(self.ui.lineEdit_1.text().toDouble()[0]/logstep))
if num == 1:
self.ui.lineEdit_1.setText("%.2e"%(self.ui.lineEdit_1.text().toDouble()[0]*logstep))
if num == 2:
self.ui.lineEdit_2.setText("%.2e"%(self.ui.lineEdit_2.text().toDouble()[0]/logstep))
if num == 3:
self.ui.lineEdit_2.setText("%.2e"%(self.ui.lineEdit_2.text().toDouble()[0]*logstep))
if num == 4:
self.ui.lineEdit_3.setText("%.2e"%(self.ui.lineEdit_3.text().toDouble()[0]-linstep))
if num == 5:
self.ui.lineEdit_3.setText("%.2e"%(self.ui.lineEdit_3.text().toDouble()[0]+linstep))
if num == 6:
self.ui.lineEdit_4.setText("%.2e"%(self.ui.lineEdit_4.text().toDouble()[0]-linstep))
if num == 7:
self.ui.lineEdit_4.setText("%.2e"%(self.ui.lineEdit_4.text().toDouble()[0]+linstep))
self.changedTable.emit()
def fixedParameter(self):
return [0 if cb.isChecked() else 1 for cb in self.fixedCheckBoxes]
def setId(self,id):
self.id=id
self.setTitle("Peak %i"%id)
def setColor(self, color):
r,g,b = color
palette = self.palette()
palette.setColor(QPalette.Foreground, QColor(r,g,b))
self.setPalette(palette)
def peakParameter(self):
tmp = [i.text().toDouble()[0] # selects the number, ignores the status
for i in self.lineEdits ]
print "peakParams:",tmp
return tmp
def update(self):
self.changedTable.emit()
def updateTable(self, *args):
print "updateTable", args
for i,arg in enumerate(args):
self.lineEdits[i].setText("%g"%(args[i]))

667
QDS.py Executable file
View File

@ -0,0 +1,667 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os,sys
import re
import signal
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.uic import *
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
import matplotlib.pyplot as plt
import matplotlib.colors
import numpy as N
import scipy.odr as O
import scipy.optimize as opt
import MatplotlibWidget
import QDSMain
import PeakWidget
import ConductivityWidget
from data import Data
#import yaff
def sigint_handler(*args):
"""Handler for the SIGINT signal."""
sys.stderr.write('\r')
if QMessageBox.question(None, '', "Are you sure you want to quit?",
QMessageBox.Yes | QMessageBox.No,
QMessageBox.No) == QMessageBox.Yes:
QApplication.quit()
def id_to_color(id):
colors = ['b', 'r','g','c','m','y','k']
conv = matplotlib.colors.ColorConverter()
return conv.to_rgb(colors[id%len(colors)])
def tau_peak(f,a,b):
tau = (N.sin( N.pi*a/2./(b+1) )/N.sin( N.pi*a*b/2./(b+1) ))**(1/a)
tau /= 2*N.pi*f
return tau
def hn(p,nu):
delta_eps,tau,a,b = p
om = 2*N.pi*nu
Phi = N.arctan( (om*tau)**a*N.sin(N.pi*a/2.)/(1.+(om*tau)**a*N.cos(N.pi*a/2.)) )
e_loss = delta_eps * (1+ 2*(om*tau)**a * N.cos(N.pi*a/2.) + (om*tau)**(2.*a) )**(-b/2.)*N.sin(b*Phi)
e_stor = delta_eps * (1+ 2*(om*tau)**a * N.cos(N.pi*a/2.) + (om*tau)**(2.*a) )**(-b/2.)*N.cos(b*Phi)
return 2*e_loss
def multi_hn(p,nu):
conductivity = p[1]
cond_beta = p[2]
om = 2*N.pi*nu
e_loss = conductivity/om**cond_beta
e_loss += p[0]
#for key, igroup in groupby(p[3:], lambda x: x//4):
for i in xrange(len(p[3:])/4):
delta_eps, tau, a, b = p[3+i*4:3+(i+1)*4]
#delta_eps, tau, a, b = list(igroup)
#print delta_eps,tau,a,b
#a = 0.5 *(1 + N.tanh(a))
#b = 0.5 *(1 + N.tanh(b))
Phi = N.arctan( (om*tau)**a*N.sin(N.pi*a/2.)/(1.+(om*tau)**a*N.cos(N.pi*a/2.)) )
e_loss += 2*delta_eps * (1+ 2*(om*tau)**a * N.cos(N.pi*a/2.) + (om*tau)**(2.*a) )**(-b/2.)*N.sin(b*Phi)
#e_stor = delta_eps * (1+ 2*(om*tau)**a * N.cos(N.pi*a/2.) + (om*tau)**(2.*a) )**(-b/2.)*N.cos(b*Phi)
return e_loss
def mini_func(p,x, y):
res = y - multi_hn(p,x)
# apply weights
res /= 1/y
return N.sqrt(N.dot(res,res))
def conductivity(p, nu):
c = p[0]/(2*N.pi*nu)**p[1]
return c
def hnfit(delta_eps, tau, points):
x = [point[0] for point in points]
y = [point[1] for point in points]
dat = O.Data(x,y)
mod = O.Model(hn)
odr = O.ODR(dat,mod, [delta_eps, tau, 1, 1], ifixb=(0,0,1,1), ifixx=(0,), maxit=1000)
odr.run()
odr.output.pprint()
return odr.output.beta
def fit_odr(x,y,p0, fixed):
dat = O.Data(x,y, 1.0/y)
mod = O.Model(multi_hn)
odr = O.ODR(dat, mod, p0, ifixx=(0,), ifixb=fixed, maxit=2000)
odr.run()
return odr.output.beta
def fit_lbfgsb(x,y,p0, fixed):
# TODO fixed parameters…
bounds = [(0,None), (0,1)]
for i in xrange(len(p0[3:])/4):
bounds.append((1e-4,1e12)) # delta_eps
bounds.append((1e-12,1e3)) # tau
bounds.append((0.1,1)) # a
bounds.append((0.1,1)) # b
x,f_minvalue, info_dict = opt.fmin_l_bfgs_b(mini_func, p0,
fprime=None,
args=(x,y),
approx_grad=True,
bounds=bounds,
iprint=0,
maxfun=4000)
if info_dict['warnflag'] != 0:
print info_dict["task"]
return x
def fit_anneal(x,y,p0,fixed):
bounds = [(0,1e14), (0,1)]
for i in xrange(len(p0[2:])/4):
bounds.append((1e-4,1e12)) # delta_eps
bounds.append((1e-12,1e3)) # tau
bounds.append((0.1,1)) # a
bounds.append((0.1,1)) # b
ret = opt.anneal(mini_func, p0,
args=(x,y),
maxeval=20000,
maxiter=30000,
lower=[b[0] for b in bounds],
upper=[b[1] for b in bounds],
dwell=100,
full_output=1)
#pmin, func_min, final_Temp, cooling_iters,accepted_tests, retval
#retval : int
#Flag indicating stopping condition::
# 0 : Points no longer changing
# 1 : Cooled to final temperature
# 2 : Maximum function evaluations
# 3 : Maximum cooling iterations reached
# 4 : Maximum accepted query locations reached
# 5 : Final point not the minimum amongst encountered points
print "Stop reason", ret
return ret[0]
class Conductivity(QObject):
changedData = pyqtSignal()
def __init__(self, mpl=None):
QObject.__init__(self)
super(Conductivity, self)
self.widget = ConductivityWidget.ConductivityWidget()
self.widget.changedTable.connect(self.updateData)
self.mpl_line = None
self.mpl_line_static = None
self.mpl = mpl
def getParameter(self):
p = self.widget.getTable()
return p
def getFixed(self):
p = self.widget.fixedParameter()
return p
def setParameter(self, eps_static=None, sigma=None, sigma_N=None):
self.widget.updateTable(eps_static, sigma, sigma_N)
self.updateData()
def updateData(self):
# get current axis limits
x_min, x_max = self.mpl.canvas.axes.get_xlim()
y_min, y_max = self.mpl.canvas.axes.get_ylim()
nu = N.logspace(N.log10(x_min), N.log10(x_max), 1024)
eps_static, sigma, sigma_N = self.getParameter()
y = conductivity([sigma, sigma_N],nu)
y_static = N.ones(len(nu))*eps_static
# clip data to axes limits
mask_static = (y_static < y_max) & (y_static > y_min)
# clip data to axes limits
mask = (y < y_max) & (y > y_min)
#mask = mask_static = N.ones(1024, dtype='bool')
if self.mpl_line == None:
self.mpl_line, = self.mpl.canvas.axes.loglog(nu[mask],y[mask],'k--',label="Cond.", animated=True) # peak
else:
self.mpl_line.set_xdata(nu[mask])
self.mpl_line.set_ydata(y[mask])
if self.mpl_line_static == None:
self.mpl_line_static, = self.mpl.canvas.axes.loglog(nu[mask_static],
y_static[mask_static],
'k:',
label=r"$\epsilon_S$",
animated=True) # peak
else:
self.mpl_line_static.set_xdata(nu[mask_static])
self.mpl_line_static.set_ydata(y_static[mask_static])
self.changedData.emit()
class Peak(QObject):
changedData = pyqtSignal()
def __init__(self, id=None, mpl=None):
QObject.__init__(self)
super(Peak, self).__init__()
self.color = id_to_color(id)
self.widget = PeakWidget.PeakWidget()
self.widget.setId(id)
self.widget.setColor(map(int, [255*i for i in self.color]))
self.widget.changedTable.connect(self.updatePeak)
self.mpl = mpl
self.mpl_line = None
def getParameter(self):
p = self.widget.peakParameter()
return p
def getFixed(self):
p = self.widget.fixedParameter()
return p
def setParameter(self, delta_eps=None, tau=None, a=None, b=None):
self.widget.updateTable(delta_eps, tau, a, b)
self.updatePeak()
def updatePeak(self):
# get current axis limits
x_min, x_max = self.mpl.canvas.axes.get_xlim()
y_min, y_max = self.mpl.canvas.axes.get_ylim()
nu = N.logspace(N.log10(x_min), N.log10(x_max), 2048)
y = hn(self.getParameter(),nu)
# clip data to axes limits
mask = (y < y_max) & (y > y_min)
y = y[mask]
nu = nu[mask]
if self.mpl_line == None:
self.mpl_line, = self.mpl.canvas.axes.loglog(nu,y,'--',label="Peak %i"%(self.widget.id), animated=True) # peak
self.mpl_line.set_color(self.color)
else:
self.mpl_line.set_xdata(nu)
self.mpl_line.set_ydata(y)
self.changedData.emit()
class AppWindow(QMainWindow):
def __init__(self, parent=None):
super(AppWindow, self).__init__(parent)
self.ui = QDSMain.Ui_MainWindow()
self.ui.setupUi(self)
self.picked_artist = None
self.data = None
self.Conductivity = None
self._lines = dict()
self.peakId = 0
self.peakBoxes = {}
## menubar
fileMenu = self.menuBar().addMenu("File")
openFile = QAction("&Open",self)
openFile.setShortcut(QKeySequence.Open)
openFile.triggered.connect(self.openFile)
fileMenu.addAction(openFile)
# fitting methods
fitMenu = self.menuBar().addMenu("Fit")
# lm
fit_lmAction = QAction("&Levenberg-Marquardt",self)
fitMenu.addAction(fit_lmAction)
# lbfgsb
fit_lbfgsbAction = QAction("&L-BFGS-B",self)
fitMenu.addAction(fit_lbfgsbAction)
# Simulated Annealing
fit_annealAction = QAction("&Simulated Annealing",self)
fitMenu.addAction(fit_annealAction)
self.signalMapper = QSignalMapper(self)
for i, fit_action in enumerate([fit_lmAction, fit_lbfgsbAction, fit_annealAction
]):
self.signalMapper.setMapping(fit_action,i)
fit_action.triggered.connect(self.signalMapper.map)
self.signalMapper.mapped.connect(self.fitData)
# save fitted values
self.ui.actionSave_FitResult.triggered.connect(self.saveFit)
# he plot area, a matplotlib widget
self.mplWidget = PlotWidget(self.ui.mplWidget)
self.mplWidget.canvas.draw()
self.mplWidget.updateGeometry()
# what to do with CIDs?
self.cid = []
self.cid.append( self.mplWidget.canvas.mpl_connect("button_press_event", self.onclick) )
self.cid.append( self.mplWidget.canvas.mpl_connect("pick_event", self.pick) )
self.cid.append( self.mplWidget.canvas.mpl_connect("button_release_event", self.mpl_button_release) )
self.mplWidget.toolbar.spanSelectedTrigger.connect(self.set_fit_xlimits)
def resizeEvent(self,evt):
self.mplWidget.canvas.draw()
self.mplWidget._bg_cache = self.mplWidget.canvas.copy_from_bbox(self.mplWidget.canvas.axes.bbox)
for line in self.mplWidget.canvas.axes.get_lines():
line.set_animated(False)
self.mplWidget.canvas.draw()
for line in self.mplWidget.canvas.axes.get_lines():
line.set_animated(True)
def saveFit(self):
if not os.path.exists("fitresults.log"):
f = open("fitresults.log","w")
# write header
f.write('# T ')
if self.Conductivity != None:
f.write("e_s sig pow_sig ")
for i,pb in enumerate(self.peakBoxes):
f.write("e_inf_%i tau_%i alpha_%i beta_%i"%(i,i,i,i))
f.write('\n')
f.flush()
else:
f = open("fitresults.log","a")
#f.write("%3.2f "%(self.data.meta["T"]))
pars = list(self.fitresult)
pars.insert(0,self.data.meta["T"] )
print pars
N.savetxt(f,N.array([pars,]),fmt="%.5g", delimiter=" ")
f.close()
def set_fit_xlimits(self,xmin,xmax):
self.data.fit_limits = (xmin, xmax, None,None)
def mpl_button_release(self,event):
if self.picked_artist:
if not event.inaxes: # moved outside the plot, add back to original position
self.mplWidget.canvas.axes.add_artist(self.picked_artist)
else: # we move one of the three points determinig the peak
self.picked_artist.set_xdata(event.xdata)
self.picked_artist.set_ydata(event.ydata)
self.mplWidget.canvas.axes.add_artist(self.picked_artist)
for peak in self.peakBoxes.keys():
peak.updatePeak()
self.picked_artist = None
self.mplWidget.canvas.draw_idle()
def pick(self,event):
self.picked_artist = event.artist
event.artist.remove()
self.mplWidget.canvas.draw_idle()
def addCond(self, pos):
if self.Conductivity != None:
return
self.statusBar().showMessage("Click on graph")
self.Conductivity = Conductivity(mpl=self.mplWidget)
self.Conductivity.changedData.connect(self.updatePlot)
self.Conductivity.setParameter(0, 1/(pos[0]/pos[1]/2/N.pi), 1.0)
self.ui.scrollAreaWidgetContents.layout().addWidget(self.Conductivity.widget)
self.Conductivity.widget.ui.removeButton.clicked.connect(self.delCond)
def delCond(self):
self.cond_param = None
self.cond = None
self.Conductivity.mpl_line.remove()
self.Conductivity.mpl_line_static.remove()
del self.Conductivity
self.Conductivity = None
self.updatePlot()
def addPeak(self, pos):
self.peakId += 1
self.statusBar().showMessage("Select Peak Position")
peak = Peak(id=self.peakId, mpl=self.mplWidget)
# connect to delPeak
peak.widget.ui.removeButton.clicked.connect(self.delPeak)
peak.setParameter(delta_eps=pos[1], tau=1/(2.*N.pi*pos[0]), a=1, b=1)
peak.changedData.connect(self.updatePlot)
self.peakBoxes[peak]=None
for pb in self.peakBoxes.keys():
self.ui.scrollAreaWidgetContents.layout().addWidget(pb.widget)
self.updatePlot()
def delPeak(self):
deletePeaks = []
for i in xrange(self.ui.scrollAreaWidgetContents.layout().count()):
print i
for i,peak in enumerate(self.peakBoxes.keys()):
if peak.widget.isHidden():
peak.mpl_line.remove()
deletePeaks.append(peak)
for peak in deletePeaks:
self.peakBoxes.pop(peak)
self.updatePlot()
def fitData(self, method):
if self.Conductivity != None:
start_parameter = list(self.Conductivity.getParameter())
fixed_params = [ i for i in self.Conductivity.getFixed() ]
else:
start_parameter = [0,0,1]
fixed_params = [0,0,0]
for pb in self.peakBoxes.keys():
[ start_parameter.append(i) for i in pb.getParameter() ]
[ fixed_params.append(i) for i in pb.getFixed() ]
fit_methods = [fit_odr, fit_lbfgsb, fit_anneal]
print "StartParameter",start_parameter
print "FixedParameter",fixed_params
print "Limits (xmin, xmax, ymin, ymax)", self.data.fit_limits
_freq, _fit = self.data.get_data()
result = fit_methods[method](_freq, _fit.imag, start_parameter, fixed_params)
self.fitresult = result
for i,pb in enumerate(self.peakBoxes.keys()):
delta_eps, tau, a, b = result[3+i*4:3+(i+1)*4]
pb.setParameter(delta_eps, tau, a, b )
e_static,sigma, sigma_N = result[:3]
if self.Conductivity != None:
self.Conductivity.setParameter(e_static,sigma,sigma_N)
print "*** FIT RESULTS ***"
print u"\u03c3"
print u"\u0394\u03b5"
self.updatePlot()
def onclick(self, event):
"""
Handles the clicks on the matplotlib figure canvas
"""
if self.ui.actionAdd_Peak.isChecked():
x,y = event.xdata,event.ydata
self.addPeak((x,y))
self.ui.actionAdd_Peak.setChecked(False)
self.statusBar().clear()
if self.ui.actionAdd_Cond.isChecked():
x,y = event.xdata,event.ydata
self.addCond((x,y))
self.ui.actionAdd_Cond.setChecked(False)
self.statusBar().clear()
def openFile(self):
path = unicode(QFileDialog.getOpenFileName(self, "Open file"))
# TODO anaylize file (LF,MF, HF) and act accordingly
data = N.loadtxt(path, skiprows=4)
numpat = re.compile('\d+\.\d+')
try:
for line in open(path).readlines():
if re.search("Fixed", line) or re.search("Temp", line):
Temp = float(re.search(numpat, line).group())
print "Temperature found in file:",Temp
break
else:
print "No Temperature found in file"
#Temp = QInputDialog.getDouble(self, "No temperature found in data set","Temperature/K:", value=Temp)[0]
except:
Temp = QInputDialog.getDouble(self, "No temperature found in data set","Temperature/K:", value=0.0)[0]
# mask the data to values > 0 (loglog plot)
mask = (data[:,1]>0) & (data[:,2]>0) #& (data[:,2]>1e-3) & (data[:,0] > 1e-2)
_freq = data[mask,0]
_die_stor = data[mask,1]
_die_loss = data[mask,2]
# clear the figure
self.mplWidget.canvas.axes.clear()
#if self.data != None:
# self.data.remove_curves()
self.data = Data(_freq, _die_stor, _die_loss)
self.data.meta["T"]=Temp
self.data.data_curve, = self.mplWidget.canvas.axes.loglog(self.data.frequency,
self.data.epsilon.imag,
'b.',
markersize=4,
label="Data",
animated=True)
self.mplWidget.canvas.axes.set_xlim(_freq.min(), _freq.max())
self.mplWidget.canvas.axes.set_xlabel("frequency/Hz", fontsize=16)
self.mplWidget.canvas.axes.set_ylabel(u'\u03B5"', fontsize=16)
self.mplWidget.canvas.axes.autoscale(True)
self.legend = self.mplWidget.canvas.axes.legend(title="T=%.2f"%Temp)
for line in self.mplWidget.canvas.axes.get_lines():
line.set_animated(False)
self.mplWidget.canvas.axes.grid()
self.mplWidget.canvas.draw()
for line in self.mplWidget.canvas.axes.get_lines():
line.set_animated(True)
self.legend.set_animated(True)
self.mplWidget.canvas.axes.autoscale(False)
self.mplWidget._bg_cache = self.mplWidget.canvas.copy_from_bbox(self.mplWidget.canvas.axes.bbox)
self.updatePlot()
def updatePlot(self):
nu = self.data.frequency
fit = N.zeros(len(nu))
for peak in self.peakBoxes.keys():
params = peak.getParameter()
fit += hn(params,nu)
if self.Conductivity != None:
print "Cond. given"
params = self.Conductivity.getParameter()[1:]
fit += conductivity(params, nu)
fit += self.Conductivity.getParameter()[0] # eps static
# clip data to axes limits
y_min, y_max = self.mplWidget.canvas.axes.get_ylim()
mask = (fit < y_max) & (fit > y_min)
#mask = N.ones(len(fit), dtype="bool")
if self.data.fitted_curve == None:
self.data.fitted_curve, = self.mplWidget.canvas.axes.loglog(nu[mask],fit[mask],
'k-',
alpha=0.5,
label="Sum",
animated=True)
else:
self.data.fitted_curve.set_xdata(nu[mask])
self.data.fitted_curve.set_ydata(fit[mask])
# update lines
self.mplWidget.canvas.restore_region(self.mplWidget._bg_cache)
self.legend = self.mplWidget.canvas.axes.legend(title = "T=%.2f"%(self.data.meta["T"]) )
self.legend.set_animated(True)
for animated_artist in self.mplWidget.canvas.axes.findobj(match=lambda x: x.get_animated()):
#print "updatePlot: animated artist:",animated_artist
self.mplWidget.canvas.axes.draw_artist(animated_artist)
self.mplWidget.canvas.blit( self.mplWidget.canvas.axes.bbox )
class PlotWidget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self)
super(PlotWidget, self).__init__(parent)
self.mplwidget = MatplotlibWidget.MatplotlibWidget(hold=True,
xlim=(1e-2,1e7),
xscale='log',
yscale='log')
self.canvas = self.mplwidget.figure.canvas # shortcut
self.canvas.axes.grid(True)
self.bbox_size = self.canvas.axes.bbox.size
print "PlotWidget",self.bbox_size
#self.toolbar = NavigationToolbar(self.mplwidget, parent)
self.toolbar = CustomToolbar(self.canvas, self.mplwidget, parent)
layout = QVBoxLayout(parent)
layout.addWidget(self.canvas)
layout.addWidget(self.mplwidget)
layout.addWidget(self.toolbar)
self._bg_cache = None
class CustomToolbar(NavigationToolbar):
# our spanChanged signal
spanSelectedTrigger = pyqtSignal(float, float, name='spanChanged')
def __init__(self, plotCanvas, plotWidget, parent=None):
NavigationToolbar.__init__(self, plotCanvas, plotWidget, coordinates=True)
self.canvas = plotCanvas
# Span select Button
#self.span_button = QAction(QIcon("border-1d-right-icon.png" ), "Span", self)
self.span_button = QAction( QIcon(QPixmap(":/icons/fit_limits.png")), "Span", self)
self.span_button.setCheckable(True)
self.cids = []
self.cids.append(self.canvas.mpl_connect('button_press_event', self.press))
self.cids.append(self.canvas.mpl_connect('motion_notify_event', self.onmove))
self.cids.append(self.canvas.mpl_connect('button_release_event', self.release))
self.cids.append(self.canvas.mpl_connect('draw_event', self.update_background))
# act.setCheckable(True)
# add actions before the coordinates widget
self.insertAction(self.actions()[-1], self.span_button)
self.buttons={}
self._pressed = False
self.background = None
self.span = None
self.istart = 0
self.iend = 0
self.xstart = 0
self.xend = 0
def set_span(self,x1,x2):
#trans = blended_transform_factory(self.axes.transData, self.axes.transAxes)
cur = self.span.get_xy()
cur[0,0] = x1
cur[1,0] = x1
cur[2,0] = x2
cur[3,0] = x2
self.span.set_xy(cur)
def ignore(self, event):
# 'return ``True`` if *event* should be ignored'
return event.inaxes!=self.canvas.axes or event.button !=1
def update_background(self, event):
#if self.canvas.axes is None:
# raise SyntaxError,"Need an axes reference!"
self.background = self.canvas.copy_from_bbox(self.canvas.axes.bbox)
def press(self, event):
if self.span_button.isChecked():
if self.background is None:
self.update_background()
else:
self.canvas.restore_region(self.background)
self.xstart = event.xdata
self.istart = event.x
if self.span is None:
self.span = self.canvas.axes.axvspan(event.xdata, event.xdata, alpha = 0.10, color = "k", animated=False)
else:
self.set_span(event.xdata, event.xdata)
self._pressed = True
def onmove(self,event):
if self.span_button.isChecked() and self._pressed and not self.ignore(event):
self.set_span(self.xstart, event.xdata)
self.update()
def update(self):
self.canvas.restore_region(self.background)
self.canvas.axes.draw_artist(self.span)
for line in self.canvas.axes.get_lines():
self.canvas.axes.draw_artist(line)
self.canvas.blit(self.canvas.axes.bbox)
def release(self,event):
self.span_button.setChecked(False)
self.xend = event.xdata
self.iend = event.x
if self.iend < self.istart:
self.iend,self.istart = self.istart,self.iend
print "released",self.xstart,self.xend
if self._pressed:
if self.ignore(event):
self.istart = 0
self.spanSelectedTrigger.emit(self.xstart,self.xend)
self._pressed = False
if __name__ == '__main__':
signal.signal(signal.SIGINT, sigint_handler)
app = QApplication(sys.argv)
timer = QTimer()
timer.start(1000) # Check every second for Strg-c on Cmd line
timer.timeout.connect(lambda: None)
main = AppWindow()
main.showMaximized()
main.raise_()
sys.exit(app.exec_())

118
QDSMain.py Normal file
View File

@ -0,0 +1,118 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'QDSMain.ui'
#
# Created: Fri Jun 7 16:23:11 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1228, 700)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralwidget = QtGui.QWidget(MainWindow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.mplWidget = QtGui.QWidget(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.mplWidget.sizePolicy().hasHeightForWidth())
self.mplWidget.setSizePolicy(sizePolicy)
self.mplWidget.setMinimumSize(QtCore.QSize(600, 400))
self.mplWidget.setObjectName(_fromUtf8("mplWidget"))
self.horizontalLayout.addWidget(self.mplWidget)
self.scrollArea = QtGui.QScrollArea(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth())
self.scrollArea.setSizePolicy(sizePolicy)
self.scrollArea.setMinimumSize(QtCore.QSize(300, 0))
self.scrollArea.setMaximumSize(QtCore.QSize(210, 16777215))
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 298, 585))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.horizontalLayout.addWidget(self.scrollArea)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1228, 22))
self.menubar.setObjectName(_fromUtf8("menubar"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtGui.QToolBar(MainWindow)
self.toolBar.setObjectName(_fromUtf8("toolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionAdd_Peak = QtGui.QAction(MainWindow)
self.actionAdd_Peak.setCheckable(True)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_peak.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionAdd_Peak.setIcon(icon)
self.actionAdd_Peak.setObjectName(_fromUtf8("actionAdd_Peak"))
self.actionAdd_Cond = QtGui.QAction(MainWindow)
self.actionAdd_Cond.setCheckable(True)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_cond.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionAdd_Cond.setIcon(icon1)
self.actionAdd_Cond.setObjectName(_fromUtf8("actionAdd_Cond"))
self.actionSave_FitResult = QtGui.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/save_fit.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionSave_FitResult.setIcon(icon2)
self.actionSave_FitResult.setObjectName(_fromUtf8("actionSave_FitResult"))
self.toolBar.addAction(self.actionAdd_Peak)
self.toolBar.addAction(self.actionAdd_Cond)
self.toolBar.addAction(self.actionSave_FitResult)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None))
self.actionAdd_Peak.setText(_translate("MainWindow", "Add Peak", None))
self.actionAdd_Cond.setText(_translate("MainWindow", "Add Cond.", None))
self.actionAdd_Cond.setToolTip(_translate("MainWindow", "Added Conductivity Term", None))
self.actionSave_FitResult.setText(_translate("MainWindow", "Save Fit", None))
self.actionSave_FitResult.setToolTip(_translate("MainWindow", "Save Fit Result", None))
import images_rc

160
QDSMain.ui Normal file
View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1228</width>
<height>700</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QWidget" name="mplWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>400</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>210</width>
<height>16777215</height>
</size>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>298</width>
<height>585</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2"/>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1228</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionAdd_Peak"/>
<addaction name="actionAdd_Cond"/>
<addaction name="actionSave_FitResult"/>
</widget>
<action name="actionAdd_Peak">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="icons/images.qrc">
<normaloff>:/icons/add_peak.svg</normaloff>:/icons/add_peak.svg</iconset>
</property>
<property name="text">
<string>Add Peak</string>
</property>
</action>
<action name="actionAdd_Cond">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="icons/images.qrc">
<normaloff>:/icons/add_cond.svg</normaloff>:/icons/add_cond.svg</iconset>
</property>
<property name="text">
<string>Add Cond.</string>
</property>
<property name="toolTip">
<string>Added Conductivity Term</string>
</property>
</action>
<action name="actionSave_FitResult">
<property name="icon">
<iconset resource="icons/images.qrc">
<normaloff>:/icons/save_fit.svg</normaloff>:/icons/save_fit.svg</iconset>
</property>
<property name="text">
<string>Save Fit</string>
</property>
<property name="toolTip">
<string>Save Fit Result</string>
</property>
</action>
</widget>
<resources>
<include location="icons/images.qrc"/>
</resources>
<connections/>
</ui>

28
data.py Normal file
View File

@ -0,0 +1,28 @@
import numpy as N
class Data:
def __init__(self, frequency, die_real, die_imag):
self.frequency = frequency
self.epsilon = die_real +1j *die_imag
self.data_curve = None # mpl object
self.fitted_curve = None # mpl object
self.length = len(frequency)
self.meta = dict()
self.fit_limits = (frequency.min(),frequency.max(),die_imag.min(),die_imag.max())
def __del__(self):
self.remove_curves()
#def set_fit_limits(self, limits=(None,None,None,None)):
def get_data(self):
"""
"""
mask = N.ones(len(self.frequency),dtype = 'bool')
mask = (self.frequency > self.fit_limits[0]) & (self.frequency < self.fit_limits[1])
mask &= (self.epsilon.imag > self.fit_limits[2]) & (self.epsilon.imag < self.fit_limits[1])
return self.frequency[mask], self.epsilon[mask]
def remove_curves(self):
if self.data_curve is not None: self.data_curve.remove()
if self.fitted_curve is not None: self.fitted_curve.remove()

1
icons/add_cond.qrc Normal file
View File

@ -0,0 +1 @@
<RCC/>

3
icons/add_cond.svg Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 191 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:11Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41034 197.98326 L 227.43484 197.98326 C 236.27141 197.98326 243.43484 205.1467 243.43484 213.98326 L 243.43484 309.98425 C 243.43484 318.8208 236.27141 325.98425 227.43484 325.98425 L 129.38583 325.98425 C 120.54928 325.98425 113.385834 318.8208 113.385834 309.98425 L 113.385834 213.98326 C 113.385834 205.1467 120.54928 197.98326 129.38583 197.98326 Z" fill="White"/><path d="M 178.41034 197.98326 L 227.43484 197.98326 C 236.27141 197.98326 243.43484 205.1467 243.43484 213.98326 L 243.43484 309.98425 C 243.43484 318.8208 236.27141 325.98425 227.43484 325.98425 L 129.38583 325.98425 C 120.54928 325.98425 113.385834 318.8208 113.385834 309.98425 L 113.385834 213.98326 C 113.385834 205.1467 120.54928 197.98326 129.38583 197.98326 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="135.89085" y1="226.32942" x2="220.92984" y2="297.19556" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58383 226.33257 L 206.7599 226.33257 L 206.7599 212.1565 L 220.92747 212.1565 L 220.92747 226.33257 L 235.10355 226.33257 L 235.10355 240.50014 L 220.92747 240.50014 L 220.92747 254.67621 L 206.7599 254.67621 L 206.7599 240.50014 L 192.58383 240.50014 Z" fill="#fdca00"/><path d="M 192.58383 226.33257 L 206.7599 226.33257 L 206.7599 212.1565 L 220.92747 212.1565 L 220.92747 226.33257 L 235.10355 226.33257 L 235.10355 240.50014 L 220.92747 240.50014 L 220.92747 254.67621 L 206.7599 254.67621 L 206.7599 240.50014 L 192.58383 240.50014 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

1
icons/add_peak.qrc Normal file
View File

@ -0,0 +1 @@
<RCC/>

3
icons/add_peak.svg Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 36 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:11Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" fill="White"/><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 135.89075 141.73227 C 150.06256 122.83652 164.23862 85.03935 178.41043 85.03935 C 192.58224 85.03935 206.7583 122.83652 220.9301 141.73227" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" fill="#fdca00"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

BIN
icons/fit_limits.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

1
icons/fit_limits.qrc Normal file
View File

@ -0,0 +1 @@
<RCC/>

3
icons/fit_limits.svg Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="320 184 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:15Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs><filter id="Shadow" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="3.488"/><feOffset in="blur" result="offset" dx="0" dy="4"/><feFlood flood-color="Black" flood-opacity=".75" result="flood"/><feComposite in="flood" in2="offset" operator="in"/></filter></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><g><use xl:href="#id23_Graphic" filter="url(#Shadow)"/></g><g id="id23_Graphic"><path d="M 396.35043 191.11728 L 445.37494 191.11728 C 454.2115 191.11728 461.37494 198.28072 461.37494 207.11728 L 461.37494 303.11829 C 461.37494 311.95483 454.2115 319.11829 445.37494 319.11829 L 347.32593 319.11829 C 338.48938 319.11829 331.32593 311.95483 331.32593 303.11829 L 331.32593 207.11728 C 331.32593 198.28072 338.48938 191.11728 347.32593 191.11728 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

8
icons/images.qrc Normal file
View File

@ -0,0 +1,8 @@
<RCC>
<qresource prefix="icons">
<file>add_cond.svg</file>
<file>add_peak.svg</file>
<file>save_fit.svg</file>
<file>fit_limits.png</file>
</qresource>
</RCC>

619
icons/qds_icons.graffle Normal file
View File

@ -0,0 +1,619 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActiveLayerIndex</key>
<integer>0</integer>
<key>AutoAdjust</key>
<false/>
<key>CanvasColor</key>
<dict>
<key>w</key>
<string>1</string>
</dict>
<key>CanvasOrigin</key>
<string>{0, 0}</string>
<key>CanvasScale</key>
<real>1</real>
<key>ColumnAlign</key>
<integer>1</integer>
<key>ColumnSpacing</key>
<real>36</real>
<key>CreationDate</key>
<string>2013-03-01 13:57:03 +0100</string>
<key>Creator</key>
<string>Markus Rosenstihl</string>
<key>DisplayScale</key>
<string>1 cm = 1 cm</string>
<key>GraphDocumentVersion</key>
<integer>5</integer>
<key>GraphicsList</key>
<array>
<dict>
<key>Class</key>
<string>Group</string>
<key>Graphics</key>
<array>
<dict>
<key>Bounds</key>
<string>{{131.911, 426.89}, {93, 55}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>FitText</key>
<string>YES</string>
<key>Flow</key>
<string>Resize</string>
<key>FontInfo</key>
<dict>
<key>Font</key>
<string>Verdana</string>
<key>Size</key>
<real>20</real>
</dict>
<key>ID</key>
<integer>709</integer>
<key>Shape</key>
<string>Rectangle</string>
<key>Style</key>
<dict>
<key>fill</key>
<dict>
<key>Draws</key>
<string>NO</string>
</dict>
<key>shadow</key>
<dict>
<key>Draws</key>
<string>NO</string>
</dict>
<key>stroke</key>
<dict>
<key>Draws</key>
<string>NO</string>
</dict>
</dict>
<key>Text</key>
<dict>
<key>Text</key>
<string>{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
{\fonttbl\f0\fnil\fcharset0 Verdana;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
\f0\b\fs88 \cf0 FIT}</string>
</dict>
<key>Wrap</key>
<string>NO</string>
</dict>
<dict>
<key>Bounds</key>
<string>{{192.584, 382.677}, {42.5197, 42.5197}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>710</integer>
<key>Shape</key>
<string>Cross</string>
<key>Style</key>
<dict>
<key>fill</key>
<dict>
<key>Color</key>
<dict>
<key>b</key>
<string>0</string>
<key>g</key>
<string>0.792157</string>
<key>r</key>
<string>0.992157</string>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>Bounds</key>
<string>{{113.386, 368.504}, {130.049, 128.001}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>711</integer>
<key>Shape</key>
<string>Rectangle</string>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>CornerRadius</key>
<real>16</real>
</dict>
</dict>
</dict>
</array>
<key>ID</key>
<integer>708</integer>
</dict>
<dict>
<key>Class</key>
<string>Group</string>
<key>Graphics</key>
<array>
<dict>
<key>Class</key>
<string>LineGraphic</string>
<key>Head</key>
<dict>
<key>ID</key>
<integer>714</integer>
<key>Position</key>
<real>0.48592239618301392</real>
</dict>
<key>ID</key>
<integer>713</integer>
<key>Points</key>
<array>
<string>{353.331, 255.921}</string>
<string>{438.37, 253.921}</string>
</array>
<key>Style</key>
<dict>
<key>shadow</key>
<dict>
<key>Draws</key>
<string>YES</string>
</dict>
<key>stroke</key>
<dict>
<key>Color</key>
<dict>
<key>b</key>
<string>0.662745</string>
<key>g</key>
<string>0.352941</string>
<key>r</key>
<string>0</string>
</dict>
<key>HeadArrow</key>
<string>FilledArrow</string>
<key>HeadScale</key>
<real>0.5</real>
<key>TailArrow</key>
<string>FilledArrow</string>
<key>TailScale</key>
<real>0.5</real>
<key>Width</key>
<real>10</real>
</dict>
</dict>
<key>Tail</key>
<dict>
<key>ID</key>
<integer>715</integer>
<key>Position</key>
<real>0.50944459438323975</real>
</dict>
</dict>
<dict>
<key>Class</key>
<string>LineGraphic</string>
<key>ID</key>
<integer>714</integer>
<key>Points</key>
<array>
<string>{438.37, 212.598}</string>
<string>{438.37, 297.638}</string>
</array>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>HeadArrow</key>
<string>0</string>
<key>LineType</key>
<integer>1</integer>
<key>TailArrow</key>
<string>0</string>
<key>Width</key>
<real>3</real>
</dict>
</dict>
</dict>
<dict>
<key>Class</key>
<string>LineGraphic</string>
<key>ID</key>
<integer>715</integer>
<key>Points</key>
<array>
<string>{353.331, 212.598}</string>
<string>{353.331, 297.637}</string>
</array>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>HeadArrow</key>
<string>0</string>
<key>LineType</key>
<integer>1</integer>
<key>TailArrow</key>
<string>0</string>
<key>Width</key>
<real>3</real>
</dict>
</dict>
</dict>
<dict>
<key>Bounds</key>
<string>{{331.326, 191.117}, {130.049, 128.001}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>716</integer>
<key>Shape</key>
<string>Rectangle</string>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>CornerRadius</key>
<real>16</real>
</dict>
</dict>
</dict>
</array>
<key>ID</key>
<integer>712</integer>
</dict>
<dict>
<key>Class</key>
<string>Group</string>
<key>Graphics</key>
<array>
<dict>
<key>Bounds</key>
<string>{{192.584, 212.156}, {42.5197, 42.5197}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>29</integer>
<key>Shape</key>
<string>Cross</string>
<key>Style</key>
<dict>
<key>fill</key>
<dict>
<key>Color</key>
<dict>
<key>b</key>
<string>0</string>
<key>g</key>
<string>0.792157</string>
<key>r</key>
<string>0.992157</string>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>Class</key>
<string>LineGraphic</string>
<key>ID</key>
<integer>30</integer>
<key>Points</key>
<array>
<string>{135.891, 226.329}</string>
<string>{220.93, 297.196}</string>
</array>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>HeadArrow</key>
<string>0</string>
<key>LineType</key>
<integer>1</integer>
<key>TailArrow</key>
<string>0</string>
<key>Width</key>
<real>9</real>
</dict>
</dict>
</dict>
<dict>
<key>Bounds</key>
<string>{{113.386, 197.983}, {130.049, 128.001}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>31</integer>
<key>Shape</key>
<string>Rectangle</string>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>CornerRadius</key>
<real>16</real>
</dict>
</dict>
</dict>
</array>
<key>ID</key>
<integer>28</integer>
</dict>
<dict>
<key>Class</key>
<string>Group</string>
<key>Graphics</key>
<array>
<dict>
<key>Bounds</key>
<string>{{192.584, 56.6929}, {42.5197, 42.5197}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>25</integer>
<key>Shape</key>
<string>Cross</string>
<key>Style</key>
<dict>
<key>fill</key>
<dict>
<key>Color</key>
<dict>
<key>b</key>
<string>0</string>
<key>g</key>
<string>0.792157</string>
<key>r</key>
<string>0.992157</string>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>Class</key>
<string>LineGraphic</string>
<key>ID</key>
<integer>26</integer>
<key>Points</key>
<array>
<string>{135.891, 141.732}</string>
<string>{178.41, 85.0394}</string>
<string>{220.93, 141.732}</string>
</array>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>HeadArrow</key>
<string>0</string>
<key>LineType</key>
<integer>1</integer>
<key>TailArrow</key>
<string>0</string>
<key>Width</key>
<real>9</real>
</dict>
</dict>
</dict>
<dict>
<key>Bounds</key>
<string>{{113.386, 42.5197}, {130.049, 128.001}}</string>
<key>Class</key>
<string>ShapedGraphic</string>
<key>ID</key>
<integer>27</integer>
<key>Shape</key>
<string>Rectangle</string>
<key>Style</key>
<dict>
<key>stroke</key>
<dict>
<key>CornerRadius</key>
<real>16</real>
</dict>
</dict>
</dict>
</array>
<key>ID</key>
<integer>24</integer>
</dict>
</array>
<key>GridInfo</key>
<dict>
<key>GridSpacing</key>
<real>14.17322826385498</real>
<key>MajorGridSpacing</key>
<integer>10</integer>
<key>ShowsGrid</key>
<string>YES</string>
<key>SnapsToGrid</key>
<string>YES</string>
</dict>
<key>GuidesLocked</key>
<string>NO</string>
<key>GuidesVisible</key>
<string>YES</string>
<key>HPages</key>
<integer>1</integer>
<key>ImageCounter</key>
<integer>1</integer>
<key>IsPalette</key>
<string>NO</string>
<key>KeepToScale</key>
<false/>
<key>Layers</key>
<array>
<dict>
<key>Lock</key>
<string>NO</string>
<key>Name</key>
<string>Ebene 1</string>
<key>Print</key>
<string>YES</string>
<key>View</key>
<string>YES</string>
</dict>
</array>
<key>LayoutInfo</key>
<dict/>
<key>LinksVisible</key>
<string>NO</string>
<key>MagnetsVisible</key>
<string>NO</string>
<key>MasterSheet</key>
<string>Master 1</string>
<key>MasterSheets</key>
<array>
<dict>
<key>ActiveLayerIndex</key>
<integer>0</integer>
<key>AutoAdjust</key>
<false/>
<key>CanvasColor</key>
<dict>
<key>w</key>
<string>1</string>
</dict>
<key>CanvasOrigin</key>
<string>{0, 0}</string>
<key>CanvasScale</key>
<real>1</real>
<key>ColumnAlign</key>
<integer>1</integer>
<key>ColumnSpacing</key>
<real>36</real>
<key>DisplayScale</key>
<string>1 cm = 1 cm</string>
<key>GraphicsList</key>
<array/>
<key>GridInfo</key>
<dict>
<key>GridSpacing</key>
<real>14.17322826385498</real>
<key>MajorGridSpacing</key>
<integer>10</integer>
</dict>
<key>HPages</key>
<integer>1</integer>
<key>IsPalette</key>
<string>NO</string>
<key>KeepToScale</key>
<false/>
<key>Layers</key>
<array>
<dict>
<key>Lock</key>
<string>NO</string>
<key>Name</key>
<string>Layer 1</string>
<key>Print</key>
<string>YES</string>
<key>View</key>
<string>YES</string>
</dict>
</array>
<key>LayoutInfo</key>
<dict/>
<key>Orientation</key>
<integer>2</integer>
<key>OutlineStyle</key>
<string>Basic</string>
<key>RowAlign</key>
<integer>1</integer>
<key>RowSpacing</key>
<real>36</real>
<key>SheetTitle</key>
<string>Master 1</string>
<key>UniqueID</key>
<integer>1</integer>
<key>VPages</key>
<integer>1</integer>
</dict>
</array>
<key>ModificationDate</key>
<string>2013-03-18 08:56:23 +0100</string>
<key>Modifier</key>
<string>Markus Rosenstihl</string>
<key>NotesVisible</key>
<string>NO</string>
<key>Orientation</key>
<integer>2</integer>
<key>OriginVisible</key>
<string>NO</string>
<key>OutlineStyle</key>
<string>Basic</string>
<key>PageBreaks</key>
<string>YES</string>
<key>PrintInfo</key>
<dict>
<key>NSBottomMargin</key>
<array>
<string>coded</string>
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG</string>
</array>
<key>NSLeftMargin</key>
<array>
<string>coded</string>
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG</string>
</array>
<key>NSPaperSize</key>
<array>
<string>size</string>
<string>{595, 842}</string>
</array>
<key>NSRightMargin</key>
<array>
<string>coded</string>
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG</string>
</array>
<key>NSTopMargin</key>
<array>
<string>coded</string>
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG</string>
</array>
</dict>
<key>ReadOnly</key>
<string>NO</string>
<key>RowAlign</key>
<integer>1</integer>
<key>RowSpacing</key>
<real>36</real>
<key>SheetTitle</key>
<string>Arbeitsfläche 1</string>
<key>SmartAlignmentGuidesActive</key>
<string>YES</string>
<key>SmartDistanceGuidesActive</key>
<string>YES</string>
<key>UniqueID</key>
<integer>1</integer>
<key>UseEntirePage</key>
<true/>
<key>VPages</key>
<integer>1</integer>
<key>WindowInfo</key>
<dict>
<key>CurrentSheet</key>
<string>0</string>
<key>DrawerOpen</key>
<false/>
<key>DrawerTab</key>
<string>Outline</string>
<key>DrawerWidth</key>
<real>209</real>
<key>FitInWindow</key>
<false/>
<key>Frame</key>
<string>{{375, 89}, {888, 789}}</string>
<key>ShowRuler</key>
<false/>
<key>ShowStatusBar</key>
<true/>
<key>VisibleRegion</key>
<string>{{-151, 0}, {873, 684}}</string>
<key>Zoom</key>
<string>1</string>
</dict>
</dict>
</plist>

3
icons/qds_icons.svg Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 36 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:07Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" fill="White"/><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 135.89075 141.73227 C 150.06256 122.83652 164.23862 85.03935 178.41043 85.03935 C 192.58224 85.03935 206.7583 122.83652 220.9301 141.73227" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" fill="#fdca00"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
icons/save_fit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
icons/save_fit.qrc Normal file
View File

@ -0,0 +1 @@
<RCC/>

6
icons/save_fit.svg Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="84 362 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-13 14:15Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs><font-face font-size="44pt" units-per-em="1000" underline-position="-67.871094" underline-thickness="103.027344" slope="0" x-height="556.81818" cap-height="738.63635" ascent="1005.37103" descent="-209.96094" font-weight="bold"><!--{
NSFontNameAttribute = "Verdana-Bold";
NSFontSizeAttribute = 44;
}--><font-face-src><font-face-name name="Verdana-Bold"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><rect fill="White" width="571" height="822"/><g><title>Ebene 1</title><path d="M 159.88599 368.50403 L 208.91049 368.50403 C 217.74706 368.50403 224.91049 375.66748 224.91049 384.50403 L 224.91049 480.505 C 224.91049 489.34155 217.74706 496.505 208.91049 496.505 L 110.861504 496.505 C 102.02495 496.505 94.861504 489.34155 94.861504 480.505 L 94.861496 384.50403 C 94.861496 375.66748 102.02494 368.50403 110.861496 368.50403 Z" fill="White"/><path d="M 159.88599 368.50403 L 208.91049 368.50403 C 217.74706 368.50403 224.91049 375.66748 224.91049 384.50403 L 224.91049 480.505 C 224.91049 489.34155 217.74706 496.505 208.91049 496.505 L 110.861504 496.505 C 102.02495 496.505 94.861504 489.34155 94.861504 480.505 L 94.861496 384.50403 C 94.861496 375.66748 102.02494 368.50403 110.861496 368.50403 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 174.05899 396.8531 L 188.23506 396.8531 L 188.23506 382.677 L 202.40263 382.677 L 202.40263 396.8531 L 216.5787 396.8531 L 216.5787 411.02063 L 202.40263 411.02063 L 202.40263 425.19672 L 188.23506 425.19672 L 188.23506 411.02063 L 174.05899 411.02063 Z" fill="#fdca00"/><path d="M 174.05899 396.8531 L 188.23506 396.8531 L 188.23506 382.677 L 202.40263 382.677 L 202.40263 396.8531 L 216.5787 396.8531 L 216.5787 411.02063 L 202.40263 411.02063 L 202.40263 425.19672 L 188.23506 425.19672 L 188.23506 411.02063 L 174.05899 411.02063 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(118.386 427.89001)" fill="Black"><tspan font-size="44pt" font-weight="bold" x=".18554688" y="44" textLength="82.628906">FIT</tspan></text></g></g></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

1905
images_rc.py Normal file

File diff suppressed because it is too large Load Diff