ObjectExplorerWidget.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 <QSortFilterProxyModel>
29#include <QWidget>
30
31/* C++ headers */
32#include <string>
33#include <vector>
34
36#include "ObjectExplorerModel.h"
38
39namespace Ui
40{
41 class ObjectExplorerWidget;
42}
43
44namespace gui
45{
46 /**
47 * This class provides a QWidget which displays all object classes from PriorKnowledge in their collections in a tree view.
48 * The object class can be filtered via a line edit.
49 *
50 */
51 class ObjectExplorerWidget : public QWidget
52 {
53 Q_OBJECT
54
55 public:
56 /**
57 * Constructor.
58 * Constructs a object explorer widget.
59 * Expects a controller::ControllerPtr to get the data to display and a <i>parent</i> Qt::QWidget.
60 *
61 * @param control shared pointer to controller::Controller
62 * @param parent parent widget
63 *
64 */
66 QWidget* parent = 0);
67 ~ObjectExplorerWidget() override;
68
69 /**
70 * Populates the gui::ObjectExplorerModel with data and sets up all child widgets.
71 *
72 * @see gui::ObjectExplorerModel
73 *
74 */
75 void onConnect();
76
77 /**
78 * Translates all translatable strings in this dialog.
79 */
80 void retranslate();
81
82 private Q_SLOTS:
83 void filterFixedString();
84 void getSelectedObject(const QModelIndex& index);
85
86 private:
87 Ui::ObjectExplorerWidget* ui;
89 QPointer<gui::ObjectExplorerModel> sourceModel;
90 };
91} // namespace gui
uint8_t index
void onConnect()
Populates the gui::ObjectExplorerModel with data and sets up all child widgets.
ObjectExplorerWidget(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::weak_ptr< Controller > ControllerWeakPtr
std::shared_ptr< Controller > ControllerPtr