LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
boarddesignrulesdialog.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_BOARDDESIGNRULESDIALOG_H
21 #define LIBREPCB_BOARDDESIGNRULESDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../boarddesignrules.h"
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 namespace Ui {
37 class BoardDesignRulesDialog;
38 }
39 
40 /*******************************************************************************
41  * Class BoardDesignRulesDialog
42  ******************************************************************************/
43 
50 class BoardDesignRulesDialog final : public QDialog {
51  Q_OBJECT
52 
53 public:
54  // Constructors / Destructor
55  BoardDesignRulesDialog() = delete;
56  BoardDesignRulesDialog(const BoardDesignRulesDialog& other) = delete;
57  explicit BoardDesignRulesDialog(const BoardDesignRules& rules,
58  QWidget* parent = 0);
60 
61  // Getters
62  const BoardDesignRules& getDesignRules() const noexcept {
63  return mDesignRules;
64  }
65 
66  // Operator Overloadings
68 
69 signals:
70 
71  void rulesChanged(const BoardDesignRules& newRules);
72 
73 private slots:
74 
75  void on_buttonBox_clicked(QAbstractButton* button);
76 
77 private:
78  void updateWidgets() noexcept;
79  void applyRules() noexcept;
80 
83 };
84 
85 /*******************************************************************************
86  * End of File
87  ******************************************************************************/
88 
89 } // namespace librepcb
90 
91 #endif // LIBREPCB_BOARDDESIGNRULESDIALOG_H
const BoardDesignRules & getDesignRules() const noexcept
Definition: boarddesignrulesdialog.h:62
Ui::BoardDesignRulesDialog * mUi
Definition: boarddesignrulesdialog.h:81
The BoardDesignRules class.
Definition: boarddesignrules.h:48
The BoardDesignRulesDialog class.
Definition: boarddesignrulesdialog.h:50
void applyRules() noexcept
Definition: boarddesignrulesdialog.cpp:109
BoardDesignRules mDesignRules
Definition: boarddesignrulesdialog.h:82
BoardDesignRulesDialog & operator=(const BoardDesignRulesDialog &rhs)=delete
void on_buttonBox_clicked(QAbstractButton *button)
Definition: boarddesignrulesdialog.cpp:55
void rulesChanged(const BoardDesignRules &newRules)
~BoardDesignRulesDialog()
Definition: boarddesignrulesdialog.cpp:46
void updateWidgets() noexcept
Definition: boarddesignrulesdialog.cpp:78