20#ifndef LIBREPCB_EDITOR_COMPONENTSIGNALLISTMODEL_H
21#define LIBREPCB_EDITOR_COMPONENTSIGNALLISTMODEL_H
69 void add(const QPersistentModelIndex& itemIndex) noexcept;
70 void remove(const QPersistentModelIndex& itemIndex) noexcept;
73 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
74 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
75 QVariant
data(const QModelIndex& index,
76 int role = Qt::DisplayRole) const override;
77 QVariant
headerData(
int section, Qt::Orientation orientation,
78 int role = Qt::DisplayRole) const override;
79 Qt::ItemFlags
flags(const QModelIndex& index) const override;
80 bool setData(const QModelIndex& index, const QVariant& value,
81 int role = Qt::EditRole) override;
The ComponentSignal class represents one signal of a component.
Definition: componentsignal.h:45
The ComponentSignalListModel class.
Definition: componentsignallistmodel.h:46
QString mNewForcedNetName
Definition: componentsignallistmodel.h:100
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition: componentsignallistmodel.cpp:219
QString mNewName
Definition: componentsignallistmodel.h:98
void execCmd(UndoCommand *cmd)
Definition: componentsignallistmodel.cpp:347
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: componentsignallistmodel.cpp:131
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition: componentsignallistmodel.cpp:249
void add(const QPersistentModelIndex &itemIndex) noexcept
Definition: componentsignallistmodel.cpp:86
static QString cleanForcedNetName(const QString &name) noexcept
Definition: componentsignallistmodel.cpp:366
void setSignalList(ComponentSignalList *list) noexcept
Definition: componentsignallistmodel.cpp:61
ComponentSignalListModel()=delete
bool mNewIsRequired
Definition: componentsignallistmodel.h:99
CircuitIdentifier validateNameOrThrow(const QString &name) const
Definition: componentsignallistmodel.cpp:356
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: componentsignallistmodel.cpp:145
void setUndoStack(UndoStack *stack) noexcept
Definition: componentsignallistmodel.cpp:78
void remove(const QPersistentModelIndex &itemIndex) noexcept
Definition: componentsignallistmodel.cpp:112
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition: componentsignallistmodel.cpp:259
ComponentSignalListModel(const ComponentSignalListModel &other)=delete
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition: componentsignallistmodel.cpp:138
ComponentSignalList::OnEditedSlot mOnEditedSlot
Definition: componentsignallistmodel.h:103
void signalListEdited(const ComponentSignalList &list, int index, const std::shared_ptr< const ComponentSignal > &signal, ComponentSignalList::Event event) noexcept
Definition: componentsignallistmodel.cpp:321
UndoStack * mUndoStack
Definition: componentsignallistmodel.h:97
ComponentSignalList * mSignalList
Definition: componentsignallistmodel.h:96
Column
Definition: componentsignallistmodel.h:50
@ _COLUMN_COUNT
Definition: componentsignallistmodel.h:55
@ COLUMN_ISREQUIRED
Definition: componentsignallistmodel.h:52
@ COLUMN_NAME
Definition: componentsignallistmodel.h:51
@ COLUMN_FORCEDNETNAME
Definition: componentsignallistmodel.h:53
@ COLUMN_ACTIONS
Definition: componentsignallistmodel.h:54
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
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition: circuitidentifier.h:96