LibrePCB Developers Documentation
Loading...
Searching...
No Matches
ComponentSignalListModel Class Referencefinal

The ComponentSignalListModel class. More...

#include <componentsignallistmodel.h>

Inherits QObject, and Model< ui::ComponentSignalData >.

+ Collaboration diagram for ComponentSignalListModel:

Public Member Functions

 ComponentSignalListModel (const ComponentSignalListModel &other)=delete
 
 ComponentSignalListModel (QObject *parent=nullptr) noexcept
 
 ~ComponentSignalListModel () noexcept
 
void setReferences (Component *component, UndoStack *stack) noexcept
 
bool add (QString names) noexcept
 
void apply ()
 
std::size_t row_count () const override
 
std::optional< ui::ComponentSignalData > row_data (std::size_t i) const override
 
void set_row_data (std::size_t i, const ui::ComponentSignalData &data) noexcept override
 
ComponentSignalListModeloperator= (const ComponentSignalListModel &rhs)=delete
 

Private Member Functions

ui::ComponentSignalData createItem (const ComponentSignal &obj, int sortIndex) noexcept
 
void updateSortOrder (bool notify) noexcept
 
void listEdited (const ComponentSignalList &list, int index, const std::shared_ptr< const ComponentSignal > &item, 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

QPointer< ComponentmComponent
 
QPointer< UndoStackmUndoStack
 
QList< ui::ComponentSignalData > mItems
 
ComponentSignalList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Constructor & Destructor Documentation

◆ ComponentSignalListModel() [1/2]

◆ ComponentSignalListModel() [2/2]

ComponentSignalListModel ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~ComponentSignalListModel()

~ComponentSignalListModel ( )
noexcept

Member Function Documentation

◆ setReferences()

void setReferences ( Component component,
UndoStack stack 
)
noexcept

◆ add()

bool add ( QString  names)
noexcept
+ Here is the call graph for this function:

◆ apply()

void apply ( )
+ Here is the call graph for this function:

◆ row_count()

std::size_t row_count ( ) const
override

◆ row_data()

std::optional< ui::ComponentSignalData > row_data ( std::size_t  i) const
override

◆ set_row_data()

void set_row_data ( std::size_t  i,
const ui::ComponentSignalData &  data 
)
overridenoexcept
+ Here is the call graph for this function:

◆ operator=()

ComponentSignalListModel & operator= ( const ComponentSignalListModel rhs)
delete

◆ createItem()

ui::ComponentSignalData createItem ( const ComponentSignal obj,
int  sortIndex 
)
privatenoexcept
+ Here is the call graph for this function:

◆ updateSortOrder()

void updateSortOrder ( bool  notify)
privatenoexcept
+ Here is the call graph for this function:

◆ listEdited()

void listEdited ( const ComponentSignalList list,
int  index,
const std::shared_ptr< const ComponentSignal > &  item,
ComponentSignalList::Event  event 
)
privatenoexcept

◆ execCmd()

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

◆ validateNameOrThrow()

CircuitIdentifier validateNameOrThrow ( const QString &  name) const
private
+ 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

◆ mComponent

QPointer<Component> mComponent
private

◆ mUndoStack

QPointer<UndoStack> mUndoStack
private

◆ mItems

QList<ui::ComponentSignalData> mItems
private

◆ mOnEditedSlot

ComponentSignalList::OnEditedSlot mOnEditedSlot
private

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