#include <add_target_form.h>
◆ AddTargetForm()
AddTargetForm::AddTargetForm |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
8 : QDialog(parent),
ui(
new Ui::AddTargetForm) {
10 QDoubleValidator* double_validator{new QDoubleValidator()};
11 ui->abscissaLineEdit->setValidator(double_validator);
12 ui->ordinateLineEdit->setValidator(double_validator);
13}
◆ ~AddTargetForm()
AddTargetForm::~AddTargetForm |
( |
| ) |
|
◆ AddTarget
void AddTargetForm::AddTarget |
( |
double | x, |
|
|
double | y ) |
|
signal |
◆ on_clearPushButton_clicked
void AddTargetForm::on_clearPushButton_clicked |
( |
| ) |
|
|
privateslot |
17 {
18 ui->abscissaLineEdit->clear();
19 ui->ordinateLineEdit->clear();
20}
◆ on_createPushButton_clicked
void AddTargetForm::on_createPushButton_clicked |
( |
| ) |
|
|
privateslot |
22 {
23 QString x =
ui->abscissaLineEdit->displayText().replace(
',',
'.');
24 QString y =
ui->ordinateLineEdit->displayText().replace(
',',
'.');
25 if (x.isEmpty() || y.isEmpty())
26 QMessageBox::warning(
27 this, "Warning!",
28 "There are empty fields! Please, enter values in all fields.");
29 else {
30 emit
AddTarget(x.toDouble(), y.toDouble());
31 close();
32 }
33}
◆ ui
Ui::AddTargetForm* AddTargetForm::ui |
|
private |
The documentation for this class was generated from the following files: