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_EDITOR_COMPSYMBVARPINSIGNALMAPEDITORWIDGET_H
21 #define LIBREPCB_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 ComponentSymbolVariant;
37 
38 namespace editor {
39 
40 class ComponentPinSignalMapModel;
41 class LibraryElementCache;
42 class SortFilterProxyModel;
43 class UndoStack;
44 
45 /*******************************************************************************
46  * Class CompSymbVarPinSignalMapEditorWidget
47  ******************************************************************************/
48 
52 class CompSymbVarPinSignalMapEditorWidget final : public QWidget {
53  Q_OBJECT
54 
55 public:
56  // Constructors / Destructor
58  QWidget* parent = nullptr) noexcept;
60  const CompSymbVarPinSignalMapEditorWidget& other) = delete;
62 
63  // General Methods
64  void setReadOnly(bool readOnly) noexcept;
65  void setReferences(
66  ComponentSymbolVariant* variant,
67  const std::shared_ptr<const LibraryElementCache>& symbolCache,
68  const ComponentSignalList* sigs, UndoStack* undoStack) noexcept;
69  void resetReferences() noexcept;
70 
71  // Operator Overloadings
73  const CompSymbVarPinSignalMapEditorWidget& rhs) = delete;
74 
75 private:
76  QScopedPointer<ComponentPinSignalMapModel> mModel;
77  QScopedPointer<SortFilterProxyModel> mProxy;
78  QScopedPointer<QTableView> mView;
79  QScopedPointer<QPushButton> mBtnAutoAssign;
80 };
81 
82 /*******************************************************************************
83  * End of File
84  ******************************************************************************/
85 
86 } // namespace editor
87 } // namespace librepcb
88 
89 #endif
The CompSymbVarPinSignalMapEditorWidget class.
Definition: compsymbvarpinsignalmapeditorwidget.h:52
Definition: occmodel.cpp:77
QScopedPointer< QPushButton > mBtnAutoAssign
Definition: compsymbvarpinsignalmapeditorwidget.h:79
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
CompSymbVarPinSignalMapEditorWidget & operator=(const CompSymbVarPinSignalMapEditorWidget &rhs)=delete
QScopedPointer< ComponentPinSignalMapModel > mModel
Definition: compsymbvarpinsignalmapeditorwidget.h:76
void resetReferences() noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:111
QScopedPointer< SortFilterProxyModel > mProxy
Definition: compsymbvarpinsignalmapeditorwidget.h:77
void setReferences(ComponentSymbolVariant *variant, const std::shared_ptr< const LibraryElementCache > &symbolCache, const ComponentSignalList *sigs, UndoStack *undoStack) noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:101
CompSymbVarPinSignalMapEditorWidget(QWidget *parent=nullptr) noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:42
void setReadOnly(bool readOnly) noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:94
The ComponentSymbolVariant class represents a symbol variant of a component.
Definition: componentsymbolvariant.h:53
~CompSymbVarPinSignalMapEditorWidget() noexcept
Definition: compsymbvarpinsignalmapeditorwidget.cpp:87
QScopedPointer< QTableView > mView
Definition: compsymbvarpinsignalmapeditorwidget.h:78