Radium Engine
1.5.20
|
Base class for element of the tree representation. More...
#include <Gui/TreeModel/TreeModel.hpp>
Public Member Functions | |
TreeItem (const TreeItem &)=delete | |
TreeItems are non-copyable. | |
TreeItem & | operator= (const TreeItem &)=delete |
Interface | |
Returns the name of the represented item to be displayed in the Qt tree. | |
virtual std::string | getName () const =0 |
virtual bool | isValid () const =0 |
Return true if the represented object is valid. | |
virtual bool | isSelectable () const =0 |
Return true if the represented object can be selected. | |
Other functions | |
int | getIndexInParent () const |
bool | isChecked () const |
void | setChecked (bool checked=true) |
Public Attributes | |
Tree structure variables | |
Parent object of item. | |
TreeItem * | m_parent { nullptr } |
std::vector< std::unique_ptr< TreeItem > > | m_children |
Children of item in the tree. | |
Base class for element of the tree representation.
It just maintains a tree structure leaving the data storage to derived classes.
Definition at line 30 of file TreeModel.hpp.
|
inline |
Definition at line 33 of file TreeModel.hpp.
|
inlinevirtual |
Definition at line 34 of file TreeModel.hpp.
int Ra::Gui::TreeItem::getIndexInParent | ( | ) | const |
Return the index of this object in the parents' child list. Of course this won't work for the root item.
Definition at line 159 of file EntityTreeModel.cpp.
|
inline |
Definition at line 60 of file TreeModel.hpp.
|
inline |
Definition at line 61 of file TreeModel.hpp.
std::vector<std::unique_ptr<TreeItem> > Ra::Gui::TreeItem::m_children |
Children of item in the tree.
Definition at line 70 of file TreeModel.hpp.
TreeItem* Ra::Gui::TreeItem::m_parent { nullptr } |
Definition at line 67 of file TreeModel.hpp.