COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
WSFloatSliderParameter.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef WSFLOATSLIDERPARAMETER_H
9 #define WSFLOATSLIDERPARAMETER_H
10 
11 #include "WSExport.h"
12 #include "WSParameter.h"
13 
14 namespace covise
15 {
16 
18 {
19 
20  Q_OBJECT
21 
22  Q_PROPERTY(float value READ getValue WRITE setValue)
23  Q_PROPERTY(float min READ getMin WRITE setMin)
24  Q_PROPERTY(float max READ getMax WRITE setMax)
25 
26 public:
27  WSFloatSliderParameter(const QString &name, const QString &description);
28 
29  WSFloatSliderParameter(const QString &name, const QString &description, float value, float min, float max);
30 
31  virtual ~WSFloatSliderParameter();
32 
33 public slots:
38  void setMin(float inMin);
39 
44  float getMin() const;
45 
50  void setMax(float inMax);
51 
56  float getMax() const;
57 
63  bool setValue(float inValue);
64 
72  bool setValue(float value, float minimum, float maximum);
73 
78  float getValue() const;
79 
80  virtual QString toString() const;
81 
82 public:
83  virtual WSParameter *clone() const;
84 
85  virtual const covise::covise__Parameter *getSerialisable();
86 
87 protected:
88  virtual bool setValueFromSerialisable(const covise::covise__Parameter *serialisable);
89 
90 private:
91  covise::covise__FloatSliderParameter parameter;
92  WSFloatSliderParameter();
93  static WSFloatSliderParameter *prototype;
94 };
95 }
96 
97 #endif // WSFLOATSLIDERPARAMETER_H
Definition: WSFloatSliderParameter.h:17
GLuint const GLchar * name
Definition: khronos-glext.h:6722
int max(int a, int b)
Definition: cutil_math.h:55
Definition: WSParameter.h:27
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
int min(int a, int b)
Definition: cutil_math.h:60
#define WSLIBEXPORT
Definition: coExport.h:373