gepetto-viewer  4.15.1
An user-friendly Graphical Interface
properties.h
Go to the documentation of this file.
1 
9 #ifndef GEPETTO_VIEWER_PROPERTIES_HH
10 #define GEPETTO_VIEWER_PROPERTIES_HH
11 
13 
14 namespace gepetto {
15 namespace viewer {
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 */
gepetto::viewer::BackfaceDrawingProperty::stateSet
void stateSet(const StateSetRefPtr &stateSet)
Definition: properties.h:27
gepetto::viewer::BackfaceDrawingProperty
Definition: properties.h:16
gepetto::viewer::BackfaceDrawingProperty::hasReadAccess
bool hasReadAccess() const
Definition: properties.h:20
gepetto::viewer::BackfaceDrawingProperty::stateSet
StateSetRefPtr stateSet() const
Definition: properties.h:28
gepetto
Definition: action-search-bar.hh:27
gepetto::viewer::BackfaceDrawingProperty::hasWriteAccess
bool hasWriteAccess() const
Definition: properties.h:21
gepetto::viewer::Property::impl_set
virtual bool impl_set(void)
gepetto::viewer::Property::impl_get
virtual bool impl_get(void)
gepetto::viewer::BackfaceDrawingProperty::StateSetRefPtr
osg::StateSetRefPtr StateSetRefPtr
Definition: properties.h:18
node-property.h
gepetto::viewer::BackfaceDrawingProperty::BackfaceDrawingProperty
BackfaceDrawingProperty()
Definition: properties.h:25
gepetto::viewer::BackfaceDrawingProperty::guiEditor
virtual QWidget * guiEditor()
Definition: properties.h:30
gepetto::viewer::BackfaceDrawingProperty::type
std::string type()
Definition: properties.h:23
gepetto::viewer::Property
Abstract base class for runtime properties of Node.
Definition: node-property.h:114