COVISE Core
WSColormap.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 WSCOLORMAP_H
9#define WSCOLORMAP_H
10
11#include "WSExport.h"
12#include "WSCoviseStub.h"
13
14#include <QList>
15#include <QString>
16
17namespace covise
18{
19
21{
22
23public:
25 {
26 r = 0.0f;
27 g = 0.0f;
28 b = 0.0f;
29 a = 0.0f;
30 position = 0.0f;
31 }
32
33 WSColormapPin(float red, float green, float blue, float alpha, float pos)
34 {
35 r = red;
36 g = green;
37 b = blue;
38 a = alpha;
39 position = pos;
40 }
41
42 WSColormapPin(const covise::covise__ColormapPin &pin)
43 {
44 r = pin.r;
45 g = pin.g;
46 b = pin.b;
47 a = pin.a;
48 position = pin.position;
49 }
50 virtual ~WSColormapPin(){};
51
52 virtual covise::covise__ColormapPin getSerialisable() const;
53
54 QString toString() const;
55
56 float r;
57 float g;
58 float b;
59 float a;
60 float position;
61};
62
64{
65public:
66 WSColormap();
67 WSColormap(const QString &name, const QList<WSColormapPin> &pins);
68 WSColormap(const covise::covise__Colormap &colormap);
69 virtual ~WSColormap()
70 {
71 }
72
73 const QList<WSColormapPin> &getPins() const
74 {
75 return this->pins;
76 }
77
78 virtual covise::covise__Colormap getSerialisable() const;
79
80 void setFromSerialisable(const covise::covise__Colormap &serialisable);
81
82 QString toString() const;
83 QString toCoviseString() const;
84
85private:
86 QString name;
87 QList<WSColormapPin> pins;
88};
89}
90#endif // WSCOLORMAP_H
#define WSLIBEXPORT
Definition: coExport.h:385
GLfloat green
Definition: khronos-glext.h:6341
GLfloat GLfloat GLfloat alpha
Definition: khronos-glext.h:6341
GLboolean GLboolean GLboolean b
Definition: khronos-glext.h:6895
GLboolean GLboolean g
Definition: khronos-glext.h:6895
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLdouble GLdouble GLdouble r
Definition: khronos-glext.h:6457
GLfloat GLfloat blue
Definition: khronos-glext.h:6341
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
list of all chemical elements
Definition: coConfig.h:27
Definition: WSColormap.h:21
virtual ~WSColormapPin()
Definition: WSColormap.h:50
float g
Definition: WSColormap.h:57
float b
Definition: WSColormap.h:58
WSColormapPin(float red, float green, float blue, float alpha, float pos)
Definition: WSColormap.h:33
float a
Definition: WSColormap.h:59
float position
Definition: WSColormap.h:60
WSColormapPin()
Definition: WSColormap.h:24
float r
Definition: WSColormap.h:56
WSColormapPin(const covise::covise__ColormapPin &pin)
Definition: WSColormap.h:42
Definition: WSColormap.h:64
virtual ~WSColormap()
Definition: WSColormap.h:69
const QList< WSColormapPin > & getPins() const
Definition: WSColormap.h:73
QString name
Definition: WSColormap.h:86
QList< WSColormapPin > pins
Definition: WSColormap.h:87