LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
47 class DevicePadSignalMapModel;
48 
49 namespace editor {
50 
51 /*******************************************************************************
52  * Class PadSignalMapEditorWidget
53  ******************************************************************************/
54 
58 class PadSignalMapEditorWidget final : public QWidget {
59  Q_OBJECT
60 
61 public:
62  // Constructors / Destructor
63  explicit PadSignalMapEditorWidget(QWidget* parent = nullptr) noexcept;
65  ~PadSignalMapEditorWidget() noexcept;
66 
67  // General Methods
68  void setReferences(UndoStack* undoStack, DevicePadSignalMap* map) noexcept;
69  void setPadList(const PackagePadList& list) noexcept;
70  void setSignalList(const ComponentSignalList& list) noexcept;
71 
72  // Operator Overloadings
74  delete;
75 
76 private:
77  QScopedPointer<DevicePadSignalMapModel> mModel;
78  QScopedPointer<SortFilterProxyModel> mProxy;
79  QScopedPointer<QTableView> mView;
80 };
81 
82 /*******************************************************************************
83  * End of File
84  ******************************************************************************/
85 
86 } // namespace editor
87 } // namespace library
88 } // namespace librepcb
89 
90 #endif // LIBREPCB_LIBRARY_EDITOR_PADSIGNALMAPEDITORWIDGET_H
void setSignalList(const ComponentSignalList &list) noexcept
Definition: padsignalmapeditorwidget.cpp:89
void setPadList(const PackagePadList &list) noexcept
Definition: padsignalmapeditorwidget.cpp:85
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
void setReferences(UndoStack *undoStack, DevicePadSignalMap *map) noexcept
Definition: padsignalmapeditorwidget.cpp:79
QScopedPointer< SortFilterProxyModel > mProxy
Definition: padsignalmapeditorwidget.h:78
PadSignalMapEditorWidget & operator=(const PadSignalMapEditorWidget &rhs)=delete
PadSignalMapEditorWidget(QWidget *parent=nullptr) noexcept
Definition: padsignalmapeditorwidget.cpp:43
~PadSignalMapEditorWidget() noexcept
Definition: padsignalmapeditorwidget.cpp:72
QScopedPointer< DevicePadSignalMapModel > mModel
Definition: padsignalmapeditorwidget.h:77
QScopedPointer< QTableView > mView
Definition: padsignalmapeditorwidget.h:79
The PadSignalMapEditorWidget class.
Definition: padsignalmapeditorwidget.h:58