ezEngine  Release 25.03
ezQtDocumentTreeModel Class Reference

Model that maps a document to a qt tree model. More...

#include <RawDocumentTreeModel.moc.h>

Inheritance diagram for ezQtDocumentTreeModel:

Public Member Functions

 ezQtDocumentTreeModel (const ezDocumentObjectManager *pTree, const ezUuid &root=ezUuid())
 
const ezDocumentObjectManagerGetDocumentTree () const
 
void AddAdapter (ezQtDocumentTreeModelAdapter *pAdapter)
 Adds an adapter. There can only be one adapter for any object type. Added adapters are taken ownership of by the model.
 
QModelIndex ComputeModelIndex (const ezDocumentObject *pObject) const
 Returns the QModelIndex for the given object. Returned value is invalid if object is not mapped in model.
 
void SetAllowDragDrop (bool bAllow)
 Enable drag&drop support, disabled by default.
 
virtual QModelIndex index (int iRow, int iColumn, const QModelIndex &parent=QModelIndex()) const override
 
virtual QModelIndex parent (const QModelIndex &child) const override
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const override
 
virtual QVariant data (const QModelIndex &index, int iRole=Qt::DisplayRole) const override
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int iRole) override
 
virtual Qt::DropActions supportedDropActions () const override
 
virtual bool canDropMimeData (const QMimeData *pData, Qt::DropAction action, int iRow, int iColumn, const QModelIndex &parent) const override
 
virtual bool dropMimeData (const QMimeData *pData, Qt::DropAction action, int iRow, int iColumn, const QModelIndex &parent) override
 
virtual QStringList mimeTypes () const override
 
virtual QMimeData * mimeData (const QModelIndexList &indexes) const override
 

Static Public Member Functions

static bool MoveObjects (const ezDragDropInfo &info)
 

Protected Member Functions

virtual void TreeEventHandler (const ezDocumentObjectStructureEvent &e)
 

Protected Attributes

const ezDocumentObjectManagerm_pDocumentTree = nullptr
 
const ezUuid m_Root
 
ezHashTable< const ezRTTI *, ezQtDocumentTreeModelAdapter * > m_Adapters
 
bool m_bAllowDragDrop = false
 
ezString m_sTargetContext = "scenetree"
 

Detailed Description

Model that maps a document to a qt tree model.

Hierarchy is defined by ezQtDocumentTreeModelAdapter that have to be added via AddAdapter.


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