GCC Code Coverage Report


Directory: ./
File: include/gepetto/gui/tree-item.hh
Date: 2024-12-20 15:53:58
Exec Total Coverage
Lines: 0 4 0.0%
Branches: 0 0 -%

Line Branch Exec Source
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
31 namespace gepetto {
32 namespace gui {
33 class 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);
60 void removeFromGroup();
61 void remove();
62 void removeAll();
63 void addLandmark();
64 void deleteLandmark();
65 QString text() const { return QStandardItem::text(); }
66
67 signals:
68 void requestInitialize();
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
84