Loading [MathJax]/extensions/TeX/AMSsymbols.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Ra::Gui::ItemModel Class Reference

#include <Gui/TreeModel/EntityTreeModel.hpp>

+ Inheritance diagram for Ra::Gui::ItemModel:
+ Collaboration diagram for Ra::Gui::ItemModel:

Public Slots

void addItem (const Engine::Scene::ItemEntry &ent)
 
void removeItem (const Engine::Scene::ItemEntry &ent)
 

Signals

void visibilityROChanged (Ra::Core::Utils::Index roIndex, bool visible)
 
- Signals inherited from Ra::Gui::TreeModel
void modelRebuilt ()
 Emitted when the model has been rebuilt.
 

Public Member Functions

 ItemModel (const Engine::RadiumEngine *engine, QObject *parent=nullptr)
 
const Engine::Scene::ItemEntrygetEntry (const QModelIndex &index) const
 
QModelIndex findEntryIndex (const Engine::Scene::ItemEntry &entry) const
 
- Public Member Functions inherited from Ra::Gui::TreeModel
 TreeModel (QObject *parent=nullptr)
 
void rebuildModel ()
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &child) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 

Protected Member Functions

void buildModel () override
 Internal function to build the tree.
 
std::string getHeaderString () const override
 
- Protected Member Functions inherited from Ra::Gui::TreeModel
TreeItemgetItem (const QModelIndex &index) const
 Get the tree item corresponding to the given index.
 
bool findInTree (const TreeItem *item) const
 Internal functions to check if an item is in the tree.
 
void printModel () const
 Prints elements in the model to stdout (debug only)
 
void setAllItemsChecked (bool checked=true)
 Set the check state of all items.
 
void setItemChecked (const QModelIndex &index, bool checked=true)
 Set the check state of one item and all of its children.
 

Protected Attributes

const Engine::RadiumEnginem_engine
 Engine instance.
 
- Protected Attributes inherited from Ra::Gui::TreeModel
std::unique_ptr< TreeItemm_rootItem
 Root of the tree.
 

Detailed Description

Implementation of QAbstractItemModel to show the engine objects as a tree in the main GUI.

Definition at line 29 of file EntityTreeModel.hpp.

Member Function Documentation

◆ findEntryIndex()

QModelIndex Ra::Gui::ItemModel::findEntryIndex ( const Engine::Scene::ItemEntry entry) const

Returns the index corresponding to the given entry if it exists in the model, or an invalid index if not found.

Definition at line 49 of file EntityTreeModel.cpp.

+ Here is the call graph for this function:

◆ getEntry()

const ItemEntry & Ra::Gui::ItemModel::getEntry ( const QModelIndex &  index) const

Returns the entry corresponding to a given index or an invalid entry if the index doesn't match any entry.

Definition at line 45 of file EntityTreeModel.cpp.

+ Here is the call graph for this function:

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