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

The ComponentVariantListModel class. More...

#include <componentvariantlistmodel.h>

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

+ Collaboration diagram for ComponentVariantListModel:

Public Member Functions

 ComponentVariantListModel ()=delete
 
 ComponentVariantListModel (const ComponentVariantListModel &other)=delete
 
 ComponentVariantListModel (const Workspace &ws, const GraphicsLayerList &layers, const LibraryElementCache &cache, QObject *parent=nullptr) noexcept
 
 ~ComponentVariantListModel () noexcept
 
void setReferences (ComponentSymbolVariantList *list, QPointer< Component > component, const std::shared_ptr< ComponentSignalNameListModel > &sigs, UndoStack *stack, const bool *wizardMode) noexcept
 
slint::Image renderScene (int variant, int gate, float width, float height) noexcept
 
void add () noexcept
 
std::size_t row_count () const override
 
std::optional< ui::ComponentVariantData > row_data (std::size_t i) const override
 
void set_row_data (std::size_t i, const ui::ComponentVariantData &data) noexcept override
 
ComponentVariantListModeloperator= (const ComponentVariantListModel &rhs)=delete
 

Private Member Functions

void trigger (int index, std::shared_ptr< ComponentSymbolVariant > obj, ui::ComponentVariantAction a) noexcept
 
void listEdited (const ComponentSymbolVariantList &list, int index, const std::shared_ptr< const ComponentSymbolVariant > &variant, ComponentSymbolVariantList::Event event) noexcept
 
void variantUiDataChanged () noexcept
 
void execCmd (UndoCommand *cmd)
 

Private Attributes

const WorkspacemWorkspace
 
const GraphicsLayerListmLayers
 
const LibraryElementCachemCache
 
QPointer< ComponentmComponent
 
std::shared_ptr< ComponentSignalNameListModelmSignals
 
ComponentSymbolVariantListmList
 
QPointer< UndoStackmUndoStack
 
const bool * mWizardMode
 
QList< std::shared_ptr< ComponentVariantEditor > > mItems
 
ComponentSymbolVariantList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Constructor & Destructor Documentation

◆ ComponentVariantListModel() [1/3]

◆ ComponentVariantListModel() [2/3]

◆ ComponentVariantListModel() [3/3]

ComponentVariantListModel ( const Workspace ws,
const GraphicsLayerList layers,
const LibraryElementCache cache,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ~ComponentVariantListModel()

Member Function Documentation

◆ setReferences()

void setReferences ( ComponentSymbolVariantList list,
QPointer< Component component,
const std::shared_ptr< ComponentSignalNameListModel > &  sigs,
UndoStack stack,
const bool *  wizardMode 
)
noexcept
+ Here is the call graph for this function:

◆ renderScene()

slint::Image renderScene ( int  variant,
int  gate,
float  width,
float  height 
)
noexcept

◆ add()

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

◆ row_count()

std::size_t row_count ( ) const
override

◆ row_data()

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

◆ set_row_data()

void set_row_data ( std::size_t  i,
const ui::ComponentVariantData &  data 
)
overridenoexcept

◆ operator=()

ComponentVariantListModel & operator= ( const ComponentVariantListModel rhs)
delete

◆ trigger()

void trigger ( int  index,
std::shared_ptr< ComponentSymbolVariant obj,
ui::ComponentVariantAction  a 
)
privatenoexcept
+ Here is the call graph for this function:

◆ listEdited()

void listEdited ( const ComponentSymbolVariantList list,
int  index,
const std::shared_ptr< const ComponentSymbolVariant > &  variant,
ComponentSymbolVariantList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:

◆ variantUiDataChanged()

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

◆ execCmd()

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

Member Data Documentation

◆ mWorkspace

const Workspace& mWorkspace
private

◆ mLayers

const GraphicsLayerList& mLayers
private

◆ mCache

const LibraryElementCache& mCache
private

◆ mComponent

QPointer<Component> mComponent
private

◆ mSignals

std::shared_ptr<ComponentSignalNameListModel> mSignals
private

◆ mList

◆ mUndoStack

QPointer<UndoStack> mUndoStack
private

◆ mWizardMode

const bool* mWizardMode
private

◆ mItems

QList<std::shared_ptr<ComponentVariantEditor> > mItems
private

◆ mOnEditedSlot


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