Vuo  2.0.0
VuoInputEditorIntegerRange.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "VuoInputEditor.hh"
14 #include "VuoSpinBox.hh"
15 
16 extern "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 
30 public:
31  virtual VuoInputEditor * newInputEditor(void);
32 };
33 
38 {
39  Q_OBJECT
40 
41 protected:
42  virtual void setUpDialog(QDialog &dialog, json_object *originalValue, json_object *details);
43  virtual json_object* getAcceptedValue();
44  virtual bool supportsTabbingBetweenPorts(void) { return true; }
45  bool eventFilter(QObject *object, QEvent *event) VuoWarnUnusedResult;
46 
47 private:
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 
60 private 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