42 this->scenario = scenario;
49 this->application = application;
58 this->packageName = name;
60 for (
const auto& appl : applications)
81 if (scenario.get() !=
nullptr)
84 m_itemData[4] = QString::fromStdString(scenario->getStatus());
86 else if (!packageName.empty())
88 m_itemData[0] = QString::fromStdString(packageName);
101 auto childState =
child(i)->
data(4).toString().toStdString();
148 if (application->getInstanceName().empty())
150 m_itemData[0] = application->getName().c_str();
154 m_itemData[0] = (application->getInstanceName() +
"." + application->getName()).c_str();
157 std::string
status = application->getStatus();
158 if (!application->getFound())
161 ARMARX_INFO <<
"Application '" + application->getExecutableAbsPath() +
"' not found!";
ScenarioManager::Data_Structure::ScenarioPtr getScenario()
If this item represents a Scenario, it is returned.
ScenarioManager::Data_Structure::ApplicationInstancePtr getApplicationInstance()
If this item represents an Application, it is returned.
std::string getPackageName()
ScenarioManager::Data_Structure::ApplicationInstanceVectorPtr getApplicationInstances()
void update()
Clears the item_data and parses the Scenario or Application for new data.
ScenarioItem(QList< QVariant > rootData)
Constructor that sets the data contained in this item.
void appendChild(TreeItem *child)
virtual QVariant data(int column) const
void setEnabled(bool enabled)
TreeItem * child(int row)
QVector< QVariant > m_itemData
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_INFO
The normal logging level.
std::shared_ptr< Scenario > ScenarioPtr
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
std::shared_ptr< std::vector< ApplicationInstancePtr > > ApplicationInstanceVectorPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
static const std::string Stopped
static const std::string Mixed
static const std::string Missing
static const std::string Unknown
static const std::string Inactive
static const std::string Waiting
static const std::string Running