gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
tree-item.hh
Go to the documentation of this file.
1// Copyright (c) 2015-2020, LAAS-CNRS
2// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3//
4// This file is part of gepetto-viewer.
5// gepetto-viewer is free software: you can redistribute it
6// and/or modify it under the terms of the GNU Lesser General Public
7// License as published by the Free Software Foundation, either version
8// 3 of the License, or (at your option) any later version.
9//
10// gepetto-viewer is distributed in the hope that it will be
11// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Lesser Public License for more details. You should have
14// received a copy of the GNU Lesser General Public License along with
15// gepetto-viewer. If not, see <http://www.gnu.org/licenses/>.
16
17#ifndef GEPETTO_GUI_TREEITEM_HH
18#define GEPETTO_GUI_TREEITEM_HH
19
20#include <gepetto/gui/fwd.hh>
21// This include must be include before any other Qt include for GLDEBUGPROC
22
23#include <QDoubleSpinBox>
24#include <QItemDelegate>
25#include <QMenu>
26#include <QPushButton>
27#include <QSignalMapper>
28#include <QSlider>
29#include <QStandardItem>
30
31namespace gepetto {
32namespace gui {
33class BodyTreeItem : public QObject, public QStandardItem {
34 Q_OBJECT
35
36 public:
37 BodyTreeItem(QObject* parent, NodePtr_t node);
38 void initialize();
39
40 virtual QStandardItem* clone() const;
41
42 virtual int type() const { return QStandardItem::UserType + 1; }
43
44 NodePtr_t node() const;
45
46 void populateContextMenu(QMenu* menu);
47
48 void setParentGroup(const std::string& parent);
49
50 QWidget* propertyEditors() const { return propertyEditors_; }
51
52 virtual ~BodyTreeItem();
53
54 public:
55 void attachToWindow(unsigned int windowID);
56
57 public slots:
58 void setViewingMode(QString mode);
59 void setVisibilityMode(QString mode);
61 void remove();
62 void removeAll();
65 QString text() const { return QStandardItem::text(); }
66
67 signals:
69 private slots:
70 void doInitialize();
71
72 private:
73 NodePtr_t node_;
74 std::string parentGroup_;
75
76 QWidget* propertyEditors_;
77
78 friend class VisibilityItem;
79};
80} // namespace gui
81} // namespace gepetto
82
83#endif // GEPETTO_GUI_TREEITEM_HH
Definition tree-item.hh:33
QWidget * propertyEditors() const
Definition tree-item.hh:50
void setVisibilityMode(QString mode)
virtual QStandardItem * clone() const
NodePtr_t node() const
BodyTreeItem(QObject *parent, NodePtr_t node)
void attachToWindow(unsigned int windowID)
QString text() const
Definition tree-item.hh:65
virtual int type() const
Definition tree-item.hh:42
void setParentGroup(const std::string &parent)
friend class VisibilityItem
Definition tree-item.hh:78
void populateContextMenu(QMenu *menu)
void setViewingMode(QString mode)
viewer::NodePtr_t NodePtr_t
Definition fwd.hh:52
Definition action-search-bar.hh:27