LibrePCB Developers Documentation
DevicePadSignalMapModel Class Referencefinal

The DevicePadSignalMapModel class. More...

#include <devicepadsignalmapmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for DevicePadSignalMapModel:

Public Types

enum  Column
 

Public Member Functions

 DevicePadSignalMapModel ()=delete
 
 DevicePadSignalMapModel (const DevicePadSignalMapModel &other) noexcept
 
 DevicePadSignalMapModel (QObject *parent=nullptr) noexcept
 
 ~DevicePadSignalMapModel () noexcept
 
void setPadSignalMap (DevicePadSignalMap *map) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void setSignalList (const ComponentSignalList &list) noexcept
 
void setPadList (const PackagePadList &list) 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
 
DevicePadSignalMapModeloperator= (const DevicePadSignalMapModel &rhs) noexcept
 

Private Member Functions

void padSignalMapEdited (const DevicePadSignalMap &map, int index, const std::shared_ptr< const DevicePadSignalMapItem > &item, DevicePadSignalMap::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
void updateComboBoxItems () noexcept
 

Private Attributes

DevicePadSignalMapmPadSignalMap
 
UndoStackmUndoStack
 
ComponentSignalList mSignals
 
PackagePadList mPads
 
ComboBoxDelegate::Items mComboBoxItems
 
DevicePadSignalMap::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

◆ Column

enum Column
Enumerator
COLUMN_PAD 
COLUMN_SIGNAL 
_COLUMN_COUNT 

Constructor & Destructor Documentation

◆ DevicePadSignalMapModel() [1/3]

◆ DevicePadSignalMapModel() [2/3]

DevicePadSignalMapModel ( const DevicePadSignalMapModel other)
noexcept

◆ DevicePadSignalMapModel() [3/3]

DevicePadSignalMapModel ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~DevicePadSignalMapModel()

~DevicePadSignalMapModel ( )
noexcept

Member Function Documentation

◆ setPadSignalMap()

void setPadSignalMap ( DevicePadSignalMap map)
noexcept

◆ setUndoStack()

void setUndoStack ( UndoStack stack)
noexcept

◆ setSignalList()

void setSignalList ( const ComponentSignalList list)
noexcept
+ Here is the call graph for this function:

◆ setPadList()

void setPadList ( const PackagePadList list)
noexcept
+ Here is the call graph for this function:

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ columnCount()

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

◆ data()

QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override
+ Here is the call graph for this function:

◆ headerData()

QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override
+ Here is the call graph for this function:

◆ flags()

Qt::ItemFlags flags ( const QModelIndex &  index) const
override

◆ setData()

bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override
+ Here is the call graph for this function:

◆ operator=()

DevicePadSignalMapModel& operator= ( const DevicePadSignalMapModel rhs)
noexcept

◆ padSignalMapEdited()

void padSignalMapEdited ( const DevicePadSignalMap map,
int  index,
const std::shared_ptr< const DevicePadSignalMapItem > &  item,
DevicePadSignalMap::Event  event 
)
privatenoexcept

◆ execCmd()

void execCmd ( UndoCommand cmd)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateComboBoxItems()

void updateComboBoxItems ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mPadSignalMap

DevicePadSignalMap* mPadSignalMap
private

◆ mUndoStack

UndoStack* mUndoStack
private

◆ mSignals

ComponentSignalList mSignals
private

◆ mPads

PackagePadList mPads
private

◆ mComboBoxItems

ComboBoxDelegate::Items mComboBoxItems
private

◆ mOnEditedSlot

DevicePadSignalMap::OnEditedSlot mOnEditedSlot
private

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