COVISE Core
WSChoiceParameter.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 WSCHOICEPARAMETER_H
9#define WSCHOICEPARAMETER_H
10
11#include "WSExport.h"
12#include "WSParameter.h"
13#include "WSTools.h"
14
15namespace covise
16{
17
19{
20
21 Q_OBJECT
22
23 Q_PROPERTY(QStringList value READ getValue WRITE setValue)
24 Q_PROPERTY(int selected READ getSelected WRITE setSelected)
25 Q_PROPERTY(QString selectedValue READ getSelectedValue)
26
27public:
28 WSChoiceParameter(const QString &name, const QString &description,
29 const QStringList &inValue = QStringList(), int selected = 1);
30
31 virtual ~WSChoiceParameter();
32
33public slots:
38 bool setValue(const QStringList &inValue, int selected = 1);
39
44 bool setValue(int selected);
45
50 QStringList getValue() const;
51
52 const QString getSelectedValue();
53
54 bool setSelected(int index);
55
56 int getSelected() const;
57
58 virtual int getComponentCount() const;
59
60public:
61 virtual QString toString() const;
62
63 virtual WSParameter *clone() const;
64
65 virtual const covise::covise__Parameter *getSerialisable();
66
67protected:
68 virtual bool setValueFromSerialisable(const covise::covise__Parameter *serialisable);
69
70 virtual QString toCoviseString() const;
71
72private:
73 bool setValue(int selected, bool changed);
74 covise::covise__ChoiceParameter parameter;
77};
78}
79
80#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: WSChoiceParameter.h:19
static WSChoiceParameter * prototype
Definition: WSChoiceParameter.h:76
covise::covise__ChoiceParameter parameter
Definition: WSChoiceParameter.h:74
Definition: WSParameter.h:28