Vuo  2.4.0
VuoInputEditorInteger.hh
Go to the documentation of this file.
1
10#pragma once
11
13#include "VuoSpinBox.hh"
14
15extern "C" {
16#include "VuoInteger.h"
17}
18
23{
24 Q_OBJECT
25 Q_PLUGIN_METADATA(IID "org.vuo.inputEditor" FILE "VuoInputEditorInteger.json")
26 Q_INTERFACES(VuoInputEditorFactory)
27
28public:
29 virtual VuoInputEditor * newInputEditor(void);
30};
31
52{
53 Q_OBJECT
54
55protected:
56 void setUpDialog(QDialog &dialog, json_object *originalValue, json_object *details);
58 virtual bool supportsTabbingBetweenPorts(void) { return true; }
59
60private:
61
62 VuoInteger previous;
63 VuoInteger current;
64 VuoInteger defaultValue;
65 VuoInteger autoValue;
66 VuoInteger suggestedMin;
67 VuoInteger suggestedMax;
68 bool hasAutoValue;
69
70 QSlider* slider;
71 VuoSpinBox* spinbox;
72 QCheckBox* autoToggle;
73
74 VuoSpinBox* initSpinBox(QDialog& dialog, VuoInteger initialValue);
75 QSlider* initSlider(QDialog& dialog, VuoInteger initialValue);
76
77private slots:
78 void setAutoToggled(int state);
79 void onSliderUpdate(int sliderValue);
80 void onSpinboxUpdate(QString spinboxValue);
81};
82