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 {
18  public:
19  typedef osg::StateSetRefPtr StateSetRefPtr;
20 
21  bool hasReadAccess () const { return static_cast<bool>(stateSet_); }
22  bool hasWriteAccess() const { return static_cast<bool>(stateSet_); }
23 
24  std::string type() { return details::property_type<bool>::to_string(); }
25 
26  BackfaceDrawingProperty () : Property("BackfaceDrawing") {}
27 
28  void stateSet (const StateSetRefPtr& stateSet) { stateSet_ = stateSet; }
29  StateSetRefPtr stateSet () const { return stateSet_; }
30 
31  virtual QWidget* guiEditor ()
32  {
33  return details::buildEditor<bool>(this);
34  }
35 
36  protected:
37  bool impl_set(const bool& value);
38  bool impl_get( bool& value);
39 
40  private:
41  osg::StateSetRefPtr stateSet_;
42 
43 };
44 } /* namespace viewer */
45 } /* namespace gepetto */
46 
47 #endif /* GEPETTO_VIEWER_PROPERTIES_HH */
gepetto::viewer::BackfaceDrawingProperty::stateSet
void stateSet(const StateSetRefPtr &stateSet)
Definition: properties.h:28
gepetto::viewer::BackfaceDrawingProperty
Definition: properties.h:16
gepetto::viewer::BackfaceDrawingProperty::hasReadAccess
bool hasReadAccess() const
Definition: properties.h:21
gepetto::viewer::BackfaceDrawingProperty::stateSet
StateSetRefPtr stateSet() const
Definition: properties.h:29
gepetto
Definition: action-search-bar.hh:27
gepetto::viewer::BackfaceDrawingProperty::hasWriteAccess
bool hasWriteAccess() const
Definition: properties.h:22
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:19
node-property.h
gepetto::viewer::BackfaceDrawingProperty::BackfaceDrawingProperty
BackfaceDrawingProperty()
Definition: properties.h:26
gepetto::viewer::BackfaceDrawingProperty::guiEditor
virtual QWidget * guiEditor()
Definition: properties.h:31
gepetto::viewer::BackfaceDrawingProperty::type
std::string type()
Definition: properties.h:24
gepetto::viewer::Property
Abstract base class for runtime properties of Node.
Definition: node-property.h:71