LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
holepropertiesdialog.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_HOLEPROPERTIESDIALOG_H
21 #define LIBREPCB_HOLEPROPERTIESDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include <QtCore>
27 #include <QtWidgets>
28 
29 /*******************************************************************************
30  * Namespace / Forward Declarations
31  ******************************************************************************/
32 namespace librepcb {
33 
34 class UndoStack;
35 class Hole;
36 
37 namespace Ui {
38 class HolePropertiesDialog;
39 }
40 
41 /*******************************************************************************
42  * Class HolePropertiesDialog
43  ******************************************************************************/
44 
48 class HolePropertiesDialog final : public QDialog {
49  Q_OBJECT
50 
51 public:
52  // Constructors / Destructor
53  HolePropertiesDialog() = delete;
54  HolePropertiesDialog(const HolePropertiesDialog& other) = delete;
55  HolePropertiesDialog(Hole& hole, UndoStack& undoStack,
56  QWidget* parent = nullptr) noexcept;
57  ~HolePropertiesDialog() noexcept;
58 
59  // Operator Overloadings
61 
62 private: // Methods
63  void on_buttonBox_clicked(QAbstractButton* button);
64  bool applyChanges() noexcept;
65 
66 private: // Data
69  QScopedPointer<Ui::HolePropertiesDialog> mUi;
70 };
71 
72 /*******************************************************************************
73  * End of File
74  ******************************************************************************/
75 
76 } // namespace librepcb
77 
78 #endif // LIBREPCB_HOLEPROPERTIESDIALOG_H
HolePropertiesDialog & operator=(const HolePropertiesDialog &rhs)=delete
The Hole class.
Definition: hole.h:46
bool applyChanges() noexcept
Definition: holepropertiesdialog.cpp:80
QScopedPointer< Ui::HolePropertiesDialog > mUi
Definition: holepropertiesdialog.h:69
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
void on_buttonBox_clicked(QAbstractButton *button)
Definition: holepropertiesdialog.cpp:61
~HolePropertiesDialog() noexcept
Definition: holepropertiesdialog.cpp:54
UndoStack & mUndoStack
Definition: holepropertiesdialog.h:68
The HolePropertiesDialog class.
Definition: holepropertiesdialog.h:48
Hole & mHole
Definition: holepropertiesdialog.h:67