TypeBrowserTreeNode Class Referenceabstract

Classes

struct  UpdateData
 

Public Types

typedef std::function< void(UpdateData)> UpdateNodeCallback
 

Public Member Functions

class TypeBrowserModelDatamodel () const
 
std::optional< std::shared_ptr< TypeBrowserTreeNode > > parent () const
 
const std::vector< std::shared_ptr< TypeBrowserTreeNode > > & children ()
 
int indexOfChild (std::shared_ptr< const TypeBrowserTreeNode > child) const
 
virtual std::string text (int column) const =0
 
virtual bool lessThan (const TypeBrowserTreeNode &other, int column) const =0
 
virtual bool filter (const std::string &filter, TypeBrowserFilterMode mode) const =0
 
virtual void updateChildren (bool recursive, UpdateNodeCallback update)
 

Protected Member Functions

 TypeBrowserTreeNode (class TypeBrowserModelData *model, std::optional< std::weak_ptr< TypeBrowserTreeNode > > parent)
 
virtual ~TypeBrowserTreeNode ()=default
 
virtual void generateChildren ()=0
 
void updateChildIndices ()
 
void removeChild (std::shared_ptr< TypeBrowserTreeNode > child)
 
void addChild (std::shared_ptr< TypeBrowserTreeNode > child)
 

Protected Attributes

class TypeBrowserModelDatam_model
 
std::optional< std::weak_ptr< TypeBrowserTreeNode > > m_parent
 
std::vector< std::shared_ptr< TypeBrowserTreeNode > > m_children
 
std::map< const TypeBrowserTreeNode *, size_t > m_childIndices
 
bool m_hasGeneratedChildren
 

Member Typedef Documentation

◆ UpdateNodeCallback

Constructor & Destructor Documentation

◆ TypeBrowserTreeNode()

TypeBrowserTreeNode::TypeBrowserTreeNode ( class TypeBrowserModelData model,
std::optional< std::weak_ptr< TypeBrowserTreeNode > >  parent 
)
protected

◆ ~TypeBrowserTreeNode()

virtual TypeBrowserTreeNode::~TypeBrowserTreeNode ( )
protectedvirtualdefault

Member Function Documentation

◆ generateChildren()

virtual void TypeBrowserTreeNode::generateChildren ( )
protectedpure virtual

◆ updateChildIndices()

void TypeBrowserTreeNode::updateChildIndices ( )
protected

◆ removeChild()

void TypeBrowserTreeNode::removeChild ( std::shared_ptr< TypeBrowserTreeNode child)
protected

◆ addChild()

void TypeBrowserTreeNode::addChild ( std::shared_ptr< TypeBrowserTreeNode child)
protected

◆ model()

class TypeBrowserModelData * TypeBrowserTreeNode::model ( ) const
inline

◆ parent()

std::optional< std::shared_ptr< TypeBrowserTreeNode > > TypeBrowserTreeNode::parent ( ) const

◆ children()

const std::vector< std::shared_ptr< TypeBrowserTreeNode > > & TypeBrowserTreeNode::children ( )

◆ indexOfChild()

int TypeBrowserTreeNode::indexOfChild ( std::shared_ptr< const TypeBrowserTreeNode child) const

◆ text()

virtual std::string TypeBrowserTreeNode::text ( int  column) const
pure virtual

◆ lessThan()

virtual bool TypeBrowserTreeNode::lessThan ( const TypeBrowserTreeNode other,
int  column 
) const
pure virtual

◆ filter()

virtual bool TypeBrowserTreeNode::filter ( const std::string &  filter,
TypeBrowserFilterMode  mode 
) const
pure virtual

◆ updateChildren()

virtual void TypeBrowserTreeNode::updateChildren ( bool  recursive,
UpdateNodeCallback  update 
)
virtual

Member Data Documentation

◆ m_model

class TypeBrowserModelData* TypeBrowserTreeNode::m_model
protected

◆ m_parent

std::optional<std::weak_ptr<TypeBrowserTreeNode> > TypeBrowserTreeNode::m_parent
protected

◆ m_children

std::vector<std::shared_ptr<TypeBrowserTreeNode> > TypeBrowserTreeNode::m_children
protected

◆ m_childIndices

std::map<const TypeBrowserTreeNode*, size_t> TypeBrowserTreeNode::m_childIndices
protected

◆ m_hasGeneratedChildren

bool TypeBrowserTreeNode::m_hasGeneratedChildren
protected