LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
polygonpropertiesdialog.h
Go to the documentation of this file.
1 /*
2  * LibrePCB - Professional EDA for everyone!
3  * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4  * https://librepcb.org/
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef LIBREPCB_POLYGONPROPERTIESDIALOG_H
21 #define LIBREPCB_POLYGONPROPERTIESDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../geometry/vertex.h"
27 #include "../units/all_length_units.h"
28 
29 #include <QtCore>
30 #include <QtWidgets>
31 
32 /*******************************************************************************
33  * Namespace / Forward Declarations
34  ******************************************************************************/
35 namespace librepcb {
36 
37 class UndoStack;
38 class Polygon;
39 class GraphicsLayer;
40 
41 namespace Ui {
42 class PolygonPropertiesDialog;
43 }
44 
45 /*******************************************************************************
46  * Class PolygonPropertiesDialog
47  ******************************************************************************/
48 
52 class PolygonPropertiesDialog final : public QDialog {
53  Q_OBJECT
54 
55 public:
56  // Constructors / Destructor
57  PolygonPropertiesDialog() = delete;
58  PolygonPropertiesDialog(const PolygonPropertiesDialog& other) = delete;
59  PolygonPropertiesDialog(Polygon& polygon, UndoStack& undoStack,
60  QList<GraphicsLayer*> layers,
61  QWidget* parent = nullptr) noexcept;
62  ~PolygonPropertiesDialog() noexcept;
63 
64  // Operator Overloadings
66  delete;
67 
68 private: // GUI Events
69  void buttonBoxClicked(QAbstractButton* button) noexcept;
70 
71 private: // Methods
72  bool applyChanges() noexcept;
73  void selectLayerNameInCombobox(const QString& name) noexcept;
74 
75 private: // Data
78  QScopedPointer<Ui::PolygonPropertiesDialog> mUi;
79 };
80 
81 /*******************************************************************************
82  * End of File
83  ******************************************************************************/
84 
85 } // namespace librepcb
86 
87 #endif // LIBREPCB_POLYGONPROPERTIESDIALOG_H
bool applyChanges() noexcept
Definition: polygonpropertiesdialog.cpp:93
Polygon & mPolygon
Definition: polygonpropertiesdialog.h:76
~PolygonPropertiesDialog() noexcept
Definition: polygonpropertiesdialog.cpp:66
void buttonBoxClicked(QAbstractButton *button) noexcept
Definition: polygonpropertiesdialog.cpp:73
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:120
PolygonPropertiesDialog & operator=(const PolygonPropertiesDialog &rhs)=delete
void selectLayerNameInCombobox(const QString &name) noexcept
Definition: polygonpropertiesdialog.cpp:116
QScopedPointer< Ui::PolygonPropertiesDialog > mUi
Definition: polygonpropertiesdialog.h:78
UndoStack & mUndoStack
Definition: polygonpropertiesdialog.h:77
The Polygon class.
Definition: polygon.h:76
The PolygonPropertiesDialog class.
Definition: polygonpropertiesdialog.h:52