VAPOR3 3.9.4
TFInfoWidget.h
Go to the documentation of this file.
1#pragma once
2
3#include <QWidget>
4#include <VDoubleLineEdit.h>
5#include <QComboBox>
6#include <string>
7
8namespace VAPoR {
9class RenderParams;
10}
11
15
16class TFInfoWidget : public QWidget {
17 Q_OBJECT
18
19public:
20 enum ValueFormat { Mapped = 0, Percent = 1 };
21
22 TFInfoWidget(const std::string &variableNameTag);
23
26 void SetNormalizedValue(float value);
27
28protected:
29 void paintEvent(QPaintEvent *event);
33 bool isUsingMappedValue() const;
34 float toMappedValue(float normalized) const;
35 float toNormalizedValue(float mapped) const;
36 float getValueFromEdit() const;
37
38 virtual void controlPointChanged(){};
39
40protected:
42 QComboBox * _valueEditType;
43
44 float _min = 0;
45 float _max = 1;
46
47protected:
48 float _value;
49 const std::string _variableNameTag;
50
51private slots:
52 void valueEditTypeChanged(int);
53 void valueEditChanged();
54};
bool isUsingMappedValue() const
TFInfoWidget(const std::string &variableNameTag)
VDoubleLineEdit * _valueEdit
Definition: TFInfoWidget.h:41
void paintEvent(QPaintEvent *event)
QComboBox * _valueEditType
Definition: TFInfoWidget.h:42
float toNormalizedValue(float mapped) const
void DeselectControlPoint()
void updateValue()
bool isUsingNormalizedValue() const
const std::string _variableNameTag
Definition: TFInfoWidget.h:49
void updateValueEditValidator()
void Update(VAPoR::RenderParams *rParams)
void SetNormalizedValue(float value)
virtual void controlPointChanged()
Definition: TFInfoWidget.h:38
float getValueFromEdit() const
float toMappedValue(float normalized) const
A Params subclass for managing parameters used by Renderers.
Definition: RenderParams.h:43
A wrapper for a QLineEdit that handles user input of type double, and provides Vapor's standard sette...