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
add_hill_form.h
Go to the documentation of this file.
1#pragma once
2
3// Qt libs:
4#include <QDialog>
5#include <QDoubleValidator>
6#include <QHBoxLayout>
7#include <QLabel>
8#include <QLineEdit>
9#include <QMessageBox>
10
11// std libs:
12#include <memory>
13#include <vector>
14
15// our code libs:
16#include "lib/point.h"
17
18namespace Ui {
19class AddHillForm;
20}
21
22/// @brief Структура из двух QLineEdit, относящихся к вводу координаты точки
23/// (чтобы не использовать std::pair<std::unique_ptr<QLineEdit>, ... >)
25 PointLineEdits() = default;
28
29 std::unique_ptr<QLineEdit> abscissa;
30 std::unique_ptr<QLineEdit> ordinate;
31};
32
33class AddHillForm : public QDialog {
34 Q_OBJECT
35
36 public:
37 explicit AddHillForm(QWidget* parent = nullptr);
39
40 signals:
41 void AddHill(const std::vector<std::pair<double, double>>& points);
42
43 private slots:
48
49 private:
50 /**
51 * @brief Добавляет определенное количество новых полей ввода на форму
52 * @param amount: кол-ло новых полей ввода точки
53 */
54 void AddNewInputFields(size_t amount = 1);
55
56 Ui::AddHillForm* ui;
57 std::vector<std::unique_ptr<QWidget>> point_layouts_widgets_;
58 std::vector<PointLineEdits> both_coords_point_line_edits_;
59};
Definition add_hill_form.h:33
void AddHill(const std::vector< std::pair< double, double > > &points)
~AddHillForm()
Definition add_hill_form.cpp:15
void on_clearPushButton_clicked()
Definition add_hill_form.cpp:40
void on_newPushButton_clicked()
Definition add_hill_form.cpp:47
std::vector< std::unique_ptr< QWidget > > point_layouts_widgets_
Definition add_hill_form.h:57
void on_deletePushButton_clicked()
Definition add_hill_form.cpp:109
std::vector< PointLineEdits > both_coords_point_line_edits_
Definition add_hill_form.h:58
Ui::AddHillForm * ui
Definition add_hill_form.h:56
AddHillForm(QWidget *parent=nullptr)
Definition add_hill_form.cpp:7
void AddNewInputFields(size_t amount=1)
Добавляет определенное количество новых полей ввода на форму
Definition add_hill_form.cpp:49
void on_createPushButton_clicked()
Definition add_hill_form.cpp:17
Definition add_hill_form.h:18
Структура из двух QLineEdit, относящихся к вводу координаты точки (чтобы не использовать std::pair<st...
Definition add_hill_form.h:24
std::unique_ptr< QLineEdit > ordinate
Definition add_hill_form.h:30
std::unique_ptr< QLineEdit > abscissa
Definition add_hill_form.h:29
PointLineEdits(QLineEdit *abscissa, QLineEdit *ordinate)
Definition add_hill_form.h:26
PointLineEdits()=default