COVISE Core
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
17namespace covise
18{
19
21{
22
23 Q_OBJECT
24
25 Q_PROPERTY(int selected READ getSelected WRITE setSelected)
26
27public:
28 WSColormapChoiceParameter(const QString &name, const QString &description,
29 const QList<WSColormap> & = QList<WSColormap>(),
30 int selected = 1);
31
33
34public 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
72public:
73 virtual QString toString() const;
74
75 virtual WSParameter *clone() const;
76
77 virtual const covise::covise__Parameter *getSerialisable();
78
79protected:
80 virtual bool setValueFromSerialisable(const covise::covise__Parameter *serialisable);
81
82 virtual QString toCoviseString() const;
83
84private:
85 bool setValue(int selected, bool changed);
86 covise::covise__ColormapChoiceParameter parameter;
89};
90}
91
92#endif // WSCHOICEPARAMETER_H
#define WSLIBEXPORT
Definition: coExport.h:385
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
GLuint index
Definition: khronos-glext.h:6722
GLuint const GLchar * name
Definition: khronos-glext.h:6722
list of all chemical elements
Definition: coConfig.h:27
Definition: WSColormap.h:64
Definition: WSColormapChoiceParameter.h:21
covise::covise__ColormapChoiceParameter parameter
Definition: WSColormapChoiceParameter.h:86
static WSColormapChoiceParameter * prototype
Definition: WSColormapChoiceParameter.h:88
Definition: WSParameter.h:28