Fix issue with Triangle methods not outputing error.
- Fix issue with triangle methods not outputing error. - Refactored code-base
This commit is contained in:
parent
cff624c56e
commit
f85736e1a4
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
BasedOnStyle: Chromium
|
||||
AlignConsecutiveAssignments: 'true'
|
||||
AlignConsecutiveDeclarations: 'true'
|
||||
AlignTrailingComments: 'true'
|
||||
AllowShortBlocksOnASingleLine: 'true'
|
||||
AllowShortCaseLabelsOnASingleLine: 'true'
|
||||
AllowShortFunctionsOnASingleLine: 'true'
|
||||
AllowShortIfStatementsOnASingleLine: 'true'
|
||||
AllowShortLoopsOnASingleLine: 'true'
|
||||
AlwaysBreakBeforeMultilineStrings: 'true'
|
||||
AlwaysBreakTemplateDeclarations: 'Yes'
|
||||
ColumnLimit: '80'
|
||||
CompactNamespaces: 'false'
|
||||
Language: Cpp
|
||||
PointerAlignment: Left
|
||||
SortIncludes: 'false'
|
||||
SortUsingDeclarations: 'false'
|
||||
Standard: Auto
|
||||
TabWidth: '4'
|
||||
UseTab: Always
|
||||
|
||||
...
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
project("upperlowerBounds")
|
||||
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
@ -40,7 +40,7 @@ add_executable(
|
|||
../src/methods/circle/area.cpp
|
||||
../src/methods/circle/perimeter.cpp
|
||||
tests/CircleTest.cpp
|
||||
)
|
||||
)
|
||||
|
||||
# Equ-Triangle Test.
|
||||
add_executable(
|
||||
|
@ -51,7 +51,7 @@ add_executable(
|
|||
../src/methods/equ_triangle/perimeter.cpp
|
||||
../src/methods/equ_triangle/height.cpp
|
||||
tests/EquTriangleTests.cpp
|
||||
)
|
||||
)
|
||||
|
||||
# Triangle Test.
|
||||
add_executable(
|
||||
|
@ -61,7 +61,7 @@ add_executable(
|
|||
../src/methods/triangle/area.cpp
|
||||
../src/methods/triangle/perimeter.cpp
|
||||
tests/TriangleTests.cpp
|
||||
)
|
||||
)
|
||||
|
||||
# Parellelogram Test.
|
||||
add_executable(
|
||||
|
@ -71,7 +71,7 @@ add_executable(
|
|||
../src/methods/parallelogram/area.cpp
|
||||
../src/methods/parallelogram/perimeter.cpp
|
||||
tests/ParallelogramTest.cpp
|
||||
)
|
||||
)
|
||||
|
||||
# Rectangle Test.
|
||||
add_executable(
|
||||
|
@ -81,7 +81,7 @@ add_executable(
|
|||
../src/methods/rectangle/area.cpp
|
||||
../src/methods/rectangle/perimeter.cpp
|
||||
tests/RectangleTest.cpp
|
||||
)
|
||||
)
|
||||
|
||||
# Square Test.
|
||||
add_executable(
|
||||
|
@ -91,5 +91,5 @@ add_executable(
|
|||
../src/methods/square/area.cpp
|
||||
../src/methods/square/perimeter.cpp
|
||||
tests/SquareTests.cpp
|
||||
)
|
||||
)
|
||||
|
||||
|
|
82
README.md
82
README.md
|
@ -14,73 +14,73 @@ The following instructions are for compiling from sources.
|
|||
|
||||
To install dependencies/tools/libraries, the easy way (using nix):
|
||||
|
||||
```s
|
||||
nix-shell
|
||||
```
|
||||
```s
|
||||
nix-shell
|
||||
```
|
||||
|
||||
And you will get a shell with the appropiate requirements to build the project.
|
||||
And you will get a shell with the appropiate requirements to build the project.
|
||||
|
||||
#### Using ```Ubuntu```:
|
||||
|
||||
```s
|
||||
sudo apt install build-essential cmake gcc qt5-default
|
||||
```
|
||||
```s
|
||||
sudo apt install build-essential cmake gcc qt5-default
|
||||
```
|
||||
#### Using ```arch```:
|
||||
|
||||
```s
|
||||
pacman -S gcc make cmake qt5-base
|
||||
```
|
||||
```s
|
||||
pacman -S gcc make cmake qt5-base
|
||||
```
|
||||
|
||||
#### Using ```gentoo```:
|
||||
|
||||
```s
|
||||
sudo emerge --ask sys-devel/gcc sys-devel/make dev-qt
|
||||
```
|
||||
```s
|
||||
sudo emerge --ask sys-devel/gcc sys-devel/make dev-qt
|
||||
```
|
||||
|
||||
### Compiling
|
||||
|
||||
To compile test cases(Debug):
|
||||
To compile test cases(Debug):
|
||||
|
||||
```s
|
||||
./build.sh
|
||||
```
|
||||
```s
|
||||
./build.sh
|
||||
```
|
||||
|
||||
To compile test cases(Release):
|
||||
To compile test cases(Release):
|
||||
|
||||
```s
|
||||
./buildRelease.sh
|
||||
```
|
||||
```s
|
||||
./buildRelease.sh
|
||||
```
|
||||
|
||||
To cross-compile for windows test cases(Debug):
|
||||
To cross-compile for windows test cases(Debug):
|
||||
|
||||
```s
|
||||
./buildWin32.sh
|
||||
```
|
||||
```s
|
||||
./buildWin32.sh
|
||||
```
|
||||
|
||||
To compile test cases(Release):
|
||||
To compile test cases(Release):
|
||||
|
||||
```s
|
||||
./buildWin32Release.sh
|
||||
```
|
||||
```s
|
||||
./buildWin32Release.sh
|
||||
```
|
||||
|
||||
To compile gui(Debug):
|
||||
To compile gui(Debug):
|
||||
|
||||
```s
|
||||
./buildGui.sh
|
||||
```
|
||||
```s
|
||||
./buildGui.sh
|
||||
```
|
||||
|
||||
To compile gui(Release):
|
||||
To compile gui(Release):
|
||||
|
||||
```s
|
||||
./buildGuiRelease.sh
|
||||
```
|
||||
```s
|
||||
./buildGuiRelease.sh
|
||||
```
|
||||
|
||||
### Running the Tests
|
||||
|
||||
```s
|
||||
./runTests.sh
|
||||
```
|
||||
```s
|
||||
./runTests.sh
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License.
|
||||
This project is licensed under the MIT License.
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
# 2D Geometry Formulas
|
||||
|
||||
### Square
|
||||
s=side
|
||||
Area: A=s^2
|
||||
Perimeter: P=4s
|
||||
s=side
|
||||
Area: A=s^2
|
||||
Perimeter: P=4s
|
||||
|
||||
### Rectangle
|
||||
l=length, w=width
|
||||
Area= A=lw
|
||||
Perimeter: P=2l+2w
|
||||
l=length, w=width
|
||||
Area= A=lw
|
||||
Perimeter: P=2l+2w
|
||||
|
||||
### Triangle
|
||||
b=base, h=height
|
||||
Area: A=(1/2)bh
|
||||
Perimeter: P=a+b+c
|
||||
b=base, h=height
|
||||
Area: A=(1/2)bh
|
||||
Perimeter: P=a+b+c
|
||||
|
||||
### Equilateral Triangle
|
||||
s=side
|
||||
Height: h=s(sqrt(3)/2)
|
||||
Area: A=(sqrt(3)/2)s^2
|
||||
Perimeter: P=3s
|
||||
s=side
|
||||
Height: h=s(sqrt(3)/2)
|
||||
Area: A=(sqrt(3)/2)s^2
|
||||
Perimeter: P=3s
|
||||
|
||||
### Parallelogram
|
||||
b=base, h=height, a=side
|
||||
Area: A=bh
|
||||
Perimeter: P=2a+2b
|
||||
b=base, h=height, a=side
|
||||
Area: A=bh
|
||||
Perimeter: P=2a+2b
|
||||
|
||||
### Circle
|
||||
r=radius, d=diameter
|
||||
Diameter: d=2r
|
||||
Area: A=PIr^2
|
||||
Circumference: C=2PIr=PId
|
||||
r=radius, d=diameter
|
||||
Diameter: d=2r
|
||||
Area: A=PIr^2
|
||||
Circumference: C=2PIr=PId
|
||||
|
||||
## Upper and Lower bounds rules.
|
||||
UB=UB+UB
|
||||
UB=UB*UB
|
||||
LB=LB+LB
|
||||
LB=LB*LB
|
||||
UB=UB+UB
|
||||
UB=UB*UB
|
||||
LB=LB+LB
|
||||
LB=LB*LB
|
||||
|
||||
UB=UB/LB
|
||||
UB=UB-LB
|
||||
LB=LB/UB
|
||||
LB=LB-UB
|
||||
UB=UB/LB
|
||||
UB=UB-LB
|
||||
LB=LB/UB
|
||||
LB=LB-UB
|
||||
|
||||
|
|
124
bounds.pro
124
bounds.pro
|
@ -3,71 +3,71 @@ TARGET = upperlowerBounds
|
|||
CONFIG += object_parallel_to_source
|
||||
CONFIG += c++17
|
||||
INCLUDEPATH += src \
|
||||
src/methods \
|
||||
src/gui \
|
||||
src/methods \
|
||||
src/gui \
|
||||
|
||||
FORMS += \
|
||||
src/gui/circle_area.ui \
|
||||
src/gui/circle_perimeter.ui \
|
||||
src/gui/equ_trian_area.ui \
|
||||
src/gui/equ_trian_perimeter.ui \
|
||||
src/gui/mainWindow.ui \
|
||||
src/gui/parallelogram_area.ui \
|
||||
src/gui/parallelogram_perimeter.ui \
|
||||
src/gui/rectangle_area.ui \
|
||||
src/gui/rectangle_perimeter.ui \
|
||||
src/gui/square_area.ui \
|
||||
src/gui/square_perimeter.ui \
|
||||
src/gui/triangle_area.ui \
|
||||
src/gui/triangle_perimeter.ui
|
||||
src/gui/circle_area.ui \
|
||||
src/gui/circle_perimeter.ui \
|
||||
src/gui/equ_trian_area.ui \
|
||||
src/gui/equ_trian_perimeter.ui \
|
||||
src/gui/mainWindow.ui \
|
||||
src/gui/parallelogram_area.ui \
|
||||
src/gui/parallelogram_perimeter.ui \
|
||||
src/gui/rectangle_area.ui \
|
||||
src/gui/rectangle_perimeter.ui \
|
||||
src/gui/square_area.ui \
|
||||
src/gui/square_perimeter.ui \
|
||||
src/gui/triangle_area.ui \
|
||||
src/gui/triangle_perimeter.ui
|
||||
|
||||
HEADERS += \
|
||||
src/gui/circleAreaWindow.h \
|
||||
src/gui/circlePerimeterWindow.h \
|
||||
src/gui/equTrianAreaWindow.h \
|
||||
src/gui/equTrianPerimeterWindow.h \
|
||||
src/gui/mainWindow.h \
|
||||
src/gui/parallelogramAreaWindow.h \
|
||||
src/gui/parallelogramPerimeterWindow.h \
|
||||
src/gui/rectangleAreaWindow.h \
|
||||
src/gui/rectanglePerimeterWindow.h \
|
||||
src/gui/squareAreaWindow.h \
|
||||
src/gui/squarePerimeterWindow.h \
|
||||
src/gui/triangleAreaWindow.h \
|
||||
src/gui/trianglePerimeterWindow.h \
|
||||
src/methods/circle/circle.h \
|
||||
src/methods/equ_triangle/equ_triangle.h \
|
||||
src/methods/triangle/triangle.h \
|
||||
src/methods/parallelogram/parallelogram.h \
|
||||
src/methods/rectangle/rectangle.h \
|
||||
src/methods/square/square.h \
|
||||
src/defs.h
|
||||
src/gui/circleAreaWindow.h \
|
||||
src/gui/circlePerimeterWindow.h \
|
||||
src/gui/equTrianAreaWindow.h \
|
||||
src/gui/equTrianPerimeterWindow.h \
|
||||
src/gui/mainWindow.h \
|
||||
src/gui/parallelogramAreaWindow.h \
|
||||
src/gui/parallelogramPerimeterWindow.h \
|
||||
src/gui/rectangleAreaWindow.h \
|
||||
src/gui/rectanglePerimeterWindow.h \
|
||||
src/gui/squareAreaWindow.h \
|
||||
src/gui/squarePerimeterWindow.h \
|
||||
src/gui/triangleAreaWindow.h \
|
||||
src/gui/trianglePerimeterWindow.h \
|
||||
src/methods/circle/circle.h \
|
||||
src/methods/equ_triangle/equ_triangle.h \
|
||||
src/methods/triangle/triangle.h \
|
||||
src/methods/parallelogram/parallelogram.h \
|
||||
src/methods/rectangle/rectangle.h \
|
||||
src/methods/square/square.h \
|
||||
src/defs.h
|
||||
|
||||
SOURCES += \
|
||||
src/gui/circleAreaWindow.cpp \
|
||||
src/gui/circlePerimeterWindow.cpp \
|
||||
src/gui/equTrianAreaWindow.cpp \
|
||||
src/gui/main.cpp \
|
||||
src/gui/mainWindow.cpp \
|
||||
src/gui/parallelogramAreaWindow.cpp \
|
||||
src/gui/parallelogramPerimeterWindow.cpp \
|
||||
src/gui/rectangleAreaWindow.cpp \
|
||||
src/gui/rectanglePerimeterWindow.cpp \
|
||||
src/gui/squareAreaWindow.cpp \
|
||||
src/gui/squarePerimeterWindow.cpp \
|
||||
src/gui/triangleAreaWindow.cpp \
|
||||
src/gui/trianglePerimeterWindow.cpp \
|
||||
src/methods/circle/area.cpp \
|
||||
src/methods/circle/perimeter.cpp \
|
||||
src/methods/equ_triangle/area.cpp \
|
||||
src/methods/equ_triangle/height.cpp \
|
||||
src/methods/equ_triangle/perimeter.cpp \
|
||||
src/methods/triangle/area.cpp \
|
||||
src/methods/triangle/perimeter.cpp \
|
||||
src/methods/parallelogram/area.cpp \
|
||||
src/methods/parallelogram/perimeter.cpp \
|
||||
src/methods/rectangle/area.cpp \
|
||||
src/methods/rectangle/perimeter.cpp \
|
||||
src/methods/square/area.cpp \
|
||||
src/methods/square/perimeter.cpp \
|
||||
src/gui/equTrianPerimeterwindow.cpp
|
||||
src/gui/circleAreaWindow.cpp \
|
||||
src/gui/circlePerimeterWindow.cpp \
|
||||
src/gui/equTrianAreaWindow.cpp \
|
||||
src/gui/main.cpp \
|
||||
src/gui/mainWindow.cpp \
|
||||
src/gui/parallelogramAreaWindow.cpp \
|
||||
src/gui/parallelogramPerimeterWindow.cpp \
|
||||
src/gui/rectangleAreaWindow.cpp \
|
||||
src/gui/rectanglePerimeterWindow.cpp \
|
||||
src/gui/squareAreaWindow.cpp \
|
||||
src/gui/squarePerimeterWindow.cpp \
|
||||
src/gui/triangleAreaWindow.cpp \
|
||||
src/gui/trianglePerimeterWindow.cpp \
|
||||
src/methods/circle/area.cpp \
|
||||
src/methods/circle/perimeter.cpp \
|
||||
src/methods/equ_triangle/area.cpp \
|
||||
src/methods/equ_triangle/height.cpp \
|
||||
src/methods/equ_triangle/perimeter.cpp \
|
||||
src/methods/triangle/area.cpp \
|
||||
src/methods/triangle/perimeter.cpp \
|
||||
src/methods/parallelogram/area.cpp \
|
||||
src/methods/parallelogram/perimeter.cpp \
|
||||
src/methods/rectangle/area.cpp \
|
||||
src/methods/rectangle/perimeter.cpp \
|
||||
src/methods/square/area.cpp \
|
||||
src/methods/square/perimeter.cpp \
|
||||
src/gui/equTrianPerimeterwindow.cpp
|
||||
|
|
|
@ -6,7 +6,7 @@ CircleAreaWin::CircleAreaWin(QWidget* parent)
|
|||
areaText->setValidator(new QDoubleValidator());
|
||||
radiusText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void CircleAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class CircleAreaWin : public QDialog, private Ui::circleArea {
|
|||
public:
|
||||
explicit CircleAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@ CirclePerimeterWin::CirclePerimeterWin(QWidget* parent)
|
|||
radiusText->setValidator(new QDoubleValidator());
|
||||
diameterText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void CirclePerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class CirclePerimeterWin : public QDialog, private Ui::circlePerimeter {
|
|||
public:
|
||||
explicit CirclePerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,91 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>circleArea</class>
|
||||
<widget class="QDialog" name="circleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>316</width>
|
||||
<height>259</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Circle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>4</x>
|
||||
<y>2</y>
|
||||
<width>308</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Radius:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="radiusText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTextEdit" name="plainTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>circleArea</class>
|
||||
<widget class="QDialog" name="circleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>316</width>
|
||||
<height>259</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Circle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>4</x>
|
||||
<y>2</y>
|
||||
<width>308</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Radius:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="radiusText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTextEdit" name="plainTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>circlePerimeter</class>
|
||||
<widget class="QDialog" name="circlePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>347</width>
|
||||
<height>285</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Circle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>346</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Radius:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="radiusText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Diameter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="diameterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>circlePerimeter</class>
|
||||
<widget class="QDialog" name="circlePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>347</width>
|
||||
<height>285</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Circle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>346</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Radius:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="radiusText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Diameter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="diameterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -6,7 +6,7 @@ EquTrianAreaWin::EquTrianAreaWin(QWidget* parent)
|
|||
areaText->setValidator(new QDoubleValidator());
|
||||
sideText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void EquTrianAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class EquTrianAreaWin : public QDialog, private Ui::equTrianArea {
|
|||
public:
|
||||
explicit EquTrianAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,8 +18,8 @@ class EquTrianPerimeterWin : public QDialog, private Ui::equTrianPerimeter {
|
|||
public:
|
||||
explicit EquTrianPerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@ EquTrianPerimeterWin::EquTrianPerimeterWin(QWidget* parent)
|
|||
perimeterText->setValidator(new QDoubleValidator());
|
||||
sideText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void EquTrianPerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>equTrianArea</class>
|
||||
<widget class="QDialog" name="equTrianArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>302</width>
|
||||
<height>260</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Equilateral Triangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>3</x>
|
||||
<y>4</y>
|
||||
<width>295</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>equTrianArea</class>
|
||||
<widget class="QDialog" name="equTrianArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>302</width>
|
||||
<height>260</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Equilateral Triangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>3</x>
|
||||
<y>4</y>
|
||||
<width>295</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>equTrianPerimeter</class>
|
||||
<widget class="QDialog" name="equTrianPerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>327</width>
|
||||
<height>263</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Equilateral Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>322</width>
|
||||
<height>258</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" rowspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" rowspan="2">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>equTrianPerimeter</class>
|
||||
<widget class="QDialog" name="equTrianPerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>327</width>
|
||||
<height>263</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Equilateral Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>322</width>
|
||||
<height>258</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" rowspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" rowspan="2">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
MainWin::MainWin(QWidget* parent)
|
||||
: QMainWindow(parent) {
|
||||
setupUi(this);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWin::on_selectBtn_clicked() {
|
||||
QString sval = formulaBox->currentText();
|
||||
|
|
|
@ -29,8 +29,8 @@ class MainWin : public QMainWindow, private Ui::MainWindow {
|
|||
public:
|
||||
explicit MainWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_selectBtn_clicked();
|
||||
private slots:
|
||||
void on_selectBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,149 +1,149 @@
|
|||
<?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>492</width>
|
||||
<height>408</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Upper-Lower Bounds</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>80</y>
|
||||
<width>300</width>
|
||||
<height>237</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lower</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upper</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="formulaBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Rectangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Rectangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Triangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Equilateral Triangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Equilateral Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parallelogram Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parallelogram Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectBtn">
|
||||
<property name="text">
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>492</width>
|
||||
<height>408</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Upper-Lower Bounds</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>80</y>
|
||||
<width>300</width>
|
||||
<height>237</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lower</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>28</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upper</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="formulaBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Square Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Rectangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Rectangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Triangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Equilateral Triangle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Equilateral Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parallelogram Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parallelogram Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circle Formula: Area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circle Formula: Perimeter</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectBtn">
|
||||
<property name="text">
|
||||
<string>Select</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -7,7 +7,7 @@ ParallelogramAreaWin::ParallelogramAreaWin(QWidget* parent)
|
|||
heightText->setValidator(new QDoubleValidator());
|
||||
baseText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void ParallelogramAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class ParallelogramAreaWin : public QDialog, private Ui::parallelogramArea {
|
|||
public:
|
||||
explicit ParallelogramAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@ ParallelogramPerimeterWin::ParallelogramPerimeterWin(QWidget* parent)
|
|||
heightText->setValidator(new QDoubleValidator());
|
||||
baseText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void ParallelogramPerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class ParallelogramPerimeterWin : public QDialog, private Ui::parallelogramPerim
|
|||
public:
|
||||
explicit ParallelogramPerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>parallelogramArea</class>
|
||||
<widget class="QDialog" name="parallelogramArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>308</width>
|
||||
<height>283</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Parallelogram Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>305</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>parallelogramArea</class>
|
||||
<widget class="QDialog" name="parallelogramArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>308</width>
|
||||
<height>283</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Parallelogram Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>305</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>parallelogramPerimeter</class>
|
||||
<widget class="QDialog" name="parallelogramPerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>339</width>
|
||||
<height>288</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Parallelogram Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>332</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>parallelogramPerimeter</class>
|
||||
<widget class="QDialog" name="parallelogramPerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>339</width>
|
||||
<height>288</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Parallelogram Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>332</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -7,7 +7,7 @@ RectangleAreaWin::RectangleAreaWin(QWidget* parent)
|
|||
lengthText->setValidator(new QDoubleValidator());
|
||||
widthText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void RectangleAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class RectangleAreaWin : public QDialog, private Ui::rectangleArea {
|
|||
public:
|
||||
explicit RectangleAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@ RectanglePerimeterWin::RectanglePerimeterWin(QWidget* parent)
|
|||
lengthText->setValidator(new QDoubleValidator());
|
||||
widthText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void RectanglePerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class RectanglePerimeterWin : public QDialog, private Ui::rectanglePerimeter {
|
|||
public:
|
||||
explicit RectanglePerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>rectangleArea</class>
|
||||
<widget class="QDialog" name="rectangleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>309</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Rectangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>2</y>
|
||||
<width>308</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Length:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lengthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="widthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>rectangleArea</class>
|
||||
<widget class="QDialog" name="rectangleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>309</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Rectangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>2</y>
|
||||
<width>308</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Length:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lengthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="widthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>rectanglePerimeter</class>
|
||||
<widget class="QDialog" name="rectanglePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>338</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Rectangle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-2</x>
|
||||
<y>2</y>
|
||||
<width>335</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Length:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lengthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="widthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>rectanglePerimeter</class>
|
||||
<widget class="QDialog" name="rectanglePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>338</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Rectangle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-2</x>
|
||||
<y>2</y>
|
||||
<width>335</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Length:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="lengthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="widthText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -6,7 +6,7 @@ SquareAreaWin::SquareAreaWin(QWidget* parent)
|
|||
areaText->setValidator(new QDoubleValidator());
|
||||
sideText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void SquareAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class SquareAreaWin : public QDialog, private Ui::squareArea {
|
|||
public:
|
||||
explicit SquareAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@ SquarePerimeterWin::SquarePerimeterWin(QWidget* parent)
|
|||
perimeterText->setValidator(new QDoubleValidator());
|
||||
sideText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void SquarePerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class SquarePerimeterWin : public QDialog, private Ui::squarePerimter {
|
|||
public:
|
||||
explicit SquarePerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>squareArea</class>
|
||||
<widget class="QDialog" name="squareArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>260</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Square Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>295</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>squareArea</class>
|
||||
<widget class="QDialog" name="squareArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>260</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Square Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>295</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>squarePerimter</class>
|
||||
<widget class="QDialog" name="squarePerimter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>324</width>
|
||||
<height>259</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Square Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-2</x>
|
||||
<y>2</y>
|
||||
<width>322</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>squarePerimter</class>
|
||||
<widget class="QDialog" name="squarePerimter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>324</width>
|
||||
<height>259</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Square Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-2</x>
|
||||
<y>2</y>
|
||||
<width>322</width>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Perimeter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="sideText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -7,7 +7,7 @@ TrianAreaWin::TrianAreaWin(QWidget* parent)
|
|||
heightText->setValidator(new QDoubleValidator());
|
||||
baseText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void TrianAreaWin::on_calculateBtn_clicked() {
|
||||
if (areaText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class TrianAreaWin : public QDialog, private Ui::triangleArea {
|
|||
public:
|
||||
explicit TrianAreaWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@ TrianPerimeterWin::TrianPerimeterWin(QWidget* parent)
|
|||
sideBText->setValidator(new QDoubleValidator());
|
||||
sideCText->setValidator(new QDoubleValidator());
|
||||
maxErrorText->setValidator(new QDoubleValidator());
|
||||
}
|
||||
}
|
||||
|
||||
void TrianPerimeterWin::on_calculateBtn_clicked() {
|
||||
if (perimeterText->text().toStdString() == "" ||
|
||||
|
|
|
@ -18,8 +18,8 @@ class TrianPerimeterWin : public QDialog, private Ui::trianglePerimeter {
|
|||
public:
|
||||
explicit TrianPerimeterWin(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
private slots:
|
||||
void on_calculateBtn_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>triangleArea</class>
|
||||
<widget class="QDialog" name="triangleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>307</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Triangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>2</y>
|
||||
<width>305</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>triangleArea</class>
|
||||
<widget class="QDialog" name="triangleArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>307</width>
|
||||
<height>287</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Triangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>2</y>
|
||||
<width>305</width>
|
||||
<height>280</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="areaText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="heightText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Base:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="baseText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,121 +1,121 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>trianglePerimeter</class>
|
||||
<widget class="QDialog" name="trianglePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>298</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Triangle Formula: Area</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>4</y>
|
||||
<width>41</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>4</y>
|
||||
<width>399</width>
|
||||
<height>289</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side A:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLineEdit" name="sideAText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Side C:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="sideCText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Side B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="sideBText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<class>trianglePerimeter</class>
|
||||
<widget class="QDialog" name="trianglePerimeter">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>298</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Triangle Formula: Perimeter</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>2</x>
|
||||
<y>4</y>
|
||||
<width>41</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Area:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>4</y>
|
||||
<width>399</width>
|
||||
<height>289</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Side A:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLineEdit" name="sideAText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Side C:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="sideCText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Side B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="sideBText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="maxErrorText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="2">
|
||||
<widget class="QPushButton" name="calculateBtn">
|
||||
<property name="text">
|
||||
<string>Calculate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>ME:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="perimeterText">
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
auto etrian_calc_area(float me, float s, float a)->uplowBounds {
|
||||
auto answer = uplowBounds();
|
||||
|
||||
|
||||
if (a == 0.0f && s != 0.0f) {
|
||||
answer.s_lower = (sqrt(3)/4)*(pow(s-me,2));
|
||||
answer.s_upper = (sqrt(3)/4)*(pow(s+me,2));
|
||||
|
|
|
@ -1,31 +1,34 @@
|
|||
#include "triangle.h"
|
||||
|
||||
auto trian_calc_area(float me, float a, float b, float h)->uplowBounds {
|
||||
auto trian_calc_area(float me, float a, float b, float h) -> uplowBounds {
|
||||
auto answer = uplowBounds();
|
||||
|
||||
if (a == 0.0f && (b != 0.0f || h != 0.0f)) {
|
||||
if (b != 0.0f && h != 0.0f) {
|
||||
answer.s_lower = (0.5f)*(b-me)*(h-me);
|
||||
answer.s_upper = (0.5f)*(b+me)*(h+me);
|
||||
answer.s_lower = (0.5f) * (b - me) * (h - me);
|
||||
answer.s_upper = (0.5f) * (b + me) * (h + me);
|
||||
return answer;
|
||||
}
|
||||
else
|
||||
throw std::invalid_argument("When calculating area of triangle, both height and base must be given.");
|
||||
}
|
||||
else if (a != 0.0f && (b == 0.0f || h == 0.0f)) {
|
||||
} else
|
||||
throw std::invalid_argument("When calculating area of triangle, both "
|
||||
"height and base must be given.");
|
||||
} else if (a != 0.0f && (b == 0.0f || h == 0.0f)) {
|
||||
if (b == 0.0f && h == 0.0f)
|
||||
throw std::invalid_argument("When calculating base or height from area, atleast one of base or height must be given.");
|
||||
throw std::invalid_argument(
|
||||
"When calculating base or height from area, atleast one of base or "
|
||||
"height must be given.");
|
||||
else if (b == 0.0f && h != 0.0f) {
|
||||
answer.s_lower = 2*((a-me)/(h+me));
|
||||
answer.s_upper = 2*((a+me)/(h-me));
|
||||
answer.s_lower = 2 * ((a - me) / (h + me));
|
||||
answer.s_upper = 2 * ((a + me) / (h - me));
|
||||
return answer;
|
||||
} else if (h == 0.0f && b != 0.0f) {
|
||||
answer.s_lower = 2 * ((a - me) / (b + me));
|
||||
answer.s_upper = 2 * ((a + me) / (b - me));
|
||||
return answer;
|
||||
}
|
||||
else if (h == 0.0f && b != 0.0f) {
|
||||
answer.s_lower = 2*((a-me)/(b+me));
|
||||
answer.s_upper = 2*((a+me)/(b-me));
|
||||
return answer;
|
||||
}
|
||||
}
|
||||
} else if (a == 0.0f && b == 0.0f && h == 0.0f)
|
||||
throw std::invalid_argument("Nothing computes to nothing.");
|
||||
else if (a != 0.0f && b != 0.0f && h != 0.0f)
|
||||
throw std::invalid_argument("Everything is given, you should probably "
|
||||
"reconsider your life decisions.");
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,35 +1,42 @@
|
|||
#include "triangle.h"
|
||||
|
||||
auto trian_calc_perimeter(float me, float p, float a, float b, float c)->uplowBounds {
|
||||
auto answer = uplowBounds();
|
||||
auto trian_calc_perimeter(float me, float p, float a, float b, float c)
|
||||
-> uplowBounds {
|
||||
auto answer = uplowBounds();
|
||||
|
||||
if (p == 0.0f && (a != 0.0f || b != 0.0f || c != 0.0f)) {
|
||||
if (a != 0.0f && b != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (a-me)+(b-me)+(c-me);
|
||||
answer.s_upper = (a+me)+(b+me)+(c+me);
|
||||
return answer;
|
||||
}
|
||||
else throw std::invalid_argument("When calculating for triangle perimeter, all sides length's must be present.");
|
||||
}
|
||||
else if (p != 0.0f && (a == 0.0f || b == 0.0f || c == 0.0f)) {
|
||||
if (a == 0.0f && b == 0.0f && c == 0.0f)
|
||||
throw std::invalid_argument("When calculating one of the sides, a, b, or c, atleast two must be given.");
|
||||
else if (a == 0.0f && b != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (p-me)-((b+me)+(c+me));
|
||||
answer.s_upper = (p+me)-((b-me)+(c-me));
|
||||
return answer;
|
||||
}
|
||||
else if (b == 0.0f && a != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (p-me)-((a+me)+(c+me));
|
||||
answer.s_upper = (p+me)-((a-me)+(c-me));
|
||||
return answer;
|
||||
}
|
||||
else if (c == 0.0f && a != 0.0f && b != 0.0f) {
|
||||
answer.s_lower = (p-me)-((a+me)+(b+me));
|
||||
answer.s_upper = (p+me)-((a-me)+(b-me));
|
||||
return answer;
|
||||
}
|
||||
}
|
||||
if (p == 0.0f && (a != 0.0f || b != 0.0f || c != 0.0f)) {
|
||||
if (a != 0.0f && b != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (a - me) + (b - me) + (c - me);
|
||||
answer.s_upper = (a + me) + (b + me) + (c + me);
|
||||
return answer;
|
||||
} else
|
||||
throw std::invalid_argument(
|
||||
"When calculating for triangle perimeter, "
|
||||
"all sides length's must be present.");
|
||||
} else if (p != 0.0f && (a == 0.0f || b == 0.0f || c == 0.0f)) {
|
||||
if (a == 0.0f && b == 0.0f && c == 0.0f)
|
||||
throw std::invalid_argument(
|
||||
"When calculating one of the sides, a, b, or "
|
||||
"c, atleast two must be given.");
|
||||
else if (a == 0.0f && b != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (p - me) - ((b + me) + (c + me));
|
||||
answer.s_upper = (p + me) - ((b - me) + (c - me));
|
||||
return answer;
|
||||
} else if (b == 0.0f && a != 0.0f && c != 0.0f) {
|
||||
answer.s_lower = (p - me) - ((a + me) + (c + me));
|
||||
answer.s_upper = (p + me) - ((a - me) + (c - me));
|
||||
return answer;
|
||||
} else if (c == 0.0f && a != 0.0f && b != 0.0f) {
|
||||
answer.s_lower = (p - me) - ((a + me) + (b + me));
|
||||
answer.s_upper = (p + me) - ((a - me) + (b - me));
|
||||
return answer;
|
||||
}
|
||||
} else if (a == 0.0f && b == 0.0f && c == 0.0f)
|
||||
throw std::invalid_argument("Nothing computes to nothing.");
|
||||
else if (a != 0.0f && b != 0.0f && c != 0.0f)
|
||||
throw std::invalid_argument(
|
||||
"Everything is given, you should probably "
|
||||
"reconsider your life decisions.");
|
||||
|
||||
return answer;
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue