LibrePCB Developers Documentation
padsignalmapeditorwidget.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_LIBRARY_EDITOR_PADSIGNALMAPEDITORWIDGET_H
21 #define LIBREPCB_LIBRARY_EDITOR_PADSIGNALMAPEDITORWIDGET_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
29 
30 #include <QtCore>
31 #include <QtWidgets>
32 
33 /*******************************************************************************
34  * Namespace / Forward Declarations
35  ******************************************************************************/
36 namespace librepcb {
37 
38 class UndoStack;
39 class SortFilterProxyModel;
40 
41 namespace workspace {
42 class Workspace;
43 }
44 
45 namespace library {
46 namespace editor {
47 
48 class DevicePadSignalMapModel;
49 
50 /*******************************************************************************
51  * Class PadSignalMapEditorWidget
52  ******************************************************************************/
53 
57 class PadSignalMapEditorWidget final : public QWidget {
58  Q_OBJECT
59 
60 public:
61  // Constructors / Destructor
62  explicit PadSignalMapEditorWidget(QWidget* parent = nullptr) noexcept;
64  ~PadSignalMapEditorWidget() noexcept;
65 
66  // General Methods
67  void setReferences(UndoStack* undoStack, DevicePadSignalMap* map) noexcept;
68  void setPadList(const PackagePadList& list) noexcept;
69  void setSignalList(const ComponentSignalList& list) noexcept;
70 
71  // Operator Overloadings
72  PadSignalMapEditorWidget& operator=(const PadSignalMapEditorWidget& rhs) =
73  delete;
74 
75 private:
76  QScopedPointer<DevicePadSignalMapModel> mModel;
77  QScopedPointer<SortFilterProxyModel> mProxy;
78  QScopedPointer<QTableView> mView;
79 };
80 
81 /*******************************************************************************
82  * End of File
83  ******************************************************************************/
84 
85 } // namespace editor
86 } // namespace library
87 } // namespace librepcb
88 
89 #endif // LIBREPCB_LIBRARY_EDITOR_PADSIGNALMAPEDITORWIDGET_H
Definition: airwiresbuilder.cpp:32
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
QScopedPointer< SortFilterProxyModel > mProxy
Definition: padsignalmapeditorwidget.h:77
QScopedPointer< DevicePadSignalMapModel > mModel
Definition: padsignalmapeditorwidget.h:76
QScopedPointer< QTableView > mView
Definition: padsignalmapeditorwidget.h:78
The PadSignalMapEditorWidget class.
Definition: padsignalmapeditorwidget.h:57