Vuo  2.1.2
VuoInputEditorReal.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
13 #include "VuoDoubleSpinBox.hh"
14 
15 extern "C" {
16 #include "VuoReal.h"
17 #include "VuoBoolean.h"
18 }
19 
24 {
25  Q_OBJECT
26  Q_PLUGIN_METADATA(IID "org.vuo.inputEditor" FILE "VuoInputEditorReal.json")
27  Q_INTERFACES(VuoInputEditorFactory)
28 
29 public:
30  virtual VuoInputEditor * newInputEditor(void);
31 };
32 
53 {
54  Q_OBJECT
55 
56 protected:
57  void setUpDialog(QDialog &dialog, json_object *originalValue, json_object *details);
59  virtual bool supportsTabbingBetweenPorts(void) { return true; }
61 friend class TestInputEditors;
62 
63 private:
64 
65  VuoReal current;
66  VuoReal defaultValue;
67  VuoReal previous;
68  VuoReal suggestedMin;
69  VuoReal suggestedMax;
70  VuoReal suggestedStep;
71  VuoReal automatic;
72  bool autoSupersedesDefault;
73 
74  QCheckBox* checkbox;
75  QSlider* slider;
76 
77  VuoDoubleSpinBox* initSpinBox(QDialog& dialog, double initialValue);
78  QSlider* initSlider(QDialog& dialog, double initialValue);
79 
80 private slots:
81 
82  void setIsAuto(int state);
83  void onSliderUpdate(int sliderValue);
84  void onSpinboxUpdate(double spinboxValue);
85 };
86