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

The FootprintListModel class. More...

#include <footprintlistmodel.h>

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

+ Collaboration diagram for FootprintListModel:

Signals

void footprintAdded (int index)
 

Public Member Functions

 FootprintListModel (const FootprintListModel &other)=delete
 
 FootprintListModel (QObject *parent=nullptr) noexcept
 
 ~FootprintListModel () noexcept
 
void setReferences (Package *pkg, UndoStack *stack) noexcept
 
void add (const QString &name) noexcept
 
void apply ()
 
std::size_t row_count () const override
 
std::optional< ui::FootprintData > row_data (std::size_t i) const override
 
void set_row_data (std::size_t i, const ui::FootprintData &data) noexcept override
 
FootprintListModeloperator= (const FootprintListModel &rhs)=delete
 

Private Member Functions

ui::FootprintData createItem (const Footprint &obj) noexcept
 
void updateTags (const Footprint &obj, ui::FootprintData &item) noexcept
 
void updateModels (const Footprint &obj, ui::FootprintData &item) noexcept
 
void trigger (int index, std::shared_ptr< Footprint > obj, ui::FootprintAction a) noexcept
 
void listEdited (const FootprintList &list, int index, const std::shared_ptr< const Footprint > &item, FootprintList::Event event) noexcept
 
void modelListEdited (const PackageModelList &list, int index, const std::shared_ptr< const PackageModel > &item, PackageModelList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
ElementName validateNameOrThrow (const QString &name) const
 

Private Attributes

QPointer< PackagemPackage
 
QPointer< UndoStackmUndoStack
 
QList< ui::FootprintData > mItems
 
FootprintList::OnEditedSlot mOnEditedSlot
 
PackageModelList::OnEditedSlot mOnModelsEditedSlot
 

Detailed Description

The FootprintListModel class.

Constructor & Destructor Documentation

◆ FootprintListModel() [1/2]

FootprintListModel ( const FootprintListModel other)
delete

◆ FootprintListModel() [2/2]

FootprintListModel ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~FootprintListModel()

~FootprintListModel ( )
noexcept

Member Function Documentation

◆ setReferences()

void setReferences ( Package pkg,
UndoStack stack 
)
noexcept

◆ add()

void add ( const QString &  name)
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::FootprintData > row_data ( std::size_t  i) const
override

◆ set_row_data()

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

◆ operator=()

FootprintListModel & operator= ( const FootprintListModel rhs)
delete

◆ footprintAdded

void footprintAdded ( int  index)
signal

◆ createItem()

ui::FootprintData createItem ( const Footprint obj)
privatenoexcept
+ Here is the call graph for this function:

◆ updateTags()

void updateTags ( const Footprint obj,
ui::FootprintData &  item 
)
privatenoexcept
+ Here is the call graph for this function:

◆ updateModels()

void updateModels ( const Footprint obj,
ui::FootprintData &  item 
)
privatenoexcept

◆ trigger()

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

◆ listEdited()

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

◆ modelListEdited()

void modelListEdited ( const PackageModelList list,
int  index,
const std::shared_ptr< const PackageModel > &  item,
PackageModelList::Event  event 
)
privatenoexcept

◆ execCmd()

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

◆ validateNameOrThrow()

ElementName validateNameOrThrow ( const QString &  name) const
private

Member Data Documentation

◆ mPackage

QPointer<Package> mPackage
private

◆ mUndoStack

QPointer<UndoStack> mUndoStack
private

◆ mItems

QList<ui::FootprintData> mItems
private

◆ mOnEditedSlot

FootprintList::OnEditedSlot mOnEditedSlot
private

◆ mOnModelsEditedSlot

PackageModelList::OnEditedSlot mOnModelsEditedSlot
private

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