GCC Code Coverage Report


Directory: ./
File: include/gepetto/viewer/properties.h
Date: 2024-12-20 15:53:58
Exec Total Coverage
Lines: 0 6 0.0%
Branches: 0 4 0.0%

Line Branch Exec Source
1 ///
2 /// properties.h
3 /// gepetto-viewer
4 ///
5 /// Copyright (c) 2020 LAAS-CNRS. All rights reserved.
6 /// \author Joseph Mirabel
7 ///
8
9 #ifndef GEPETTO_VIEWER_PROPERTIES_HH
10 #define GEPETTO_VIEWER_PROPERTIES_HH
11
12 #include <gepetto/viewer/node-property.h>
13
14 namespace gepetto {
15 namespace viewer {
16 class BackfaceDrawingProperty : public Property {
17 public:
18 typedef osg::StateSetRefPtr StateSetRefPtr;
19
20 bool hasReadAccess() const { return static_cast<bool>(stateSet_); }
21 bool hasWriteAccess() const { return static_cast<bool>(stateSet_); }
22
23 std::string type() { return details::property_type<bool>::to_string(); }
24
25 BackfaceDrawingProperty() : Property("BackfaceDrawing") {}
26
27 void stateSet(const StateSetRefPtr& stateSet) { stateSet_ = stateSet; }
28 StateSetRefPtr stateSet() const { return stateSet_; }
29
30 virtual QWidget* guiEditor() { return details::buildEditor<bool>(this); }
31
32 protected:
33 bool impl_set(const bool& value);
34 bool impl_get(bool& value);
35
36 private:
37 osg::StateSetRefPtr stateSet_;
38 };
39 } /* namespace viewer */
40 } /* namespace gepetto */
41
42 #endif /* GEPETTO_VIEWER_PROPERTIES_HH */
43