LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackagePadListModel Class Referencefinal

The PackagePadListModel class. More...

#include <packagepadlistmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for PackagePadListModel:

Public Types

enum  Column
 

Public Member Functions

 PackagePadListModel ()=delete
 
 PackagePadListModel (const PackagePadListModel &other) noexcept
 
 PackagePadListModel (QObject *parent=nullptr) noexcept
 
 ~PackagePadListModel () noexcept
 
void setPadList (PackagePadList *list) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void addPad (const QVariant &editData) noexcept
 
void removePad (const QVariant &editData) noexcept
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
PackagePadListModeloperator= (const PackagePadListModel &rhs) noexcept
 

Private Member Functions

void padListEdited (const PackagePadList &list, int index, const std::shared_ptr< const PackagePad > &pad, PackagePadList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
CircuitIdentifier validateNameOrThrow (const QString &name) const
 
QString getNextPadNameProposal () const noexcept
 

Private Attributes

PackagePadListmPadList
 
UndoStackmUndoStack
 
QString mNewName
 
PackagePadList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

enum Column
Enumerator
COLUMN_NAME 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

PackagePadListModel ( )
delete
PackagePadListModel ( const PackagePadListModel other)
noexcept
PackagePadListModel ( QObject *  parent = nullptr)
explicitnoexcept
~PackagePadListModel ( )
noexcept

Member Function Documentation

void setPadList ( PackagePadList list)
noexcept
void setUndoStack ( UndoStack stack)
noexcept
void addPad ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removePad ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

+ Here is the call graph for this function:

int columnCount ( const QModelIndex &  parent = QModelIndex()) const
override
QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

+ Here is the call graph for this function:

QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

+ Here is the call graph for this function:

Qt::ItemFlags flags ( const QModelIndex &  index) const
override
bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

+ Here is the call graph for this function:

PackagePadListModel& operator= ( const PackagePadListModel rhs)
noexcept
void padListEdited ( const PackagePadList list,
int  index,
const std::shared_ptr< const PackagePad > &  pad,
PackagePadList::Event  event 
)
privatenoexcept
void execCmd ( UndoCommand cmd)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CircuitIdentifier validateNameOrThrow ( const QString &  name) const
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString getNextPadNameProposal ( ) const
privatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

PackagePadList* mPadList
private
UndoStack* mUndoStack
private
QString mNewName
private
PackagePadList::OnEditedSlot mOnEditedSlot
private

The documentation for this class was generated from the following files: