ScenarioItem Class Reference

TreeItem representing data contained in a Scenario or an Application. More...

#include <ArmarXGui/gui-plugins/ScenarioManager/gui/scenarioitem.h>

+ Inheritance diagram for ScenarioItem:

Public Member Functions

ScenarioManager::Data_Structure::ApplicationInstancePtr getApplicationInstance ()
 If this item represents an Application, it is returned.
 
ScenarioManager::Data_Structure::ApplicationInstanceVectorPtr getApplicationInstances ()
 
std::string getPackageName ()
 
ScenarioManager::Data_Structure::Intent getPendingIntent () const
 The operation this row is currently moving towards, or Intent::None when idle.
 
ScenarioManager::Data_Structure::ScenarioPtr getScenario ()
 If this item represents a Scenario, it is returned.
 
 ScenarioItem (QList< QVariant > rootData)
 Constructor that sets the data contained in this item.
 
 ScenarioItem (ScenarioManager::Data_Structure::ApplicationInstancePtr application)
 Constructor that sets the application-data contained in this item.
 
 ScenarioItem (ScenarioManager::Data_Structure::ScenarioPtr scenario)
 Constructor that sets the scenario-data contained in this item.
 
 ScenarioItem (std::string name, std::vector< ScenarioManager::Data_Structure::ApplicationInstancePtr > applications)
 
bool update ()
 Clears the item_data and parses the Scenario or Application for new data.
 
- Public Member Functions inherited from TreeItem
void appendChild (TreeItem *child)
 
TreeItem * child (int row)
 
int childCount () const
 
int columnCount () const
 
virtual QVariant data (int column) const
 
bool insertChild (int position, TreeItem *child)
 
bool insertColumn (int position, QVariant data)
 
bool isEnabled ()
 
TreeItem * parent ()
 
bool removeChild (int position)
 
bool removeColumn (int position)
 
int row () const
 
bool setData (int column, const QVariant &value)
 
void setEnabled (bool enabled)
 
 TreeItem ()
 
virtual ~TreeItem ()
 

Additional Inherited Members

- Protected Attributes inherited from TreeItem
bool enabled
 
QVector< QVariant > m_itemData
 

Detailed Description

TreeItem representing data contained in a Scenario or an Application.

Constructor & Destructor Documentation

◆ ScenarioItem() [1/4]

ScenarioItem ( QList< QVariant > rootData)

Constructor that sets the data contained in this item.

Parameters
rootDatadata

◆ ScenarioItem() [2/4]

Constructor that sets the scenario-data contained in this item.

Parameters
scenarioScenario to read out the data

◆ ScenarioItem() [3/4]

Constructor that sets the application-data contained in this item.

Parameters
applicationApplication to read out the data

◆ ScenarioItem() [4/4]

ScenarioItem ( std::string name,
std::vector< ScenarioManager::Data_Structure::ApplicationInstancePtr > applications )

Member Function Documentation

◆ getApplicationInstance()

ApplicationInstancePtr getApplicationInstance ( )

If this item represents an Application, it is returned.

Returns
the Application represented by this item

◆ getApplicationInstances()

ApplicationInstanceVectorPtr getApplicationInstances ( )

◆ getPackageName()

std::string getPackageName ( )

◆ getPendingIntent()

Intent getPendingIntent ( ) const

The operation this row is currently moving towards, or Intent::None when idle.

For an application this is the intent published by its ApplicationLifecycle. For a package or a scenario it is the intent shared by all of its busy children, or None if they disagree - a row only greys out a button when the whole subtree is doing that one thing.

◆ getScenario()

ScenarioPtr getScenario ( )

If this item represents a Scenario, it is returned.

Returns
the Scenario represented by this item

◆ update()

bool update ( )

Clears the item_data and parses the Scenario or Application for new data.

Does not descend into the children: items that aggregate the status of their children (the package subtrees) expect those to have been updated already, which ScenarioModel::update() guarantees by walking the tree bottom-up.

Returns
whether the displayed data of this item actually changed.

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