LibrePCB Developers Documentation
compsymbvarpinsignalmapeditorwidget.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_COMPSYMBVARPINSIGNALMAPEDITORWIDGET_H
21 #define LIBREPCB_LIBRARY_EDITOR_COMPSYMBVARPINSIGNALMAPEDITORWIDGET_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
27 
28 #include <QtCore>
29 #include <QtWidgets>
30 
31 /*******************************************************************************
32  * Namespace / Forward Declarations
33  ******************************************************************************/
34 namespace librepcb {
35 
36 class UndoStack;
37 class SortFilterProxyModel;
38 
39 namespace library {
40 
41 class ComponentSymbolVariant;
42 
43 namespace editor {
44 
45 class LibraryElementCache;
46 class ComponentPinSignalMapModel;
47 
48 /*******************************************************************************
49  * Class CompSymbVarPinSignalMapEditorWidget
50  ******************************************************************************/
51 
55 class CompSymbVarPinSignalMapEditorWidget final : public QWidget {
56  Q_OBJECT
57 
58 public:
59  // Constructors / Destructor
61  QWidget* parent = nullptr) noexcept;
63  const CompSymbVarPinSignalMapEditorWidget& other) = delete;
65 
66  // General Methods
67  void setReferences(
68  ComponentSymbolVariant* variant,
69  const std::shared_ptr<const LibraryElementCache>& symbolCache,
70  const ComponentSignalList* sigs, UndoStack* undoStack) noexcept;
71  void resetReferences() noexcept;
72 
73  // Operator Overloadings
75  const CompSymbVarPinSignalMapEditorWidget& rhs) = delete;
76 
77 private:
78  QScopedPointer<ComponentPinSignalMapModel> mModel;
79  QScopedPointer<SortFilterProxyModel> mProxy;
80  QScopedPointer<QTableView> mView;
81 };
82 
83 /*******************************************************************************
84  * End of File
85  ******************************************************************************/
86 
87 } // namespace editor
88 } // namespace library
89 } // namespace librepcb
90 
91 #endif // LIBREPCB_LIBRARY_EDITOR_COMPSYMBVARPINSIGNALMAPEDITORWIDGET_H
The CompSymbVarPinSignalMapEditorWidget class.
Definition: compsymbvarpinsignalmapeditorwidget.h:55
Definition: airwiresbuilder.cpp:32
~CompSymbVarPinSignalMapEditorWidget() noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:88
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:107
CompSymbVarPinSignalMapEditorWidget(QWidget *parent=nullptr) noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:43
void setReferences(ComponentSymbolVariant *variant, const std::shared_ptr< const LibraryElementCache > &symbolCache, const ComponentSignalList *sigs, UndoStack *undoStack) noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:95
CompSymbVarPinSignalMapEditorWidget & operator=(const CompSymbVarPinSignalMapEditorWidget &rhs)=delete
void resetReferences() noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:105
QScopedPointer< ComponentPinSignalMapModel > mModel
Definition: compsymbvarpinsignalmapeditorwidget.h:78
QScopedPointer< QTableView > mView
Definition: compsymbvarpinsignalmapeditorwidget.h:80
The ComponentSymbolVariant class represents a symbol variant of a component.
Definition: componentsymbolvariant.h:58
QScopedPointer< SortFilterProxyModel > mProxy
Definition: compsymbvarpinsignalmapeditorwidget.h:79