Vuo  2.4.0
VuoInputEditorIntegerRange.hh
Go to the documentation of this file.
1
10#pragma once
11
12#include "VuoInputEditor.hh"
14#include "VuoSpinBox.hh"
15
16extern "C"
17{
18 #include "VuoIntegerRange.h"
19}
20
25{
26 Q_OBJECT
27 Q_PLUGIN_METADATA(IID "org.vuo.inputEditor" FILE "VuoInputEditorIntegerRange.json")
28 Q_INTERFACES(VuoInputEditorFactory)
29
30public:
31 virtual VuoInputEditor * newInputEditor(void);
32};
33
38{
39 Q_OBJECT
40
41protected:
42 virtual void setUpDialog(QDialog &dialog, json_object *originalValue, json_object *details);
44 virtual bool supportsTabbingBetweenPorts(void) { return true; }
45 bool eventFilter(QObject *object, QEvent *event) VuoWarnUnusedResult;
46
47private:
48 VuoIntegerRange currentValue;
49 VuoIntegerRange suggestedMin;
50 VuoIntegerRange suggestedMax;
51 VuoIntegerRange suggestedStep;
52 VuoIntegerRange lastValue;
53
54 VuoSpinBox* spinbox_minimum;
55 VuoSpinBox* spinbox_maximum;
56
57 QCheckBox* checkbox_minimum;
58 QCheckBox* checkbox_maximum;
59
60private slots:
61 void setMinBound(int state);
62 void setMaxBound(int state);
63 void setMinimum(QString newLineEditText);
64 void setMaximum(QString newLineEditText);
65
66 void setupSpinBox(VuoSpinBox* spin, int min, int max, int step, int value);
67};
68