GroupExplorerDialog.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#include <QDialog>
27#include <QHash>
28#include <QStandardItemModel>
29
32#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
33
34namespace Ui
35{
36 class GroupExplorerDialog;
37}
38
39using SoQtExaminerPtr = std::shared_ptr<SoQtExaminerViewer>;
40
41namespace gui::dialog
42{
43 class GroupExplorerDialog : public QDialog
44 {
45 Q_OBJECT
46
47 public:
48 /**
49 * Constructor.
50 * Basic constructor for GroupExplorerDialog.
51 *
52 * @param control The controller containing all managers needed in this Dialog
53 * @param parent Parent widget
54 */
55 explicit GroupExplorerDialog(controller::ControllerPtr control, QWidget* parent = 0);
56
57 /**
58 * Destructor.
59 *
60 */
61 ~GroupExplorerDialog() override;
62
63 /**
64 * Sets the currently selected Group.
65 *
66 * @param groupId The Id of the group to be selected
67 */
68 void setCurrentGroup(QString groupId);
69
70 /**
71 * Translates all translatable strings in this dialog.
72 */
73 void retranslate();
74
75 private Q_SLOTS:
76 void groupClicked(QModelIndex index);
77 void objectClicked(QModelIndex index);
78 void groupAddClicked();
79 void groupRemoveClicked();
80 void groupRenameClicked();
81 void objectRemoveClicked();
82
83 void reloadGroups();
84 void reloadObjects();
85 void reloadProperties();
86 void checkButtons();
87
88 private:
89 void showEvent(QShowEvent* event) override;
90 void refreshGroups();
91 void loadGroup(QString groupId);
92 void showPreviewImage(const memoryx::ObjectClassPtr& objectClass);
93
94 SoQtExaminerPtr viewer;
96 Ui::GroupExplorerDialog* ui;
97 std::vector<scene3D::SceneGroupPtr> allGroups;
98 QString activeGroup;
99 QString activeObject;
100 };
101} // namespace gui::dialog
uint8_t index
std::shared_ptr< SoQtExaminerViewer > SoQtExaminerPtr
void setCurrentGroup(QString groupId)
Sets the currently selected Group.
GroupExplorerDialog(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::weak_ptr< Controller > ControllerWeakPtr
std::shared_ptr< Controller > ControllerPtr
IceInternal::Handle< ObjectClass > ObjectClassPtr
Definition ObjectClass.h:35