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 "WSExport.h"
12 #include "WSParameter.h"
13 #include "WSTools.h"
14 
15 #include "WSColormap.h"
16 
17 namespace covise
18 {
19 
21 {
22 
23  Q_OBJECT
24 
25  Q_PROPERTY(int selected READ getSelected WRITE setSelected)
26 
27 public:
28  WSColormapChoiceParameter(const QString &name, const QString &description,
29  const QList<WSColormap> & = QList<WSColormap>(),
30  int selected = 1);
31 
32  virtual ~WSColormapChoiceParameter();
33 
34 public slots:
41  bool setValue(const QList<WSColormap> &value, int selected = 1);
42 
48  bool setValue(int selected);
49 
54  QList<WSColormap> getValue() const;
55 
59  const WSColormap getSelectedValue();
60 
66  bool setSelected(int index);
67 
68  int getSelected() const;
69 
70  virtual int getComponentCount() const;
71 
72 public:
73  virtual QString toString() const;
74 
75  virtual WSParameter *clone() const;
76 
77  virtual const covise::covise__Parameter *getSerialisable();
78 
79 protected:
80  virtual bool setValueFromSerialisable(const covise::covise__Parameter *serialisable);
81 
82  virtual QString toCoviseString() const;
83 
84 private:
85  bool setValue(int selected, bool changed);
86  covise::covise__ColormapChoiceParameter parameter;
89 };
90 }
91 
92 #endif // WSCHOICEPARAMETER_H
covise::covise__ColormapChoiceParameter parameter
Definition: WSColormapChoiceParameter.h:86
Definition: WSColormapChoiceParameter.h:20
GLuint const GLchar * name
Definition: khronos-glext.h:6722
#define WSLIBEXPORT
Definition: coExport.h:355
static WSColormapChoiceParameter * prototype
Definition: WSColormapChoiceParameter.h:88
Definition: WSColormap.h:63
GLuint index
Definition: khronos-glext.h:6722
Definition: WSParameter.h:27
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760