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
AddTrappyCircleForm Class Reference

#include <add_trappy_circle_form.h>

Inheritance diagram for AddTrappyCircleForm:
Collaboration diagram for AddTrappyCircleForm:

Signals

void AddTrappyCircle (double x, double y, double radius)
 

Public Member Functions

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

Private Slots

void on_clearPushButton_clicked ()
 
void on_createPushButton_clicked ()
 

Private Attributes

Ui::AddTrappyCircleForm * ui
 

Constructor & Destructor Documentation

◆ AddTrappyCircleForm()

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

◆ ~AddTrappyCircleForm()

AddTrappyCircleForm::~AddTrappyCircleForm ( )
16{ delete ui; }

Member Function Documentation

◆ AddTrappyCircle

void AddTrappyCircleForm::AddTrappyCircle ( double x,
double y,
double radius )
signal
Here is the caller graph for this function:

◆ on_clearPushButton_clicked

void AddTrappyCircleForm::on_clearPushButton_clicked ( )
privateslot
18 {
19 ui->abscissaLineEdit->clear();
20 ui->ordinateLineEdit->clear();
21 ui->radiusLineEdit->clear();
22}

◆ on_createPushButton_clicked

void AddTrappyCircleForm::on_createPushButton_clicked ( )
privateslot
24 {
25 QString x = ui->abscissaLineEdit->displayText().replace(',', '.');
26 QString y = ui->ordinateLineEdit->displayText().replace(',', '.');
27 QString radius = ui->radiusLineEdit->displayText().replace(',', '.');
28 if (x.isEmpty() || y.isEmpty() || radius.isEmpty())
29 QMessageBox::warning(
30 this, "Warning!",
31 "There are empty fields! Please, enter values in all fields.");
32 else {
33 emit AddTrappyCircle(x.toDouble(), y.toDouble(), radius.toDouble());
34 close();
35 }
36}
void AddTrappyCircle(double x, double y, double radius)
Here is the call graph for this function:

Member Data Documentation

◆ ui

Ui::AddTrappyCircleForm* AddTrappyCircleForm::ui
private

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