20#ifndef LIBREPCB_EDITOR_DEVICEPADSIGNALMAPMODEL_H
21#define LIBREPCB_EDITOR_DEVICEPADSIGNALMAPMODEL_H
26#include "../../modelview/comboboxdelegate.h"
69 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
70 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
71 QVariant
data(const QModelIndex& index,
72 int role = Qt::DisplayRole) const override;
73 QVariant
headerData(
int section, Qt::Orientation orientation,
74 int role = Qt::DisplayRole) const override;
75 Qt::ItemFlags
flags(const QModelIndex& index) const override;
76 bool setData(const QModelIndex& index, const QVariant& value,
77 int role = Qt::EditRole) override;
The DevicePadSignalMapItem class.
Definition: devicepadsignalmap.h:42
Subclass of QStyledItemDelegate which uses QComboBox as item editor.
Definition: comboboxdelegate.h:42
The DevicePadSignalMapModel class.
Definition: devicepadsignalmapmodel.h:50
DevicePadSignalMapModel()=delete
ComponentSignalList mSignals
Definition: devicepadsignalmapmodel.h:94
void setPadList(const PackagePadList &list) noexcept
Definition: devicepadsignalmapmodel.cpp:89
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition: devicepadsignalmapmodel.cpp:162
void execCmd(UndoCommand *cmd)
Definition: devicepadsignalmapmodel.cpp:240
void padSignalMapEdited(const DevicePadSignalMap &map, int index, const std::shared_ptr< const DevicePadSignalMapItem > &item, DevicePadSignalMap::Event event) noexcept
Definition: devicepadsignalmapmodel.cpp:214
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: devicepadsignalmapmodel.cpp:98
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition: devicepadsignalmapmodel.cpp:178
DevicePadSignalMapModel(const DevicePadSignalMapModel &other)=delete
void setPadSignalMap(DevicePadSignalMap *map) noexcept
Definition: devicepadsignalmapmodel.cpp:60
DevicePadSignalMap * mPadSignalMap
Definition: devicepadsignalmapmodel.h:92
ComboBoxDelegate::Items mComboBoxItems
Definition: devicepadsignalmapmodel.h:96
PackagePadList mPads
Definition: devicepadsignalmapmodel.h:95
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: devicepadsignalmapmodel.cpp:112
void setUndoStack(UndoStack *stack) noexcept
Definition: devicepadsignalmapmodel.cpp:77
DevicePadSignalMap::OnEditedSlot mOnEditedSlot
Definition: devicepadsignalmapmodel.h:99
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition: devicepadsignalmapmodel.cpp:186
void setSignalList(const ComponentSignalList &list) noexcept
Definition: devicepadsignalmapmodel.cpp:81
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition: devicepadsignalmapmodel.cpp:105
UndoStack * mUndoStack
Definition: devicepadsignalmapmodel.h:93
Column
Definition: devicepadsignalmapmodel.h:54
@ _COLUMN_COUNT
Definition: devicepadsignalmapmodel.h:54
@ COLUMN_SIGNAL
Definition: devicepadsignalmapmodel.h:54
@ COLUMN_PAD
Definition: devicepadsignalmapmodel.h:54
void updateComboBoxItems() noexcept
Definition: devicepadsignalmapmodel.cpp:249
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