gepetto-viewer  4.12.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 {
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 */
std::string type()
Definition: properties.h:24
BackfaceDrawingProperty()
Definition: properties.h:26
Definition: properties.h:16
void stateSet(const StateSetRefPtr &stateSet)
Definition: properties.h:28
StateSetRefPtr stateSet() const
Definition: properties.h:29
virtual bool impl_set(void)
virtual QWidget * guiEditor()
Definition: properties.h:31
virtual bool impl_get(void)
Definition: action-search-bar.hh:27
bool hasWriteAccess() const
Definition: properties.h:22
Abstract base class for runtime properties of Node.
Definition: node-property.h:71
bool hasReadAccess() const
Definition: properties.h:21
osg::StateSetRefPtr StateSetRefPtr
Definition: properties.h:19