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

The ComponentPinSignalMapModel class. More...

#include <componentpinsignalmapmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for ComponentPinSignalMapModel:

Public Types

enum  Column
 

Public Member Functions

 ComponentPinSignalMapModel ()=delete
 
 ComponentPinSignalMapModel (const ComponentPinSignalMapModel &other) noexcept
 
 ComponentPinSignalMapModel (QObject *parent=nullptr) noexcept
 
 ~ComponentPinSignalMapModel () noexcept
 
void setSymbolVariant (ComponentSymbolVariant *variant) noexcept
 
void setSignalList (const ComponentSignalList *list) noexcept
 
void setSymbolsCache (const std::shared_ptr< const LibraryElementCache > &cache) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void autoAssignSignals () 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
 
ComponentPinSignalMapModeloperator= (const ComponentPinSignalMapModel &rhs) noexcept
 

Private Member Functions

void symbolItemsEdited (const ComponentSymbolVariantItemList &list, int index, const std::shared_ptr< const ComponentSymbolVariantItem > &item, ComponentSymbolVariantItemList::Event event) noexcept
 
void signalListEdited (const ComponentSignalList &list, int index, const std::shared_ptr< const ComponentSignal > &signal, ComponentSignalList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
void updateSignalComboBoxItems () noexcept
 
void getRowItem (int row, int &symbolItemIndex, std::shared_ptr< ComponentSymbolVariantItem > &symbolItem, std::shared_ptr< ComponentPinSignalMapItem > &mapItem) const noexcept
 

Private Attributes

ComponentSymbolVariantmSymbolVariant
 
const ComponentSignalListmSignals
 
std::shared_ptr< const
LibraryElementCache
mSymbolsCache
 
UndoStackmUndoStack
 
QVector< QPair< QString,
QVariant > > 
mSignalComboBoxItems
 
QVector< QPair< QString,
QVariant > > 
mDisplayTypeComboBoxItems
 
ComponentSymbolVariantItemList::OnEditedSlot mOnItemsEditedSlot
 
ComponentSignalList::OnEditedSlot mOnSignalsEditedSlot
 

Detailed Description

Member Enumeration Documentation

enum Column
Enumerator
COLUMN_SYMBOL 
COLUMN_PIN 
COLUMN_SIGNAL 
COLUMN_DISPLAY 
_COLUMN_COUNT 

Constructor & Destructor Documentation

ComponentPinSignalMapModel ( QObject *  parent = nullptr)
explicitnoexcept

+ Here is the call graph for this function:

Member Function Documentation

void setSymbolVariant ( ComponentSymbolVariant variant)
noexcept
void setSignalList ( const ComponentSignalList list)
noexcept
void setSymbolsCache ( const std::shared_ptr< const LibraryElementCache > &  cache)
noexcept
void setUndoStack ( UndoStack stack)
noexcept
void autoAssignSignals ( )
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
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:

ComponentPinSignalMapModel& operator= ( const ComponentPinSignalMapModel rhs)
noexcept
void symbolItemsEdited ( const ComponentSymbolVariantItemList list,
int  index,
const std::shared_ptr< const ComponentSymbolVariantItem > &  item,
ComponentSymbolVariantItemList::Event  event 
)
privatenoexcept
void signalListEdited ( const ComponentSignalList list,
int  index,
const std::shared_ptr< const ComponentSignal > &  signal,
ComponentSignalList::Event  event 
)
privatenoexcept
void execCmd ( UndoCommand cmd)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateSignalComboBoxItems ( )
privatenoexcept
void getRowItem ( int  row,
int &  symbolItemIndex,
std::shared_ptr< ComponentSymbolVariantItem > &  symbolItem,
std::shared_ptr< ComponentPinSignalMapItem > &  mapItem 
) const
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

ComponentSymbolVariant* mSymbolVariant
private
const ComponentSignalList* mSignals
private
std::shared_ptr<const LibraryElementCache> mSymbolsCache
private
UndoStack* mUndoStack
private
QVector<QPair<QString, QVariant> > mSignalComboBoxItems
private
QVector<QPair<QString, QVariant> > mDisplayTypeComboBoxItems
private
ComponentSignalList::OnEditedSlot mOnSignalsEditedSlot
private

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