Locus No Pilotus
Project of four first grade MIPT DAFE/RSE students (for engineering practical work in the second semester) in Qt C++
Loading...
Searching...
No Matches
AddTargetForm Class Reference

#include <add_target_form.h>

Inheritance diagram for AddTargetForm:
Collaboration diagram for AddTargetForm:

Signals

void AddTarget (double x, double y)
 

Public Member Functions

 AddTargetForm (QWidget *parent=nullptr)
 
 ~AddTargetForm ()
 

Private Slots

void on_clearPushButton_clicked ()
 
void on_createPushButton_clicked ()
 

Private Attributes

Ui::AddTargetForm * ui
 

Constructor & Destructor Documentation

◆ AddTargetForm()

AddTargetForm::AddTargetForm ( QWidget * parent = nullptr)
explicit
8 : QDialog(parent), ui(new Ui::AddTargetForm) {
9 ui->setupUi(this);
10 QDoubleValidator* double_validator{new QDoubleValidator()};
11 ui->abscissaLineEdit->setValidator(double_validator);
12 ui->ordinateLineEdit->setValidator(double_validator);
13}
Ui::AddTargetForm * ui
Definition add_target_form.h:27

◆ ~AddTargetForm()

AddTargetForm::~AddTargetForm ( )
15{ delete ui; }

Member Function Documentation

◆ AddTarget

void AddTargetForm::AddTarget ( double x,
double y )
signal
Here is the caller graph for this function:

◆ 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}
void AddTarget(double x, double y)
Here is the call graph for this function:

Member Data Documentation

◆ ui

Ui::AddTargetForm* AddTargetForm::ui
private

The documentation for this class was generated from the following files: