ClutteredSceneGeneratorWidgetController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXSimulation::gui-plugins::ClutteredSceneGeneratorWidgetController
17  * @author Patrick Hegemann ( patrick dot hegemann at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 #include <QListWidgetItem>
25 
28 
31 
32 #include <ArmarXSimulation/gui-plugins/ClutteredSceneGenerator/ui_ClutteredSceneGeneratorWidget.h>
34 
35 namespace armarx
36 {
37  /**
38  \page ArmarXSimulation-GuiPlugins-ClutteredSceneGenerator ClutteredSceneGenerator
39  \brief The ClutteredSceneGenerator allows visualizing ...
40 
41  \image html ClutteredSceneGenerator.png
42  The user can
43 
44  API Documentation \ref ClutteredSceneGeneratorWidgetController
45 
46  \see ClutteredSceneGeneratorGuiPlugin
47  */
48 
49  /**
50  * \class ClutteredSceneGeneratorGuiPlugin
51  * \ingroup ArmarXGuiPlugins
52  * \brief ClutteredSceneGeneratorGuiPlugin brief description
53  *
54  * Detailed description
55  */
56 
57  /**
58  * \class ClutteredSceneGeneratorWidgetController
59  * \brief ClutteredSceneGeneratorWidgetController brief one line description
60  *
61  * Detailed description
62  */
65  ClutteredSceneGeneratorWidgetController>
66  {
67  Q_OBJECT
68 
69  public:
70  /// Controller Constructor
72  /// Controller destructor
74 
75  //// @see ArmarXWidgetController::loadSettings()
76  void loadSettings(QSettings* settings) override;
77  /// @see ArmarXWidgetController::saveSettings()
78  void saveSettings(QSettings* settings) override;
79 
80  /**
81  * Returns the Widget name displayed in the ArmarXGui to create an
82  * instance of this class.
83  */
84  static QString
86  {
87  return "ClutteredSceneGenerator";
88  }
89 
90  /// \see armarx::Component::onInitComponent()
91  void onInitComponent() override;
92 
93  /// \see armarx::Component::onConnectComponent()
94  void onConnectComponent() override;
95 
96  public slots:
97  /* QT slot declarations */
98  // Objects tab
99  void generateObjects();
100 
101  // Scene generation tab
102  void refreshSets();
103  void updateObjectPoseConstraints();
104  void generateScene();
105 
106  signals:
107  /* QT signal declarations */
108 
109  private:
110  /**
111  * Widget Form
112  */
113  Ui::ClutteredSceneGeneratorWidget widget_{};
114 
115  // Items in the list of object sets
116  std::vector<QListWidgetItem*> objectSetListItems_;
117 
118  // (Logic) object sets
119  std::map<std::string, simulation::scene_generation::ObjectSet> objectSets_;
120 
121  // Generate the configuration for the cluttered scene generator
122  simulation::scene_generation::ClutteredSceneGenerator::Config getGenConfig();
123 
124  // Simulator proxy
125  std::string simulatorProxyName_ = "Simulator";
126  SimulatorInterfacePrx simulator_;
127 
128  std::map<std::string, simulation::scene_generation::ObjectSet>
129  getObjectSets(const armarx::PackagePath& packagePath);
130  };
131 } // namespace armarx
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::ClutteredSceneGeneratorWidgetController
ClutteredSceneGeneratorWidgetController brief one line description.
Definition: ClutteredSceneGeneratorWidgetController.h:63
armarx::ClutteredSceneGeneratorWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: ClutteredSceneGeneratorWidgetController.h:85
ClutteredSceneGenerator.h
armarx::PackagePath
Definition: PackagePath.h:52
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
PackagePath.h
ImportExportComponent.h