Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::TreeItem Class Referenceabstract

Base class for element of the tree representation. More...

#include <Gui/TreeModel/TreeModel.hpp>

+ 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 30 of file TreeModel.hpp.

Constructor & Destructor Documentation

◆ TreeItem()

Ra::Gui::TreeItem::TreeItem ( )
inline

Definition at line 33 of file TreeModel.hpp.

◆ ~TreeItem()

virtual Ra::Gui::TreeItem::~TreeItem ( )
inlinevirtual

Definition at line 34 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.

◆ isChecked()

bool Ra::Gui::TreeItem::isChecked ( ) const
inline

Definition at line 60 of file TreeModel.hpp.

◆ setChecked()

void Ra::Gui::TreeItem::setChecked ( bool checked = true)
inline

Definition at line 61 of file TreeModel.hpp.

Member Data Documentation

◆ m_children

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.

◆ m_parent

TreeItem* Ra::Gui::TreeItem::m_parent { nullptr }

Definition at line 67 of file TreeModel.hpp.


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