Vuo
2.4.0
type
inputEditor
VuoInputEditorRange
VuoInputEditorRange.hh
Go to the documentation of this file.
1
10
#pragma once
11
12
#include "
VuoInputEditorWithDialog.hh
"
13
#include "
VuoDoubleSpinBox.hh
"
14
15
extern
"C"
{
16
#include "
VuoRange.h
"
17
#include "
VuoBoolean.h
"
18
}
19
23
class
VuoInputEditorRangeFactory
:
public
VuoInputEditorFactory
24
{
25
Q_OBJECT
26
Q_PLUGIN_METADATA(IID
"org.vuo.inputEditor"
FILE
"VuoInputEditorRange.json"
)
27
Q_INTERFACES(
VuoInputEditorFactory
)
28
29
public
:
30
virtual
VuoInputEditor
*
newInputEditor
(
void
);
31
};
32
54
class
VuoInputEditorRange
:
public
VuoInputEditorWithDialog
55
{
56
Q_OBJECT
57
58
protected
:
59
void
setUpDialog
(QDialog &dialog,
json_object
*originalValue,
json_object
*details);
60
json_object
*
getAcceptedValue
(
void
);
61
virtual
bool
supportsTabbingBetweenPorts
(
void
) {
return
true
; }
62
63
private
:
64
65
VuoRange
current;
66
VuoRange
lastValue;
67
VuoRange
suggestedMin;
68
VuoRange
suggestedMax;
69
VuoRange
suggestedStep;
70
71
VuoBoolean
requireMin;
72
VuoBoolean
requireMax;
73
74
QSlider *slider_min;
75
QSlider *slider_max;
76
77
VuoDoubleSpinBox
* spinbox_min;
78
VuoDoubleSpinBox
* spinbox_max;
79
80
QCheckBox* toggle_hasMin;
81
QCheckBox* toggle_hasMax;
82
83
VuoDoubleSpinBox
* initSpinBox(QDialog& dialog,
double
initialValue,
double
min,
double
max,
double
step
);
84
QSlider* initSlider(QSlider* slider,
double
initialValue,
double
min,
double
max,
double
step
);
85
86
private
slots:
87
88
void
setMinimumValue(
double
value);
89
void
setMaximumValue(
double
value);
90
91
void
setHasMinBound(
int
state);
92
void
setHasMaxBound(
int
state);
93
94
void
onSliderUpdate(
int
sliderValue);
95
void
onSpinboxUpdate(
double
spinboxValue);
96
};
97
Generated on Wed Nov 24 2021 15:28:18 for Vuo by
1.9.2