SceneEditorConfigDialog.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-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 MemoryX::gui-plugins::SceneEditor
19 * @date 2015
20 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21 * GNU General Public License
22 */
23
24#pragma once
25
26/* Qt headers */
27#include <QDialog>
28#include <QPointer>
29
30/* ArmarX headers */
34
36
37namespace Ui
38{
39 class SceneEditorConfigDialog;
40}
41
42namespace gui::dialog
43{
44 /**
45 * This class provides a dialog derived from Qt::QDialog and armarx::ManagedIceObject.
46 * In this dialog the user has to set the necessary settings to start the plugin.
47 *
48 * @see armarx::ManagedIceObject
49 *
50 */
51 class SceneEditorConfigDialog : public QDialog, virtual public armarx::ManagedIceObject
52 {
53 Q_OBJECT
54
55 public:
56 /**
57 * Constructor.
58 * Creates an instance of SceneEditorConfigDialog.
59 *
60 * @param parent parent widget
61 *
62 */
63 explicit SceneEditorConfigDialog(QWidget* parent = 0);
64
65 /**
66 * Destructor.
67 * Destroys the initial config dialog.
68 *
69 */
70 ~SceneEditorConfigDialog() override;
71
72 /**
73 * Reimplemented armarx::ManagedIceObject:getDefaultName().
74 *
75 * @see armarx::ManagedIceObject:getDefaultName()
76 *
77 */
78 std::string getDefaultName() const override;
79
80 /**
81 * Reimplemented armarx::ManagedIceObject:onInitComponent().
82 *
83 * @see armarx::ManagedIceObject:onInitComponent()
84 *
85 */
86 void onInitComponent() override;
87
88 /**
89 * Reimplemented armarx::ManagedIceObject:onConnectComponent().
90 *
91 * @see armarx::ManagedIceObject:onConnectComponent()
92 *
93 */
94 void onConnectComponent() override;
95
96 /**
97 * Reimplemented armarx::ManagedIceObject:onExitComponent().
98 *
99 * @see armarx::ManagedIceObject:onExitComponent()
100 *
101 */
102 void onExitComponent() override;
103
104 /**
105 * Sets unic name for this widget.
106 *
107 */
108 void setIceObjectName();
109
110 /**
111 * Returns selected WorkingMemory name
112 *
113 * @return WorkingMemory name
114 *
115 */
116 std::string getWorkingMemoryName();
117
118 /**
119 * Returns selected WorkingMemory updates topic
120 *
121 * @return WorkingMemory updates topic
122 *
123 */
124 std::string getWorkingMemoryUpdatesTopic();
125
126 /**
127 * Returns selected PriorKnowledge name.
128 *
129 * @return PriorMemory name
130 *
131 */
132 std::string getPriorMemoryName();
133
134 /**
135 * Returns the full path to the selected settings file.
136 *
137 * @return file path to settings file
138 *
139 */
140 QString getSettingsFilePath();
141
142 /**
143 * Translates all translatable strings in this dialog.
144 */
145 void retranslate();
146
147 private slots:
148 void verifyConfiguration();
149 void fileBrowserToolButtonReleased();
150
151 bool isTopicAvailable(std::string topicName);
152
153 private:
154 Ui::SceneEditorConfigDialog* ui;
155
156 QPointer<armarx::IceProxyFinderBase> workingMemoryProxyFinder;
157 QPointer<armarx::IceTopicFinder> workingMemoryUpdatesTopicFinder;
158 QPointer<armarx::IceProxyFinderBase> priorKnowledgeProxyFinder;
159 };
160} // namespace gui::dialog
The ManagedIceObject is the base class for all ArmarX objects.
void onInitComponent() override
Reimplemented armarx::ManagedIceObject:onInitComponent().
SceneEditorConfigDialog(QWidget *parent=0)
Constructor.
std::string getWorkingMemoryUpdatesTopic()
Returns selected WorkingMemory updates topic.
QString getSettingsFilePath()
Returns the full path to the selected settings file.
void onConnectComponent() override
Reimplemented armarx::ManagedIceObject:onConnectComponent().
std::string getPriorMemoryName()
Returns selected PriorKnowledge name.
void setIceObjectName()
Sets unic name for this widget.
void onExitComponent() override
Reimplemented armarx::ManagedIceObject:onExitComponent().
void retranslate()
Translates all translatable strings in this dialog.
std::string getWorkingMemoryName()
Returns selected WorkingMemory name.
std::string getDefaultName() const override
Reimplemented armarx::ManagedIceObject:getDefaultName().
ArmarX Headers.