LibrePCB Developers Documentation
boarddesignrulecheckdialog.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_PROJECT_EDITOR_BOARDDESIGNRULECHECKDIALOG_H
21 #define LIBREPCB_PROJECT_EDITOR_BOARDDESIGNRULECHECKDIALOG_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 #include <optional/tl/optional.hpp>
28 
29 #include <QtCore>
30 #include <QtWidgets>
31 
32 /*******************************************************************************
33  * Namespace / Forward Declarations
34  ******************************************************************************/
35 namespace librepcb {
36 namespace project {
37 
38 class Board;
39 
40 namespace editor {
41 
42 namespace Ui {
44 }
45 
46 /*******************************************************************************
47  * Class BoardDesignRuleCheckDialog
48  ******************************************************************************/
49 
53 class BoardDesignRuleCheckDialog final : public QDialog {
54  Q_OBJECT
55 
56 public:
57  // Constructors / Destructor
58  BoardDesignRuleCheckDialog() = delete;
61  const BoardDesignRuleCheck::Options& options,
62  const LengthUnit& lengthUnit,
63  const QString& settingsPrefix,
64  QWidget* parent = 0) noexcept;
66 
67  // Getters
68  BoardDesignRuleCheck::Options getOptions() const noexcept;
69  const tl::optional<QList<BoardDesignRuleCheckMessage>>& getMessages() const
70  noexcept {
71  return mMessages;
72  }
73 
74 private: // GUI Event Handlers
75  void btnRunDrcClicked() noexcept;
76 
77 private:
79  QScopedPointer<Ui::BoardDesignRuleCheckDialog> mUi;
80  tl::optional<QList<BoardDesignRuleCheckMessage>> mMessages;
81 };
82 
83 /*******************************************************************************
84  * End of File
85  ******************************************************************************/
86 
87 } // namespace editor
88 } // namespace project
89 } // namespace librepcb
90 
91 #endif // LIBREPCB_PROJECT_EDITOR_BOARDDESIGNRULECHECKDIALOG_H
Definition: boarddesignrulecheck.h:57
Definition: mainwindow.h:10
Definition: airwiresbuilder.cpp:32
const tl::optional< QList< BoardDesignRuleCheckMessage > > & getMessages() const noexcept
Definition: boarddesignrulecheckdialog.h:69
tl::optional< QList< BoardDesignRuleCheckMessage > > mMessages
Definition: boarddesignrulecheckdialog.h:80
The BoardDesignRuleCheckDialog class.
Definition: boarddesignrulecheckdialog.h:53
QScopedPointer< Ui::BoardDesignRuleCheckDialog > mUi
Definition: boarddesignrulecheckdialog.h:79
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:83
Board & mBoard
Definition: boarddesignrulecheckdialog.h:78
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:62