20#ifndef LIBREPCB_EDITOR_PACKAGEPADLISTMODEL_H
21#define LIBREPCB_EDITOR_PACKAGEPADLISTMODEL_H
63 void add(const QPersistentModelIndex& itemIndex) noexcept;
64 void remove(const QPersistentModelIndex& itemIndex) noexcept;
67 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
68 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
69 QVariant
data(const QModelIndex& index,
70 int role = Qt::DisplayRole) const override;
71 QVariant
headerData(
int section, Qt::Orientation orientation,
72 int role = Qt::DisplayRole) const override;
73 Qt::ItemFlags
flags(const QModelIndex& index) const override;
74 bool setData(const QModelIndex& index, const QVariant& value,
75 int role = Qt::EditRole) override;
The PackagePad class represents one logical pad of a package.
Definition packagepad.h:47
The PackagePadListModel class.
Definition packagepadlistmodel.h:46
PackagePadList * mPadList
Definition packagepadlistmodel.h:89
void padListEdited(const PackagePadList &list, int index, const std::shared_ptr< const PackagePad > &pad, PackagePadList::Event event) noexcept
Definition packagepadlistmodel.cpp:274
PackagePadList::OnEditedSlot mOnEditedSlot
Definition packagepadlistmodel.h:94
void setPadList(PackagePadList *list) noexcept
Definition packagepadlistmodel.cpp:59
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition packagepadlistmodel.cpp:187
QString mNewName
Definition packagepadlistmodel.h:91
void execCmd(UndoCommand *cmd)
Definition packagepadlistmodel.cpp:299
QString getNextPadNameProposal() const noexcept
Definition packagepadlistmodel.cpp:318
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition packagepadlistmodel.cpp:127
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition packagepadlistmodel.cpp:220
void add(const QPersistentModelIndex &itemIndex) noexcept
Definition packagepadlistmodel.cpp:83
PackagePadListModel(const PackagePadListModel &other)=delete
PackagePadListModel()=delete
CircuitIdentifier validateNameOrThrow(const QString &name) const
Definition packagepadlistmodel.cpp:308
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition packagepadlistmodel.cpp:141
void setUndoStack(UndoStack *stack) noexcept
Definition packagepadlistmodel.cpp:75
void remove(const QPersistentModelIndex &itemIndex) noexcept
Definition packagepadlistmodel.cpp:108
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition packagepadlistmodel.cpp:228
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition packagepadlistmodel.cpp:134
UndoStack * mUndoStack
Definition packagepadlistmodel.h:90
Column
Definition packagepadlistmodel.h:50
@ _COLUMN_COUNT
Definition packagepadlistmodel.h:50
@ COLUMN_NAME
Definition packagepadlistmodel.h:50
@ COLUMN_ACTIONS
Definition packagepadlistmodel.h:50
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:76
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition circuitidentifier.h:95