20#ifndef LIBREPCB_EDITOR_COMPONENTPINSIGNALMAPMODEL_H
21#define LIBREPCB_EDITOR_COMPONENTPINSIGNALMAPMODEL_H
26#include "../../modelview/comboboxdelegate.h"
39class LibraryElementCache;
79 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
80 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
81 QVariant
data(const QModelIndex& index,
82 int role = Qt::DisplayRole) const override;
83 QVariant
headerData(
int section, Qt::Orientation orientation,
84 int role = Qt::DisplayRole) const override;
85 Qt::ItemFlags
flags(const QModelIndex& index) const override;
86 bool setData(const QModelIndex& index, const QVariant& value,
87 int role = Qt::EditRole) override;
104 int row,
int& symbolItemIndex,
The ComponentPinSignalMapItem class maps a symbol pin to a component signal.
Definition: componentpinsignalmap.h:50
The ComponentSignal class represents one signal of a component.
Definition: componentsignal.h:45
The ComponentSymbolVariant class represents a symbol variant of a component.
Definition: componentsymbolvariant.h:53
The ComponentSymbolVariantItem class represents one symbol of a component symbol variant.
Definition: componentsymbolvariantitem.h:54
Subclass of QStyledItemDelegate which uses QComboBox as item editor.
Definition: comboboxdelegate.h:42
The ComponentPinSignalMapModel class.
Definition: componentpinsignalmapmodel.h:50
void updateSignalComboBoxItems() noexcept
Definition: componentpinsignalmapmodel.cpp:384
ComponentPinSignalMapModel(const ComponentPinSignalMapModel &other)=delete
ComponentSignalList::OnEditedSlot mOnSignalsEditedSlot
Definition: componentpinsignalmapmodel.h:118
void symbolItemsEdited(const ComponentSymbolVariantItemList &list, int index, const std::shared_ptr< const ComponentSymbolVariantItem > &item, ComponentSymbolVariantItemList::Event event) noexcept
Definition: componentpinsignalmapmodel.cpp:330
void autoAssignSignals() noexcept
Definition: componentpinsignalmapmodel.cpp:107
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition: componentpinsignalmapmodel.cpp:262
ComboBoxDelegate::Items mDisplayTypeComboBoxItems
Definition: componentpinsignalmapmodel.h:114
void execCmd(UndoCommand *cmd)
Definition: componentpinsignalmapmodel.cpp:375
void setSignalList(const ComponentSignalList *list) noexcept
Definition: componentpinsignalmapmodel.cpp:87
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: componentpinsignalmapmodel.cpp:150
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition: componentpinsignalmapmodel.cpp:282
void setSymbolsCache(const std::shared_ptr< const LibraryElementCache > &cache) noexcept
Definition: componentpinsignalmapmodel.cpp:81
ComponentPinSignalMapModel()=delete
std::shared_ptr< const LibraryElementCache > mSymbolsCache
Definition: componentpinsignalmapmodel.h:111
ComponentSymbolVariant * mSymbolVariant
Definition: componentpinsignalmapmodel.h:109
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: componentpinsignalmapmodel.cpp:167
void setUndoStack(UndoStack *stack) noexcept
Definition: componentpinsignalmapmodel.cpp:99
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition: componentpinsignalmapmodel.cpp:293
ComponentSymbolVariantItemList::OnEditedSlot mOnItemsEditedSlot
Definition: componentpinsignalmapmodel.h:117
const ComponentSignalList * mSignals
Definition: componentpinsignalmapmodel.h:110
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition: componentpinsignalmapmodel.cpp:160
void signalListEdited(const ComponentSignalList &list, int index, const std::shared_ptr< const ComponentSignal > &signal, ComponentSignalList::Event event) noexcept
Definition: componentpinsignalmapmodel.cpp:352
UndoStack * mUndoStack
Definition: componentpinsignalmapmodel.h:112
void getRowItem(int row, int &symbolItemIndex, std::shared_ptr< ComponentSymbolVariantItem > &symbolItem, std::shared_ptr< ComponentPinSignalMapItem > &mapItem) const noexcept
Definition: componentpinsignalmapmodel.cpp:399
Column
Definition: componentpinsignalmapmodel.h:54
@ _COLUMN_COUNT
Definition: componentpinsignalmapmodel.h:59
@ COLUMN_SYMBOL
Definition: componentpinsignalmapmodel.h:55
@ COLUMN_PIN
Definition: componentpinsignalmapmodel.h:56
@ COLUMN_SIGNAL
Definition: componentpinsignalmapmodel.h:57
@ COLUMN_DISPLAY
Definition: componentpinsignalmapmodel.h:58
ComboBoxDelegate::Items mSignalComboBoxItems
Definition: componentpinsignalmapmodel.h:113
void setSymbolVariant(ComponentSymbolVariant *variant) noexcept
Definition: componentpinsignalmapmodel.cpp:68
Cache for fast access to library elements.
Definition: libraryelementcache.h:55
The UndoCommand class represents a command which you can undo/redo.
Definition: undocommand.h:46
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
Definition: occmodel.cpp:77