LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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) noexcept
 
 ComponentSignalListModel (QObject *parent=nullptr) noexcept
 
 ~ComponentSignalListModel () noexcept
 
void setSignalList (ComponentSignalList *list) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void addSignal (const QVariant &editData) noexcept
 
void removeSignal (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
 
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

enum Column
Enumerator
COLUMN_NAME 
COLUMN_ISREQUIRED 
COLUMN_FORCEDNETNAME 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

ComponentSignalListModel ( QObject *  parent = nullptr)
explicitnoexcept
~ComponentSignalListModel ( )
noexcept

Member Function Documentation

void setSignalList ( ComponentSignalList list)
noexcept
void setUndoStack ( UndoStack stack)
noexcept
void addSignal ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeSignal ( 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:

ComponentSignalListModel& operator= ( const ComponentSignalListModel rhs)
noexcept
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:

CircuitIdentifier validateNameOrThrow ( const QString &  name) const
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

ComponentSignalList* mSignalList
private
UndoStack* mUndoStack
private
QString mNewName
private
bool mNewIsRequired
private
QString mNewForcedNetName
private
ComponentSignalList::OnEditedSlot mOnEditedSlot
private

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