From a9f3557648135eca0766a51baddf7d39a22a6e01 Mon Sep 17 00:00:00 2001
From: hbui <hong-phuc.bui@htwsaar.de>
Date: Wed, 24 Jul 2024 15:40:46 +0200
Subject: [PATCH] neue Gestaltung
---
num-int/src/numint/guimain.py | 16 +
num-int/src/numint/mainwindow.ui | 272 +++++++++++++--------------------
num-int/src/numint/ui_mainwindow.py | 187 ++++++++++-------------
num-int/src/numint/expression_transformer.py | 2
4 files changed, 200 insertions(+), 277 deletions(-)
diff --git a/num-int/src/numint/expression_transformer.py b/num-int/src/numint/expression_transformer.py
index dc25c6a..2873c5b 100644
--- a/num-int/src/numint/expression_transformer.py
+++ b/num-int/src/numint/expression_transformer.py
@@ -38,7 +38,7 @@
elif hasattr(math, id):
return f"math.{id}"
else:
- raise ValueError(f"{id} must be 'x' one of constants in math module")
+ raise ValueError(f"Variable must be 'x' one of constants in math module, got {id}")
def function(self, name, argv) -> str:
if hasattr(math, name):
diff --git a/num-int/src/numint/guimain.py b/num-int/src/numint/guimain.py
index f810c02..3f90199 100644
--- a/num-int/src/numint/guimain.py
+++ b/num-int/src/numint/guimain.py
@@ -17,6 +17,8 @@
fig = Figure(figsize=(width, height), dpi=dpi)
self.axes = fig.add_subplot(111)
super(PlotCanvas, self).__init__(fig)
+ self.left = 0.0
+ self.right = 0.0
class MainWindow(QMainWindow):
@@ -46,13 +48,13 @@
if epsilon is not None and len(epsilon.strip()) > 0:
eps = parse_value(epsilon)
print(f"plot f(x) = {fn_expr}, {a}, {b}, epsilon = {eps}")
- (self.x, self.y, *_) = numint_epsilon(f, a, b, eps)
+ (self.x, self.y, self.left, self.right, self.num_of_iterations, *_) = numint_epsilon(f, a, b, eps)
self._update_plot_eps()
else:
section = self.ui.section.text()
sec = parse_value(section)
print(f"plot f(x) = {fn_expr}, {a}, {b}, section = {sec}")
- (self.x, self.y, *_) = numint_section(f, a, b, sec)
+ (self.x, self.y, self.left, self.right, self.num_of_iterations, *_) = numint_section(f, a, b, sec)
self._update_plot_eps()
except Exception as ex:
print(ex)
@@ -62,12 +64,16 @@
self.canvas.axes.cla() # Clear the canvas.
# self.canvas.axes.stairs(self.y[1:], self.x, baseline=0, fill=True, alpha=0.5, label=self.fn_expr)
# self.canvas.axes.stairs(self.y[0:-1], self.x, baseline=0, fill=True, alpha=0.5, label=self.fn_expr)
- self.canvas.axes.step(self.x, self.y, color="blue", where="pre", label=self.fn_expr)
- self.canvas.axes.step(self.x, self.y, color="orange", where="post", label=self.fn_expr)
+ self.canvas.axes.step(self.x, self.y, color="blue", where="pre", label="right")
+ self.canvas.axes.step(self.x, self.y, color="orange", where="post", label="left")
- self.canvas.axes.plot(self.x, self.y, color="black")
+ self.canvas.axes.plot(self.x, self.y, color="black", label=self.fn_expr)
self.canvas.draw()
+ self.ui.leftSum.setText(f"{self.left}")
+ self.ui.rightSum.setText(f"{self.right}")
+ self.ui.numOfSections.setText(f"{self.num_of_iterations}")
+
def main():
app = QApplication(sys.argv)
diff --git a/num-int/src/numint/mainwindow.ui b/num-int/src/numint/mainwindow.ui
index 336f6d9..c5069ba 100644
--- a/num-int/src/numint/mainwindow.ui
+++ b/num-int/src/numint/mainwindow.ui
@@ -18,7 +18,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QPlainTextEdit" name="plainTextEdit">
+ <widget class="QPlainTextEdit" name="helpingText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -34,12 +34,12 @@
<bool>true</bool>
</property>
<property name="plainText">
- <string>Die Funktion f(x) kann eine belibige Kombination von arithmetischen Operationen und Python mathematische Funktion in Modul math sein. Einige Beispiele sind:
+ <string>Die Funktion f(x) kann eine beliebige Kombination von arithmetischen Operationen und Python mathematische Funktion in Modul math sein. Einige Beispiele sind:
-x ** 2
-x ** 3
-tan(radians(x))
-sin(x)
+x ** 2 0 4
+x ** 3 0 4
+tan(radians(x)) 0 45
+sin(x)**3 + cos(x)**3 0 2*pi
</string>
</property>
</widget>
@@ -49,43 +49,43 @@
<property name="title">
<string>Angabe der Funktion</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
+ <layout class="QFormLayout" name="formLayout_3">
+ <item row="0" column="0">
<widget class="QLabel" name="label_start">
<property name="text">
<string>Funktion f(x) = </string>
</property>
</widget>
</item>
- <item>
+ <item row="0" column="1">
<widget class="QLineEdit" name="function">
<property name="text">
<string>x ** 2</string>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="0">
<widget class="QLabel" name="label_fn">
<property name="text">
<string>start</string>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="1">
<widget class="QLineEdit" name="startValue">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
- <item>
+ <item row="2" column="0">
<widget class="QLabel" name="label_end">
<property name="text">
<string>end</string>
</property>
</widget>
</item>
- <item>
+ <item row="2" column="1">
<widget class="QLineEdit" name="endValue">
<property name="text">
<string>4</string>
@@ -100,162 +100,52 @@
<property name="title">
<string>Abbuchkriterium</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Maximum Differenz ziwschen Link- und Recht-Summe</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLineEdit" name="espilon">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Epsilon</string>
+ </property>
+ </widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Anzahl der Sektionen</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLineEdit" name="section">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>8</string>
- </property>
- </widget>
- </item>
- </layout>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="espilon">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Anzahl der Sektionen</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="section">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>8</string>
+ </property>
+ </widget>
</item>
</layout>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Riemann Summe</string>
+ <widget class="QPushButton" name="plotBtn">
+ <property name="text">
+ <string>Ok</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>linke Summe</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLineEdit" name="leftSum">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>rechte Summe</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Orientation::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLineEdit" name="rightSum">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
</widget>
</item>
<item>
@@ -272,10 +162,62 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="plotBtn">
- <property name="text">
- <string>Ok</string>
+ <widget class="QGroupBox" name="riemannSumGruppe">
+ <property name="title">
+ <string>Riemann Summe</string>
</property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>linke Summe</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="leftSum">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>rechte Summe</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="rightSum">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Anzahl der Iterationen</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="numOfSections"/>
+ </item>
+ </layout>
</widget>
</item>
</layout>
diff --git a/num-int/src/numint/ui_mainwindow.py b/num-int/src/numint/ui_mainwindow.py
index 9b907f5..b47fd6b 100644
--- a/num-int/src/numint/ui_mainwindow.py
+++ b/num-int/src/numint/ui_mainwindow.py
@@ -15,10 +15,10 @@
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
-from PySide6.QtWidgets import (QApplication, QGroupBox, QHBoxLayout, QLabel,
- QLineEdit, QMainWindow, QMenuBar, QPlainTextEdit,
- QPushButton, QSizePolicy, QSpacerItem, QStatusBar,
- QVBoxLayout, QWidget)
+from PySide6.QtWidgets import (QApplication, QFormLayout, QGroupBox, QHBoxLayout,
+ QLabel, QLineEdit, QMainWindow, QMenuBar,
+ QPlainTextEdit, QPushButton, QSizePolicy, QSpacerItem,
+ QStatusBar, QVBoxLayout, QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@@ -31,71 +31,65 @@
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
- self.plainTextEdit = QPlainTextEdit(self.centralwidget)
- self.plainTextEdit.setObjectName(u"plainTextEdit")
+ self.helpingText = QPlainTextEdit(self.centralwidget)
+ self.helpingText.setObjectName(u"helpingText")
sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.plainTextEdit.sizePolicy().hasHeightForWidth())
- self.plainTextEdit.setSizePolicy(sizePolicy)
+ sizePolicy.setHeightForWidth(self.helpingText.sizePolicy().hasHeightForWidth())
+ self.helpingText.setSizePolicy(sizePolicy)
font = QFont()
font.setFamilies([u"Noto Mono"])
- self.plainTextEdit.setFont(font)
- self.plainTextEdit.setReadOnly(True)
+ self.helpingText.setFont(font)
+ self.helpingText.setReadOnly(True)
- self.verticalLayout.addWidget(self.plainTextEdit)
+ self.verticalLayout.addWidget(self.helpingText)
self.functionInfo = QGroupBox(self.centralwidget)
self.functionInfo.setObjectName(u"functionInfo")
- self.horizontalLayout = QHBoxLayout(self.functionInfo)
- self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.formLayout_3 = QFormLayout(self.functionInfo)
+ self.formLayout_3.setObjectName(u"formLayout_3")
self.label_start = QLabel(self.functionInfo)
self.label_start.setObjectName(u"label_start")
- self.horizontalLayout.addWidget(self.label_start)
+ self.formLayout_3.setWidget(0, QFormLayout.LabelRole, self.label_start)
self.function = QLineEdit(self.functionInfo)
self.function.setObjectName(u"function")
- self.horizontalLayout.addWidget(self.function)
+ self.formLayout_3.setWidget(0, QFormLayout.FieldRole, self.function)
self.label_fn = QLabel(self.functionInfo)
self.label_fn.setObjectName(u"label_fn")
- self.horizontalLayout.addWidget(self.label_fn)
+ self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.label_fn)
self.startValue = QLineEdit(self.functionInfo)
self.startValue.setObjectName(u"startValue")
- self.horizontalLayout.addWidget(self.startValue)
+ self.formLayout_3.setWidget(1, QFormLayout.FieldRole, self.startValue)
self.label_end = QLabel(self.functionInfo)
self.label_end.setObjectName(u"label_end")
- self.horizontalLayout.addWidget(self.label_end)
+ self.formLayout_3.setWidget(2, QFormLayout.LabelRole, self.label_end)
self.endValue = QLineEdit(self.functionInfo)
self.endValue.setObjectName(u"endValue")
- self.horizontalLayout.addWidget(self.endValue)
+ self.formLayout_3.setWidget(2, QFormLayout.FieldRole, self.endValue)
self.verticalLayout.addWidget(self.functionInfo)
self.breakRule = QGroupBox(self.centralwidget)
self.breakRule.setObjectName(u"breakRule")
- self.verticalLayout_3 = QVBoxLayout(self.breakRule)
- self.verticalLayout_3.setObjectName(u"verticalLayout_3")
- self.horizontalLayout_5 = QHBoxLayout()
- self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
+ self.formLayout_2 = QFormLayout(self.breakRule)
+ self.formLayout_2.setObjectName(u"formLayout_2")
self.label_4 = QLabel(self.breakRule)
self.label_4.setObjectName(u"label_4")
- self.horizontalLayout_5.addWidget(self.label_4)
-
- self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
-
- self.horizontalLayout_5.addItem(self.horizontalSpacer_2)
+ self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label_4)
self.espilon = QLineEdit(self.breakRule)
self.espilon.setObjectName(u"espilon")
@@ -105,95 +99,75 @@
sizePolicy1.setHeightForWidth(self.espilon.sizePolicy().hasHeightForWidth())
self.espilon.setSizePolicy(sizePolicy1)
- self.horizontalLayout_5.addWidget(self.espilon)
+ self.formLayout_2.setWidget(0, QFormLayout.FieldRole, self.espilon)
-
- self.verticalLayout_3.addLayout(self.horizontalLayout_5)
-
- self.horizontalLayout_3 = QHBoxLayout()
- self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.label_5 = QLabel(self.breakRule)
self.label_5.setObjectName(u"label_5")
- self.horizontalLayout_3.addWidget(self.label_5)
-
- self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
-
- self.horizontalLayout_3.addItem(self.horizontalSpacer_3)
+ self.formLayout_2.setWidget(1, QFormLayout.LabelRole, self.label_5)
self.section = QLineEdit(self.breakRule)
self.section.setObjectName(u"section")
sizePolicy1.setHeightForWidth(self.section.sizePolicy().hasHeightForWidth())
self.section.setSizePolicy(sizePolicy1)
- self.horizontalLayout_3.addWidget(self.section)
-
-
- self.verticalLayout_3.addLayout(self.horizontalLayout_3)
+ self.formLayout_2.setWidget(1, QFormLayout.FieldRole, self.section)
self.verticalLayout.addWidget(self.breakRule)
- self.groupBox = QGroupBox(self.centralwidget)
- self.groupBox.setObjectName(u"groupBox")
- self.verticalLayout_2 = QVBoxLayout(self.groupBox)
- self.verticalLayout_2.setObjectName(u"verticalLayout_2")
- self.horizontalLayout_6 = QHBoxLayout()
- self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
- self.label = QLabel(self.groupBox)
- self.label.setObjectName(u"label")
-
- self.horizontalLayout_6.addWidget(self.label)
-
- self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
-
- self.horizontalLayout_6.addItem(self.horizontalSpacer)
-
- self.leftSum = QLineEdit(self.groupBox)
- self.leftSum.setObjectName(u"leftSum")
- sizePolicy1.setHeightForWidth(self.leftSum.sizePolicy().hasHeightForWidth())
- self.leftSum.setSizePolicy(sizePolicy1)
- self.leftSum.setReadOnly(True)
-
- self.horizontalLayout_6.addWidget(self.leftSum)
-
-
- self.verticalLayout_2.addLayout(self.horizontalLayout_6)
-
- self.horizontalLayout_4 = QHBoxLayout()
- self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
- self.label_2 = QLabel(self.groupBox)
- self.label_2.setObjectName(u"label_2")
-
- self.horizontalLayout_4.addWidget(self.label_2)
-
- self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
-
- self.horizontalLayout_4.addItem(self.horizontalSpacer_4)
-
- self.rightSum = QLineEdit(self.groupBox)
- self.rightSum.setObjectName(u"rightSum")
- sizePolicy1.setHeightForWidth(self.rightSum.sizePolicy().hasHeightForWidth())
- self.rightSum.setSizePolicy(sizePolicy1)
- self.rightSum.setReadOnly(True)
-
- self.horizontalLayout_4.addWidget(self.rightSum)
-
-
- self.verticalLayout_2.addLayout(self.horizontalLayout_4)
-
-
- self.verticalLayout.addWidget(self.groupBox)
-
- self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
-
- self.verticalLayout.addItem(self.verticalSpacer)
-
self.plotBtn = QPushButton(self.centralwidget)
self.plotBtn.setObjectName(u"plotBtn")
self.verticalLayout.addWidget(self.plotBtn)
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
+
+ self.verticalLayout.addItem(self.verticalSpacer)
+
+ self.riemannSumGruppe = QGroupBox(self.centralwidget)
+ self.riemannSumGruppe.setObjectName(u"riemannSumGruppe")
+ self.formLayout = QFormLayout(self.riemannSumGruppe)
+ self.formLayout.setObjectName(u"formLayout")
+ self.label = QLabel(self.riemannSumGruppe)
+ self.label.setObjectName(u"label")
+
+ self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label)
+
+ self.leftSum = QLineEdit(self.riemannSumGruppe)
+ self.leftSum.setObjectName(u"leftSum")
+ sizePolicy1.setHeightForWidth(self.leftSum.sizePolicy().hasHeightForWidth())
+ self.leftSum.setSizePolicy(sizePolicy1)
+ self.leftSum.setReadOnly(True)
+
+ self.formLayout.setWidget(0, QFormLayout.FieldRole, self.leftSum)
+
+ self.label_2 = QLabel(self.riemannSumGruppe)
+ self.label_2.setObjectName(u"label_2")
+
+ self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label_2)
+
+ self.rightSum = QLineEdit(self.riemannSumGruppe)
+ self.rightSum.setObjectName(u"rightSum")
+ sizePolicy1.setHeightForWidth(self.rightSum.sizePolicy().hasHeightForWidth())
+ self.rightSum.setSizePolicy(sizePolicy1)
+ self.rightSum.setReadOnly(True)
+
+ self.formLayout.setWidget(1, QFormLayout.FieldRole, self.rightSum)
+
+ self.label_3 = QLabel(self.riemannSumGruppe)
+ self.label_3.setObjectName(u"label_3")
+
+ self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_3)
+
+ self.numOfSections = QLineEdit(self.riemannSumGruppe)
+ self.numOfSections.setObjectName(u"numOfSections")
+
+ self.formLayout.setWidget(2, QFormLayout.FieldRole, self.numOfSections)
+
+
+ self.verticalLayout.addWidget(self.riemannSumGruppe)
+
self.horizontalLayout_2.addLayout(self.verticalLayout)
@@ -224,12 +198,12 @@
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Riemann Sum", None))
- self.plainTextEdit.setPlainText(QCoreApplication.translate("MainWindow", u"Die Funktion f(x) kann eine belibige Kombination von arithmetischen Operationen und Python mathematische Funktion in Modul math sein. Einige Beispiele sind:\n"
+ self.helpingText.setPlainText(QCoreApplication.translate("MainWindow", u"Die Funktion f(x) kann eine beliebige Kombination von arithmetischen Operationen und Python mathematische Funktion in Modul math sein. Einige Beispiele sind:\n"
"\n"
-"x ** 2\n"
-"x ** 3\n"
-"tan(radians(x))\n"
-"sin(x)\n"
+"x ** 2 0 4\n"
+"x ** 3 0 4\n"
+"tan(radians(x)) 0 45\n"
+"sin(x)**3 + cos(x)**3 0 2*pi\n"
"", None))
self.functionInfo.setTitle(QCoreApplication.translate("MainWindow", u"Angabe der Funktion", None))
self.label_start.setText(QCoreApplication.translate("MainWindow", u"Funktion f(x) = ", None))
@@ -239,13 +213,14 @@
self.label_end.setText(QCoreApplication.translate("MainWindow", u"end", None))
self.endValue.setText(QCoreApplication.translate("MainWindow", u"4", None))
self.breakRule.setTitle(QCoreApplication.translate("MainWindow", u"Abbuchkriterium", None))
- self.label_4.setText(QCoreApplication.translate("MainWindow", u"Maximum Differenz ziwschen Link- und Recht-Summe", None))
+ self.label_4.setText(QCoreApplication.translate("MainWindow", u"Epsilon", None))
self.label_5.setText(QCoreApplication.translate("MainWindow", u"Anzahl der Sektionen", None))
self.section.setText(QCoreApplication.translate("MainWindow", u"8", None))
- self.groupBox.setTitle(QCoreApplication.translate("MainWindow", u"Riemann Summe", None))
+ self.plotBtn.setText(QCoreApplication.translate("MainWindow", u"Ok", None))
+ self.riemannSumGruppe.setTitle(QCoreApplication.translate("MainWindow", u"Riemann Summe", None))
self.label.setText(QCoreApplication.translate("MainWindow", u"linke Summe", None))
self.label_2.setText(QCoreApplication.translate("MainWindow", u"rechte Summe", None))
- self.plotBtn.setText(QCoreApplication.translate("MainWindow", u"Ok", None))
+ self.label_3.setText(QCoreApplication.translate("MainWindow", u"Anzahl der Iterationen", None))
self.plotBox.setTitle(QCoreApplication.translate("MainWindow", u"Plot", None))
# retranslateUi
--
Gitblit v1.10.0