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

The ComponentSymbolVariantItemListModel class. More...

#include <componentsymbolvariantitemlistmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for ComponentSymbolVariantItemListModel:

Public Types

enum  Column
 

Public Member Functions

 ComponentSymbolVariantItemListModel ()=delete
 
 ComponentSymbolVariantItemListModel (const ComponentSymbolVariantItemListModel &other) noexcept
 
 ComponentSymbolVariantItemListModel (QObject *parent=nullptr) noexcept
 
 ~ComponentSymbolVariantItemListModel () noexcept
 
void setItemList (ComponentSymbolVariantItemList *list) noexcept
 
void setSymbolsCache (const std::shared_ptr< const LibraryElementCache > &cache) noexcept
 
void setUndoStack (UndoStack *stack) noexcept
 
void addItem (const QVariant &editData) noexcept
 
void removeItem (const QVariant &editData) noexcept
 
void moveItemUp (const QVariant &editData) noexcept
 
void moveItemDown (const QVariant &editData) noexcept
 
void changeSymbol (const QVariant &editData, const Uuid &symbol) 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
 
ComponentSymbolVariantItemListModeloperator= (const ComponentSymbolVariantItemListModel &rhs) noexcept
 

Private Member Functions

void itemListEdited (const ComponentSymbolVariantItemList &list, int index, const std::shared_ptr< const ComponentSymbolVariantItem > &item, ComponentSymbolVariantItemList::Event event) noexcept
 
void execCmd (UndoCommand *cmd)
 

Private Attributes

ComponentSymbolVariantItemListmItemList
 
std::shared_ptr< const
LibraryElementCache
mSymbolsCache
 
UndoStackmUndoStack
 
tl::optional< UuidmNewSymbolUuid
 
QString mNewSuffix
 
bool mNewIsRequired
 
Point mNewPosition
 
Angle mNewRotation
 
ComponentSymbolVariantItemList::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

enum Column
Enumerator
COLUMN_NUMBER 
COLUMN_SYMBOL 
COLUMN_SUFFIX 
COLUMN_ISREQUIRED 
COLUMN_X 
COLUMN_Y 
COLUMN_ROTATION 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

ComponentSymbolVariantItemListModel ( QObject *  parent = nullptr)
explicitnoexcept

Member Function Documentation

void setItemList ( ComponentSymbolVariantItemList list)
noexcept
void setSymbolsCache ( const std::shared_ptr< const LibraryElementCache > &  cache)
noexcept
void setUndoStack ( UndoStack stack)
noexcept
void addItem ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeItem ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void moveItemUp ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void moveItemDown ( const QVariant &  editData)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void changeSymbol ( const QVariant &  editData,
const Uuid symbol 
)
noexcept

+ Here is the call 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 itemListEdited ( const ComponentSymbolVariantItemList list,
int  index,
const std::shared_ptr< const ComponentSymbolVariantItem > &  item,
ComponentSymbolVariantItemList::Event  event 
)
privatenoexcept
void execCmd ( UndoCommand cmd)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ComponentSymbolVariantItemList* mItemList
private
std::shared_ptr<const LibraryElementCache> mSymbolsCache
private
UndoStack* mUndoStack
private
tl::optional<Uuid> mNewSymbolUuid
private
QString mNewSuffix
private
bool mNewIsRequired
private
Point mNewPosition
private
Angle mNewRotation
private

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