API Documentation
Loading...
Searching...
No Matches
LayerModel Class Reference

Used for showing Layers in a table using the QAbstractItemModel interface. More...

#include <LayerWidget.h>

Inheritance diagram for LayerModel:
[legend]
Collaboration diagram for LayerModel:
[legend]

Public Member Functions

QVector< int > cacheObject (UUID id)
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
 LayerModel (QTModelManager *manager)
 
const Buffer< UUID > & layers () const
 
QModelIndex parent (const QModelIndex &child) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 

Protected Slots

void layerAddedSlot (Buffer< UUID > layer)
 
void layerUpdated (UUID layer)
 
void onClearAllSlot ()
 

Protected Attributes

Dictionary< UUID, LayerCacheObjectm_layer_cache
 
Buffer< UUIDm_layers
 
QTModelManagerm_manager
 

Detailed Description

Used for showing Layers in a table using the QAbstractItemModel interface.


Constructor & Destructor Documentation

◆ LayerModel()

LayerModel ( QTModelManager * manager)

Member Function Documentation

◆ cacheObject()

QVector< int > cacheObject ( UUID id)

◆ columnCount()

int columnCount ( const QModelIndex & parent = QModelIndex()) const
override

◆ data()

QVariant data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
override

◆ hasChildren()

bool hasChildren ( const QModelIndex & parent = QModelIndex()) const
override

◆ index()

QModelIndex index ( int row,
int column,
const QModelIndex & parent = QModelIndex() ) const
override

◆ layerAddedSlot

void layerAddedSlot ( Buffer< UUID > layer)
protectedslot

◆ layers()

const Buffer< UUID > & layers ( ) const
inline

◆ layerUpdated

void layerUpdated ( UUID layer)
protectedslot

◆ onClearAllSlot

void onClearAllSlot ( )
protectedslot

◆ parent()

QModelIndex parent ( const QModelIndex & child) const
override

◆ rowCount()

int rowCount ( const QModelIndex & parent = QModelIndex()) const
override

◆ setData()

bool setData ( const QModelIndex & index,
const QVariant & value,
int role = Qt::EditRole )
override

Member Data Documentation

◆ m_layer_cache

Dictionary<UUID, LayerCacheObject> m_layer_cache
mutableprotected

◆ m_layers

Buffer<UUID> m_layers
protected

◆ m_manager

QTModelManager* m_manager
protected

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