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.

Definition at line 40 of file scenarioitem.h.

Constructor & Destructor Documentation

◆ ScenarioItem() [1/4]

ScenarioItem ( QList< QVariant > rootData)

Constructor that sets the data contained in this item.

Parameters
rootDatadata

Definition at line 35 of file scenarioitem.cpp.

+ Here is the caller graph for this function:

◆ ScenarioItem() [2/4]

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

Parameters
scenarioScenario to read out the data

Definition at line 40 of file scenarioitem.cpp.

+ Here is the call graph for this function:

◆ ScenarioItem() [3/4]

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

Parameters
applicationApplication to read out the data

Definition at line 47 of file scenarioitem.cpp.

+ Here is the call graph for this function:

◆ ScenarioItem() [4/4]

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

Definition at line 55 of file scenarioitem.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ getApplicationInstance()

ApplicationInstancePtr getApplicationInstance ( )

If this item represents an Application, it is returned.

Returns
the Application represented by this item

Definition at line 214 of file scenarioitem.cpp.

+ Here is the caller graph for this function:

◆ getApplicationInstances()

ApplicationInstanceVectorPtr getApplicationInstances ( )

Definition at line 220 of file scenarioitem.cpp.

+ Here is the caller graph for this function:

◆ getPackageName()

std::string getPackageName ( )

Definition at line 202 of file scenarioitem.cpp.

◆ 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.

Definition at line 166 of file scenarioitem.cpp.

+ Here is the caller graph for this function:

◆ getScenario()

ScenarioPtr getScenario ( )

If this item represents a Scenario, it is returned.

Returns
the Scenario represented by this item

Definition at line 208 of file scenarioitem.cpp.

+ Here is the caller graph for this function:

◆ 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.

Definition at line 72 of file scenarioitem.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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