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 
47 class BoardDesignRulesDialog final : public QDialog {
48  Q_OBJECT
49 
50 public:
51  // Constructors / Destructor
52  BoardDesignRulesDialog() = delete;
53  BoardDesignRulesDialog(const BoardDesignRulesDialog& other) = delete;
54  explicit BoardDesignRulesDialog(const BoardDesignRules& rules,
55  QWidget* parent = 0);
57 
58  // Getters
59  const BoardDesignRules& getDesignRules() const noexcept {
60  return mDesignRules;
61  }
62 
63  // Operator Overloadings
65 
66 signals:
67 
68  void rulesChanged(const BoardDesignRules& newRules);
69 
70 private slots:
71 
72  void on_buttonBox_clicked(QAbstractButton* button);
73 
74 private:
75  void updateWidgets() noexcept;
76  void applyRules() noexcept;
77 
80 };
81 
82 /*******************************************************************************
83  * End of File
84  ******************************************************************************/
85 
86 } // namespace librepcb
87 
88 #endif // LIBREPCB_BOARDDESIGNRULESDIALOG_H
const BoardDesignRules & getDesignRules() const noexcept
Definition: boarddesignrulesdialog.h:59
Ui::BoardDesignRulesDialog * mUi
Definition: boarddesignrulesdialog.h:78
The BoardDesignRules class.
Definition: boarddesignrules.h:45
The BoardDesignRulesDialog class.
Definition: boarddesignrulesdialog.h:47
void applyRules() noexcept
Definition: boarddesignrulesdialog.cpp:109
BoardDesignRules mDesignRules
Definition: boarddesignrulesdialog.h:79
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