COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
WSColormapChoiceParameter.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 WSCOLORMAPCHOICEPARAMETER_H
9 #define WSCOLORMAPCHOICEPARAMETER_H
10 
11 #include "WSParameter.h"
12 #include "WSTools.h"
13 
14 #include "WSColormap.h"
15 
16 namespace covise
17 {
18 
20 {
21 
22  Q_OBJECT
23 
24  Q_PROPERTY(int selected READ getSelected WRITE setSelected)
25 
26 public:
27  WSColormapChoiceParameter(const QString &name, const QString &description,
28  const QList<WSColormap> & = QList<WSColormap>(),
29  int selected = 1);
30 
31  virtual ~WSColormapChoiceParameter();
32 
33 public slots:
40  bool setValue(const QList<WSColormap> &value, int selected = 1);
41 
47  bool setValue(int selected);
48 
53  QList<WSColormap> getValue() const;
54 
58  const WSColormap getSelectedValue();
59 
65  bool setSelected(int index);
66 
67  int getSelected() const;
68 
69  virtual int getComponentCount() const;
70 
71 public:
72  virtual QString toString() const;
73 
74  virtual WSParameter *clone() const;
75 
76  virtual const covise::covise__Parameter *getSerialisable();
77 
78 protected:
79  virtual bool setValueFromSerialisable(const covise::covise__Parameter *serialisable);
80 
81  virtual QString toCoviseString() const;
82 
83 private:
84  bool setValue(int selected, bool changed);
85  covise::covise__ColormapChoiceParameter parameter;
88 };
89 }
90 
91 #endif // WSCHOICEPARAMETER_H
covise::covise__ColormapChoiceParameter parameter
Definition: WSColormapChoiceParameter.h:85
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
Definition: WSColormapChoiceParameter.h:19
static WSColormapChoiceParameter * prototype
Definition: WSColormapChoiceParameter.h:87
Definition: WSColormap.h:62
GLuint index
Definition: khronos-glext.h:6722
Definition: WSParameter.h:26
GLuint const GLchar * name
Definition: khronos-glext.h:6722
#define WSLIBEXPORT
Definition: coExport.h:355