Radium Engine
1.5.20
|
#include <Gui/TreeModel/EntityTreeModel.hpp>
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::ItemEntry & | getEntry (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 | |
TreeItem * | getItem (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::RadiumEngine * | m_engine |
Engine instance. | |
Protected Attributes inherited from Ra::Gui::TreeModel | |
std::unique_ptr< TreeItem > | m_rootItem |
Root of the tree. | |
Implementation of QAbstractItemModel to show the engine objects as a tree in the main GUI.
Definition at line 29 of file EntityTreeModel.hpp.
|
inlineexplicit |
Definition at line 33 of file EntityTreeModel.hpp.
|
slot |
Definition at line 71 of file EntityTreeModel.cpp.
|
overrideprotectedvirtual |
Internal function to build the tree.
Implements Ra::Gui::TreeModel.
Definition at line 17 of file EntityTreeModel.cpp.
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.
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.
|
inlineoverrideprotectedvirtual |
Implements Ra::Gui::TreeModel.
Definition at line 69 of file EntityTreeModel.hpp.
|
slot |
Definition at line 121 of file EntityTreeModel.cpp.
|
protected |
Engine instance.
Definition at line 73 of file EntityTreeModel.hpp.