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

#include <Gui/TreeModel/TreeModel.hpp>

Inherited by Ra::Gui::EngineTreeItem.

+ Collaboration diagram for Ra::Gui::TreeItem:

Public Member Functions

 TreeItem (const TreeItem &)=delete
 TreeItems are non-copyable.
 
TreeItemoperator= (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.

TreeItemm_parent { nullptr }
 
std::vector< std::unique_ptr< TreeItem > > m_children
 Children of item in the tree.
 

Detailed Description

Base class for element of the tree representation. It just maintains a tree structure leaving the data storage to derived classes.

Definition at line 28 of file TreeModel.hpp.

Member Function Documentation

◆ getIndexInParent()

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.


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