Commit 85529644 authored by Fredrik Edemar's avatar Fredrik Edemar

My first patch. This adds support for drawing antiderivative with Euler's...

My first patch. This adds support for drawing antiderivative with Euler's method, a new plot function dialog, a constant editor, ability to change between radians and degrees + automatic suggestion for function names. Big thanks to pipesmoker and annma on IRC!

svn path=/trunk/kdeedu/kmplot/; revision=311403
parent fd305f9c
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>EditAntiderivativePage</class>
<widget class="QWidget">
<property name="name">
<cstring>EditAntiderivativePage</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>323</width>
<height>314</height>
</rect>
</property>
<property name="caption">
<string>Antiderivative</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>showAntiderivative</cstring>
</property>
<property name="text">
<string>Show Antiderivative</string>
</property>
<property name="toolTip" stdset="0">
<string>hide the plot</string>
</property>
<property name="whatsThis" stdset="0">
<string>Check this box if you want to hide the plot of the function.</string>
</property>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>grpPoint</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>Initial Point</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_5</cstring>
</property>
<property name="text">
<string>&amp;x-value:</string>
</property>
<property name="buddy" stdset="0">
<cstring>txtInitX</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_5_2</cstring>
</property>
<property name="text">
<string>&amp;y-value:</string>
</property>
<property name="buddy" stdset="0">
<cstring>txtInitY</cstring>
</property>
</widget>
<widget class="KLineEdit" row="0" column="1">
<property name="name">
<cstring>txtInitX</cstring>
</property>
</widget>
<widget class="KLineEdit" row="1" column="1">
<property name="name">
<cstring>txtInitY</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>frame5_2_2</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>Box</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2_3</cstring>
</property>
<property name="text">
<string>P&amp;recision:</string>
</property>
<property name="buddy" stdset="0">
<cstring>precision</cstring>
</property>
</widget>
<widget class="KDoubleNumInput" row="1" column="1">
<property name="name">
<cstring>precision</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>customPrecision</cstring>
</property>
<property name="text">
<string>Custom &amp;Precision</string>
</property>
<property name="accel">
<string>Alt+P</string>
</property>
<property name="toolTip" stdset="0">
<string>customize the precision</string>
</property>
</widget>
</grid>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>frame6_3</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>Box</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
<property name="text">
<string>&amp;Color:</string>
</property>
<property name="buddy" stdset="0">
<cstring>colorAntiderivative</cstring>
</property>
</widget>
<widget class="KColorButton" row="1" column="1">
<property name="name">
<cstring>colorAntiderivative</cstring>
</property>
<property name="text">
<string></string>
</property>
<property name="toolTip" stdset="0">
<string>color of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click this button to choose a color for the plot line.</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_3_3</cstring>
</property>
<property name="text">
<string>&amp;Line width:</string>
</property>
<property name="buddy" stdset="0">
<cstring>lineWidthAntiderivative</cstring>
</property>
</widget>
<widget class="KIntNumInput" row="0" column="1">
<property name="name">
<cstring>lineWidthAntiderivative</cstring>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="toolTip" stdset="0">
<string>width of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Change the width of the plot line in steps of 0.1mm.</string>
</property>
</widget>
<widget class="QLabel" row="0" column="2">
<property name="name">
<cstring>TextLabel2_3</cstring>
</property>
<property name="text">
<string>0.1mm</string>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>62</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<customwidgets>
</customwidgets>
<connections>
<connection>
<sender>showAntiderivative</sender>
<signal>toggled(bool)</signal>
<receiver>grpPoint</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showAntiderivative</sender>
<signal>toggled(bool)</signal>
<receiver>frame5_2_2</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showAntiderivative</sender>
<signal>toggled(bool)</signal>
<receiver>frame6_3</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>customPrecision</sender>
<signal>toggled(bool)</signal>
<receiver>precision</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>customPrecision</sender>
<signal>toggled(bool)</signal>
<receiver>textLabel2_2_3</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<tabstops>
<tabstop>showAntiderivative</tabstop>
<tabstop>txtInitX</tabstop>
<tabstop>txtInitY</tabstop>
<tabstop>customPrecision</tabstop>
<tabstop>precision</tabstop>
<tabstop>lineWidthAntiderivative</tabstop>
<tabstop>colorAntiderivative</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
</includehints>
</UI>
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>EditDerivativesPage</class>
<widget class="QWidget">
<property name="name">
<cstring>EditDerivativesPage</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>323</width>
<height>255</height>
</rect>
</property>
<property name="caption">
<string>Edit Derivatives</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QFrame">
<property name="name">
<cstring>grp1der</cstring>
</property>
<property name="frameShape">
<enum>Box</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KColorButton" row="2" column="1">
<property name="name">
<cstring>colorDerivative1</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string></string>
</property>
<property name="toolTip" stdset="0">
<string>color of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click this button to choose a color for the plot line.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>TextLabel2_2_2</cstring>
</property>
<property name="text">
<string>0.1mm</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
<property name="text">
<string>&amp;Color:</string>
</property>
<property name="buddy" stdset="0">
<cstring>colorDerivative1</cstring>
</property>
</widget>
<widget class="KIntNumInput" row="1" column="1">
<property name="name">
<cstring>lineWidthDerivative1</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="toolTip" stdset="0">
<string>width of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Change the width of the plot line in steps of 0.1mm.</string>
</property>
</widget>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>showDerivative1</cstring>
</property>
<property name="text">
<string>show &amp;1st Derivative</string>
</property>
<property name="accel">
<string>Alt+1</string>
</property>
<property name="toolTip" stdset="0">
<string>show first derivative</string>
</property>
<property name="whatsThis" stdset="0">
<string>If this box is checked, the first derivative will be plotted, too.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_3_2_2</cstring>
</property>
<property name="text">
<string>&amp;Line width:</string>
</property>
<property name="buddy" stdset="0">
<cstring>lineWidthDerivative1</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>grp2der</cstring>
</property>
<property name="frameShape">
<enum>Box</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="text">
<string>Colo&amp;r:</string>
</property>
<property name="buddy" stdset="0">
<cstring>colorDerivative2</cstring>
</property>
</widget>
<widget class="KColorButton" row="2" column="1">
<property name="name">
<cstring>colorDerivative2</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string></string>
</property>
<property name="toolTip" stdset="0">
<string>color of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click this button to choose a color for the plot line.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
<property name="text">
<string>Line &amp;width:</string>
</property>
<property name="buddy" stdset="0">
<cstring>lineWidthDerivative2</cstring>
</property>
</widget>
<widget class="KIntNumInput" row="1" column="1">
<property name="name">
<cstring>lineWidthDerivative2</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="toolTip" stdset="0">
<string>width of the plot line</string>
</property>
<property name="whatsThis" stdset="0">
<string>Change the width of the plot line in steps of 0.1mm.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>TextLabel2_2</cstring>
</property>
<property name="text">
<string>0.1mm</string>
</property>
</widget>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>showDerivative2</cstring>
</property>
<property name="text">
<string>show &amp;2nd Derivative</string>
</property>
<property name="accel">
<string>Alt+2</string>
</property>
<property name="toolTip" stdset="0">
<string>show second derivative</string>
</property>
<property name="whatsThis" stdset="0">
<string>If this box is checked, the first derivative will be plotted, too.</string>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>110</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<customwidgets>
</customwidgets>
<connections>
<connection>
<sender>showDerivative1</sender>
<signal>toggled(bool)</signal>
<receiver>lineWidthDerivative1</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showDerivative1</sender>
<signal>toggled(bool)</signal>
<receiver>colorDerivative1</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showDerivative2</sender>
<signal>toggled(bool)</signal>
<receiver>lineWidthDerivative2</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showDerivative2</sender>
<signal>toggled(bool)</signal>
<receiver>colorDerivative2</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>showDerivative1</sender>
<signal>toggled(bool)</signal>
<receiver>textLabel1_3_2_2</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<tabstops>
<tabstop>showDerivative1</tabstop>
<tabstop>lineWidthDerivative1</tabstop>
<tabstop>colorDerivative1</tabstop>
<tabstop>showDerivative2</tabstop>
<tabstop>lineWidthDerivative2</tabstop>
<tabstop>colorDerivative2</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>EditFunctionPage</class>
<widget class="QWidget">
<property name="name">
<cstring>EditFunctionPage</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>312</width>
<height>465</height>
</rect>
</property>
<property name="caption">
<string>Edit Function Plot</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
<property name="title">
<string>Definition</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
<property name="text">
<string>&amp;Equation:</string>
</property>
<property name="buddy" stdset="0">
<cstring>equation</cstring>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>equation</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" stdset="0">
<string>enter an equation, for instance f(x)=x^2</string>
</property>