scenarioitem.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::core
19 * @author Cedric Seehausen (usdnr at kit dot edu)
20 * @date 2016
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25
26#pragma once
27
28#include <QVariant>
29#include <QVector>
30
32
33#include "treeitem.h"
34
35/**
36* @class ScenarioItem
37* @brief TreeItem representing data contained in a Scenario or an Application.
38*/
39
40class ScenarioItem : public TreeItem
41{
42public:
43 /**
44 * Constructor that sets the data contained in this item.
45 * @param rootData data
46 */
47 ScenarioItem(QList<QVariant> rootData);
48
49 /**
50 * Constructor that sets the scenario-data contained in this item.
51 * @param scenario Scenario to read out the data
52 */
54
55 /**
56 * Constructor that sets the application-data contained in this item.
57 * @param application Application to read out the data
58 */
60
61 ScenarioItem(std::string name,
62 std::vector<ScenarioManager::Data_Structure::ApplicationInstancePtr> applications);
63 std::string getPackageName();
64
65 /**
66 * Clears the item_data and parses the Scenario or Application for new data.
67 */
68 void update();
69
70 /**
71 * If this item represents a Scenario, it is returned.
72 * @return the Scenario represented by this item
73 */
75
76 /**
77 * If this item represents an Application, it is returned.
78 * @return the Application represented by this item
79 */
82
83private:
86
87 std::string packageName;
89};
90
91Q_DECLARE_METATYPE(ScenarioItem*)
TreeItem representing data contained in a Scenario or an Application.
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.
std::shared_ptr< Scenario > ScenarioPtr
Definition Scenario.h:35
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
std::shared_ptr< std::vector< ApplicationInstancePtr > > ApplicationInstanceVectorPtr