GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/gepetto/gui/tree-item.hh Lines: 0 6 0.0 %
Date: 2020-05-14 11:23:33 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
22
#include <QStandardItem>
23
#include <QItemDelegate>
24
#include <QDoubleSpinBox>
25
#include <QSlider>
26
#include <QMenu>
27
#include <QPushButton>
28
#include <QSignalMapper>
29
30
namespace gepetto {
31
  namespace gui {
32
    class BodyTreeItem : public QObject, public QStandardItem
33
    {
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 {
43
          return QStandardItem::UserType+1;
44
        }
45
46
        NodePtr_t node () const;
47
48
        void populateContextMenu (QMenu* menu);
49
50
        void setParentGroup (const std::string& parent);
51
52
        QWidget* propertyEditors () const
53
        {
54
          return propertyEditors_;
55
        }
56
57
        virtual ~BodyTreeItem();
58
59
      public:
60
        void attachToWindow (unsigned int windowID);
61
62
        public slots:
63
          void setViewingMode (QString mode);
64
        void setVisibilityMode (QString mode);
65
        void removeFromGroup ();
66
        void remove ();
67
        void removeAll ();
68
        void addLandmark ();
69
        void deleteLandmark ();
70
        QString text () const { return QStandardItem::text(); }
71
72
    signals:
73
        void requestInitialize();
74
    private slots:
75
        void doInitialize();
76
77
      private:
78
        NodePtr_t node_;
79
        std::string parentGroup_;
80
81
        QWidget* propertyEditors_;
82
83
        friend class VisibilityItem;
84
    };
85
  } // namespace gui
86
} // namespace gepetto
87
88
#endif // GEPETTO_GUI_TREEITEM_HH