API Documentation
Loading...
Searching...
No Matches
QTModelManagerView Class Referencefinal

A Qt compatible ItemModel for interfacing with a DesignObjectLookup. More...

#include <QTModelManagerView.h>

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

Classes

struct  ModelCache
 

Public Member Functions

void addModel (UUID id)
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
ModelCache createCache (const Model &model, bool recursive, bool parent_visible) const
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant data (const UUID &id, int role) const
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
UUID getID (const QModelIndex &model_index) const
 
QModelIndex getIndex (const Model &model) const
 
QModelIndex getIndex (const UUID &id) const
 
bool hasCached (const UUID &id) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QIcon::Mode iconMode (const QModelIndex &index) const
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QTModelManagermanager ()
 
Model model (const QModelIndex &model_index) const
 
Model model (uint04 row, const QModelIndex &parent) const
 
QModelIndex parent (const QModelIndex &index) const override
 
 QTModelManagerView (QTModelManager *manager, QObject *parent=nullptr)
 
void recursiveCacheRemove (const UUID &id)
 
void refreshAll ()
 
const Buffer< UUID > & rootModels () const
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
void setIsRootFilter (const std::function< bool(const Model &)> &filter)
 
void setRootModels (const Buffer< UUID > &roots)
 
void updateModel3DVisible (const UUID &id, bool visible)
 
virtual ~QTModelManagerView ()=default
 

Protected Slots

void clearAll ()
 
void modelAdded (Buffer< UUID > id)
 
void modelDeleted (Buffer< UUID > id)
 
void modelFocussed (UUID id, bool selected)
 
void modelUpdated (UUID id)
 
void modelUpdatedSlot (const Buffer< UUID > &updated_ids)
 
void objectSelected (Buffer< UUID > id, bool selected)
 
void projectChanged (UUID id)
 
void topLevelChanged (Buffer< UUID > id)
 

Protected Attributes

Dictionary< UUID, ModelCachem_cached_indices
 
Buffer< UUIDm_index_ids
 
QTModelManagerm_manager
 
UUID m_project_id
 
std::function< bool(const Model &)> m_root_filter
 
Buffer< UUIDm_root_models
 
UUID m_tree_capture_id
 

Detailed Description

A Qt compatible ItemModel for interfacing with a DesignObjectLookup.


Constructor & Destructor Documentation

◆ QTModelManagerView()

QTModelManagerView ( QTModelManager * manager,
QObject * parent = nullptr )

◆ ~QTModelManagerView()

virtual ~QTModelManagerView ( )
virtualdefault

Member Function Documentation

◆ addModel()

void addModel ( UUID id)

◆ clearAll

void clearAll ( )
protectedslot

◆ columnCount()

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

◆ createCache()

ModelCache createCache ( const Model & model,
bool recursive,
bool parent_visible ) const

◆ data() [1/2]

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

◆ data() [2/2]

QVariant data ( const UUID & id,
int role ) const

◆ flags()

Qt::ItemFlags flags ( const QModelIndex & index) const
override

◆ getID()

UUID getID ( const QModelIndex & model_index) const

◆ getIndex() [1/2]

QModelIndex getIndex ( const Model & model) const

◆ getIndex() [2/2]

QModelIndex getIndex ( const UUID & id) const

◆ hasCached()

bool hasCached ( const UUID & id) const

◆ headerData()

QVariant headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
override

◆ iconMode()

QIcon::Mode iconMode ( const QModelIndex & index) const

◆ index()

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

◆ manager()

QTModelManager & manager ( )

◆ model() [1/2]

Model model ( const QModelIndex & model_index) const

◆ model() [2/2]

Model model ( uint04 row,
const QModelIndex & parent ) const

◆ modelAdded

void modelAdded ( Buffer< UUID > id)
protectedslot

◆ modelDeleted

void modelDeleted ( Buffer< UUID > id)
protectedslot

◆ modelFocussed

void modelFocussed ( UUID id,
bool selected )
protectedslot

◆ modelUpdated

void modelUpdated ( UUID id)
protectedslot

◆ modelUpdatedSlot

void modelUpdatedSlot ( const Buffer< UUID > & updated_ids)
protectedslot

◆ objectSelected

void objectSelected ( Buffer< UUID > id,
bool selected )
protectedslot

◆ parent()

QModelIndex parent ( const QModelIndex & index) const
override

◆ projectChanged

void projectChanged ( UUID id)
protectedslot

◆ recursiveCacheRemove()

void recursiveCacheRemove ( const UUID & id)

◆ refreshAll()

void refreshAll ( )

◆ rootModels()

const Buffer< UUID > & rootModels ( ) const
inline

◆ rowCount()

virtual int rowCount ( const QModelIndex & parent = QModelIndex()) const
overridevirtual

◆ setData()

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

◆ setIsRootFilter()

void setIsRootFilter ( const std::function< bool(const Model &)> & filter)
inline

◆ setRootModels()

void setRootModels ( const Buffer< UUID > & roots)

◆ topLevelChanged

void topLevelChanged ( Buffer< UUID > id)
protectedslot

◆ updateModel3DVisible()

void updateModel3DVisible ( const UUID & id,
bool visible )

Member Data Documentation

◆ m_cached_indices

Dictionary<UUID, ModelCache> m_cached_indices
mutableprotected

◆ m_index_ids

Buffer<UUID> m_index_ids
mutableprotected

◆ m_manager

QTModelManager* m_manager
protected

◆ m_project_id

UUID m_project_id
protected

◆ m_root_filter

std::function<bool(const Model&)> m_root_filter
protected

◆ m_root_models

Buffer<UUID> m_root_models
protected

◆ m_tree_capture_id

UUID m_tree_capture_id
protected

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