LibrePCB Developers Documentation
ComponentSignalListModel Class Referencefinal

The ComponentSignalListModel class. More...

#include <componentsignallistmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for ComponentSignalListModel:

Public Types

enum  Column
 

Public Member Functions

 ComponentSignalListModel ()=delete
 
 ComponentSignalListModel (const ComponentSignalListModel &other)=delete
 
 ComponentSignalListModel (QObject *parent=nullptr) noexcept
 
 ~ComponentSignalListModel () noexcept
 
void setSignalList (ComponentSignalList *list) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void add (const QPersistentModelIndex &itemIndex) noexcept
 
void remove (const QPersistentModelIndex &itemIndex) 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
 
ComponentSignalListModeloperator= (const ComponentSignalListModel &rhs) noexcept
 

Private Member Functions

void signalListEdited (const ComponentSignalList &list, int index, const std::shared_ptr< const ComponentSignal > &signal, ComponentSignalList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
CircuitIdentifier validateNameOrThrow (const QString &name) const
 

Static Private Member Functions

static QString cleanForcedNetName (const QString &name) noexcept
 

Private Attributes

ComponentSignalListmSignalList
 
UndoStackmUndoStack
 
QString mNewName
 
bool mNewIsRequired
 
QString mNewForcedNetName
 
ComponentSignalList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

◆ Column

enum Column
Enumerator
COLUMN_NAME 
COLUMN_ISREQUIRED 
COLUMN_FORCEDNETNAME 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

◆ ComponentSignalListModel() [1/3]

◆ ComponentSignalListModel() [2/3]

◆ ComponentSignalListModel() [3/3]

ComponentSignalListModel ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~ComponentSignalListModel()

~ComponentSignalListModel ( )
noexcept

Member Function Documentation

◆ setSignalList()

void setSignalList ( ComponentSignalList list)
noexcept

◆ setUndoStack()

void setUndoStack ( UndoStack stack)
noexcept

◆ add()

void add ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void remove ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
override
+ Here is the call 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=()

ComponentSignalListModel& operator= ( const ComponentSignalListModel rhs)
noexcept

◆ signalListEdited()

void signalListEdited ( const ComponentSignalList list,
int  index,
const std::shared_ptr< const ComponentSignal > &  signal,
ComponentSignalList::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:

◆ validateNameOrThrow()

CircuitIdentifier validateNameOrThrow ( const QString &  name) const
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanForcedNetName()

QString cleanForcedNetName ( const QString &  name)
staticprivatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSignalList

ComponentSignalList* mSignalList
private

◆ mUndoStack

UndoStack* mUndoStack
private

◆ mNewName

QString mNewName
private

◆ mNewIsRequired

bool mNewIsRequired
private

◆ mNewForcedNetName

QString mNewForcedNetName
private

◆ mOnEditedSlot

ComponentSignalList::OnEditedSlot mOnEditedSlot
private

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