maliput_viz
PhaseTreeModel Class Reference

Detailed Description

Model for describing a tree view for the phase rings and their phases.

Treeview example:

PhaseRing#1 |_____ PhaseA#1 |_____ PhaseA#2 PhaseRing#2 |_____ PhaseB#1 |_____ PhaseB#2

#include <src/maliput_viz/plugins/maliput_viewer_plugin.hh>

Inheritance diagram for PhaseTreeModel:
[legend]

Public Member Functions

 PhaseTreeModel (QObject *parent)
 
void AddPhaseRing (const std::string &_phaseRingName)
 Adds a new row to the treeview to group all the phases of a new phase ring. More...
 
void AddPhaseToPhaseRing (const std::string &_phaseName, const std::string &_phaseRingName)
 Adds a new row under the _phaseRingName row to indicate a new phase. More...
 
bool IsPhaseRingItem (const QStandardItem *_phaseRingItem) const
 
bool IsPhaseItem (const QStandardItem *_phaseItem, const QStandardItem *_phaseRingItem) const
 
void Clear ()
 Clear the model. More...
 

Constructor & Destructor Documentation

◆ PhaseTreeModel()

PhaseTreeModel ( QObject parent)

Member Function Documentation

◆ AddPhaseRing()

void AddPhaseRing ( const std::string &  _phaseRingName)

Adds a new row to the treeview to group all the phases of a new phase ring.

Parameters
[in]_phaseRingNameUnique name of the new phase ring.

◆ AddPhaseToPhaseRing()

void AddPhaseToPhaseRing ( const std::string &  _phaseName,
const std::string &  _phaseRingName 
)

Adds a new row under the _phaseRingName row to indicate a new phase.

Parameters
[in]_phaseNameUnique name in the phase ring for the new phase.
[in]_phaseRingNameName of the existing phase ring where the new phase should be added.
Note
The phase ring should be previously added using AddPhaseRing method.

◆ Clear()

void Clear ( )

Clear the model.

◆ IsPhaseItem()

bool IsPhaseItem ( const QStandardItem *  _phaseItem,
const QStandardItem *  _phaseRingItem 
) const
Parameters
[in]_phaseItemPhase item.
[in]_phaseRingItemPhase ring item.
Returns
true when the phase item corresponds to a valid previously added phase under the provided phase ring.

◆ IsPhaseRingItem()

bool IsPhaseRingItem ( const QStandardItem *  _phaseRingItem) const
Parameters
[in]_phaseRingItemQStandardItem pointer.
Returns
true if the item corresponds to a valid previously added phase ring.

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