LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ComponentSymbolVariantListModel Class Referencefinal

The ComponentSymbolVariantListModel class. More...

#include <componentsymbolvariantlistmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for ComponentSymbolVariantListModel:

Public Types

enum  Column
 

Public Member Functions

 ComponentSymbolVariantListModel ()=delete
 
 ComponentSymbolVariantListModel (const ComponentSymbolVariantListModel &other) noexcept
 
 ComponentSymbolVariantListModel (QObject *parent=nullptr) noexcept
 
 ~ComponentSymbolVariantListModel () noexcept
 
void setSymbolVariantList (ComponentSymbolVariantList *list) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void addSymbolVariant (const QVariant &editData) noexcept
 
void removeSymbolVariant (const QVariant &editData) noexcept
 
void moveSymbolVariantUp (const QVariant &editData) noexcept
 
void moveSymbolVariantDown (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
 
ComponentSymbolVariantListModeloperator= (const ComponentSymbolVariantListModel &rhs) noexcept
 

Private Member Functions

void symbolVariantListEdited (const ComponentSymbolVariantList &list, int index, const std::shared_ptr< const ComponentSymbolVariant > &variant, ComponentSymbolVariantList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 
ElementName validateNameOrThrow (const QString &name) const
 

Private Attributes

ComponentSymbolVariantListmSymbolVariantList
 
UndoStackmUndoStack
 
QString mNewName
 
QString mNewDescription
 
QString mNewNorm
 
ComponentSymbolVariantList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

enum Column
Enumerator
COLUMN_NAME 
COLUMN_DESCRIPTION 
COLUMN_NORM 
COLUMN_SYMBOLCOUNT 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

ComponentSymbolVariantListModel ( QObject *  parent = nullptr)
explicitnoexcept

Member Function Documentation

void setSymbolVariantList ( ComponentSymbolVariantList list)
noexcept
void setUndoStack ( UndoStack stack)
noexcept
void addSymbolVariant ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeSymbolVariant ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void moveSymbolVariantUp ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

void symbolVariantListEdited ( const ComponentSymbolVariantList list,
int  index,
const std::shared_ptr< const ComponentSymbolVariant > &  variant,
ComponentSymbolVariantList::Event  event 
)
privatenoexcept
void execCmd ( UndoCommand cmd)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ElementName validateNameOrThrow ( const QString &  name) const
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ComponentSymbolVariantList* mSymbolVariantList
private
UndoStack* mUndoStack
private
QString mNewName
private
QString mNewDescription
private
QString mNewNorm
private

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