VAPOR3
3.9.4
apps
vaporgui
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
8
namespace
VAPoR
{
9
class
RenderParams;
10
}
11
15
16
class
TFInfoWidget
:
public
QWidget {
17
Q_OBJECT
18
19
public
:
20
enum
ValueFormat
{
Mapped
= 0,
Percent
= 1 };
21
22
TFInfoWidget
(
const
std::string &variableNameTag);
23
24
void
Update
(
VAPoR::RenderParams
*rParams);
25
void
DeselectControlPoint
();
26
void
SetNormalizedValue
(
float
value);
27
28
protected
:
29
void
paintEvent
(QPaintEvent *event);
30
void
updateValue
();
31
void
updateValueEditValidator
();
32
bool
isUsingNormalizedValue
()
const
;
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
40
protected
:
41
VDoubleLineEdit
*
_valueEdit
;
42
QComboBox *
_valueEditType
;
43
44
float
_min
= 0;
45
float
_max
= 1;
46
47
protected
:
48
float
_value
;
49
const
std::string
_variableNameTag
;
50
51
private
slots:
52
void
valueEditTypeChanged(
int
);
53
void
valueEditChanged();
54
};
VDoubleLineEdit.h
TFInfoWidget
Definition:
TFInfoWidget.h:16
TFInfoWidget::isUsingMappedValue
bool isUsingMappedValue() const
TFInfoWidget::TFInfoWidget
TFInfoWidget(const std::string &variableNameTag)
TFInfoWidget::_valueEdit
VDoubleLineEdit * _valueEdit
Definition:
TFInfoWidget.h:41
TFInfoWidget::paintEvent
void paintEvent(QPaintEvent *event)
TFInfoWidget::_valueEditType
QComboBox * _valueEditType
Definition:
TFInfoWidget.h:42
TFInfoWidget::_value
float _value
Definition:
TFInfoWidget.h:48
TFInfoWidget::toNormalizedValue
float toNormalizedValue(float mapped) const
TFInfoWidget::DeselectControlPoint
void DeselectControlPoint()
TFInfoWidget::ValueFormat
ValueFormat
Definition:
TFInfoWidget.h:20
TFInfoWidget::Percent
@ Percent
Definition:
TFInfoWidget.h:20
TFInfoWidget::Mapped
@ Mapped
Definition:
TFInfoWidget.h:20
TFInfoWidget::updateValue
void updateValue()
TFInfoWidget::isUsingNormalizedValue
bool isUsingNormalizedValue() const
TFInfoWidget::_variableNameTag
const std::string _variableNameTag
Definition:
TFInfoWidget.h:49
TFInfoWidget::updateValueEditValidator
void updateValueEditValidator()
TFInfoWidget::_max
float _max
Definition:
TFInfoWidget.h:45
TFInfoWidget::Update
void Update(VAPoR::RenderParams *rParams)
TFInfoWidget::SetNormalizedValue
void SetNormalizedValue(float value)
TFInfoWidget::controlPointChanged
virtual void controlPointChanged()
Definition:
TFInfoWidget.h:38
TFInfoWidget::_min
float _min
Definition:
TFInfoWidget.h:44
TFInfoWidget::getValueFromEdit
float getValueFromEdit() const
TFInfoWidget::toMappedValue
float toMappedValue(float normalized) const
VAPoR::RenderParams
A Params subclass for managing parameters used by Renderers.
Definition:
RenderParams.h:43
VDoubleLineEdit
A wrapper for a QLineEdit that handles user input of type double, and provides Vapor's standard sette...
Definition:
VDoubleLineEdit.h:18
VAPoR
Definition:
AnnotationParams.h:33
Generated by
1.9.6