Rosetta
Classes | Public Member Functions | Public Attributes | List of all members
ui::util::TreeNodeModel< T > Struct Template Reference

#include <tree_node.h>

Inheritance diagram for ui::util::TreeNodeModel< T >:
Inheritance graph
[legend]

Classes

struct  Node
 

Public Member Functions

 TreeNodeModel (QObject *parent=nullptr)
 
Nodeget_node (QModelIndex const &index) const
 
QModelIndex index (int row, int column, const QModelIndex &parent) const override
 
QModelIndex parent (const QModelIndex &index) const override
 
int rowCount (QModelIndex const &parent) const override
 

Public Attributes

Node root_
 

Detailed Description

template<typename T>
struct ui::util::TreeNodeModel< T >

auxiliary class to generate tree-like structures as a helper when creating QAbstractItemModel-like types

Usage:

Example of usage could be seen in: ui/network/bowman_model.h

Constructor & Destructor Documentation

◆ TreeNodeModel()

template<typename T >
ui::util::TreeNodeModel< T >::TreeNodeModel ( QObject parent = nullptr)
inlineexplicit

Member Function Documentation

◆ get_node()

template<typename T >
TreeNodeModel< T >::Node * ui::util::TreeNodeModel< T >::get_node ( QModelIndex const &  index) const

◆ index()

template<typename T >
QModelIndex ui::util::TreeNodeModel< T >::index ( int  row,
int  column,
const QModelIndex &  parent 
) const
override

◆ parent()

template<typename T >
QModelIndex ui::util::TreeNodeModel< T >::parent ( const QModelIndex &  index) const
override

◆ rowCount()

template<typename T >
int ui::util::TreeNodeModel< T >::rowCount ( QModelIndex const &  parent) const
override

Member Data Documentation

◆ root_

template<typename T >
Node ui::util::TreeNodeModel< T >::root_
mutable

The documentation for this struct was generated from the following file: