ObjectInspectorWidget.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 <QPointer>
28#include <QWidget>
29
34
35namespace Ui
36{
37 class ObjectInspectorWidget;
38}
39
40using ObjectPreviewViewerPtr = std::shared_ptr<scene3D::ObjectPreviewViewer>;
41
42namespace gui
43{
44 /**
45 * This class provides a widget which displays all class and instance attributes of a currently selected scene3D::SceneObject or a memoryx::ObjectClassPtr in a tree view.
46 *
47 */
48 class ObjectInspectorWidget : public QWidget
49 {
50 Q_OBJECT
51
52 public:
53 /**
54 * Constructor.
55 * Constructs an instance of ObjectInspectorWidget.
56 * Expects a controller::ControllerPtr to get information about the scene and the MemoryX.
57 *
58 */
60 QWidget* parent = 0);
61
62 /**
63 * Destructor.
64 *
65 */
66 ~ObjectInspectorWidget() override;
67
68 /**
69 * Translates all translatable strings in this dialog.
70 */
71 void retranslate();
72
73 private Q_SLOTS:
74 void setAllAttributes(scene3D::SceneObjectPtr sceneObject);
75 void setClassAttributes(const std::string& objectClass, const std::string& collection);
76 void sceneObjectsUpdated(controller::vector_string objectIds);
77
78 private:
80 QPointer<gui::PropertyBrowserWidget> propertyBrowser;
82 std::string currentObjectId;
83
84 void showPreviewImage(const memoryx::ObjectClassPtr& objectClass);
85 memoryx::ObjectClassPtr getObjectClass(const std::string& objectClass,
86 const std::string& collection);
87 };
88} // namespace gui
std::shared_ptr< scene3D::ObjectPreviewViewer > ObjectPreviewViewerPtr
~ObjectInspectorWidget() override
Destructor.
ObjectInspectorWidget(const controller::ControllerPtr &control, QWidget *parent=0)
Constructor.
void retranslate()
Translates all translatable strings in this dialog.
ArmarX Headers.
This file is part of ArmarX.
std::vector< std::string > vector_string
Definition Controller.h:47
std::weak_ptr< Controller > ControllerWeakPtr
std::shared_ptr< Controller > ControllerPtr
IceInternal::Handle< ObjectClass > ObjectClassPtr
Definition ObjectClass.h:35
boost::intrusive_ptr< SceneObject > SceneObjectPtr