LibrePCB Developers Documentation
boarddesignrulecheckmessagesdock.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 BOARDDESIGNRULECHECKMESSAGESDOCK_H
21 #define BOARDDESIGNRULECHECKMESSAGESDOCK_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 namespace project {
36 namespace editor {
37 
38 namespace Ui {
39 class BoardDesignRuleCheckMessagesDock;
40 }
41 
42 /*******************************************************************************
43  * Class BoardDesignRuleCheckMessagesDock
44  ******************************************************************************/
45 
49 class BoardDesignRuleCheckMessagesDock final : public QDockWidget {
50  Q_OBJECT
51 
52 public:
53  // Constructors / Destructor
54  explicit BoardDesignRuleCheckMessagesDock(QWidget* parent = nullptr) noexcept;
56  const BoardDesignRuleCheckMessagesDock& other) = delete;
58 
59  // Setters
60  void setMessages(const QList<BoardDesignRuleCheckMessage>& messages) noexcept;
61 
62  // Operator Overloadings
64  const BoardDesignRuleCheckMessagesDock& rhs) = delete;
65 
66 signals:
67  void messageSelected(const BoardDesignRuleCheckMessage& msg, bool zoomTo);
68 
69 private: // Methods
70  void listWidgetCurrentItemChanged() noexcept;
71  void listWidgetCurrentItemDoubleClicked() noexcept;
72 
73 private:
74  QScopedPointer<Ui::BoardDesignRuleCheckMessagesDock> mUi;
75  QList<BoardDesignRuleCheckMessage> mMessages;
76 };
77 
78 /*******************************************************************************
79  * End of File
80  ******************************************************************************/
81 
82 } // namespace editor
83 } // namespace project
84 } // namespace librepcb
85 
86 #endif // BOARDDESIGNRULECHECKMESSAGESDOCK_H
Definition: mainwindow.h:10
Definition: airwiresbuilder.cpp:32
The BoardDesignRuleCheckMessagesDock class.
Definition: boarddesignrulecheckmessagesdock.h:49
QList< BoardDesignRuleCheckMessage > mMessages
Definition: boarddesignrulecheckmessagesdock.h:75
QScopedPointer< Ui::BoardDesignRuleCheckMessagesDock > mUi
Definition: boarddesignrulecheckmessagesdock.h:74
The BoardDesignRuleCheckMessage class represents a message produced by the design rule check (DRC) ...
Definition: boarddesignrulecheckmessage.h:44