Vuo 2.4.4
Loading...
Searching...
No Matches
VuoDetailsEditorNumeric.hh
Go to the documentation of this file.
1
10#pragma once
11
12class VuoType;
13
18class VuoDetailsEditorNumeric: public QWidget
19{
20 Q_OBJECT
21public:
22 explicit VuoDetailsEditorNumeric(VuoType *type, QWidget *parent=0);
23 json_object * show(QPoint portLeftCenter, json_object *originalDetails);
24
25protected:
26 void setUpDialog(QDialog &dialog, json_object *originalDetails);
27 void setUpLineEdit(QLineEdit *lineEdit, json_object *originalValue);
28 QString convertToLineEditFormat(json_object *value);
29 json_object * convertFromLineEditsFormat(const QString &suggestedMinValueAsString,
30 const QString &suggestedMaxValueAsString,
31 const QString &suggestedStepValueAsString);
32 json_object * getAcceptedValue(void);
33
34private:
35 enum detail
36 {
37 suggestedMin,
38 suggestedMax,
39 suggestedStep
40 };
41
42 VuoType *type;
43 map<detail, QLineEdit *> lineEditForDetail;
44 map<detail, QLabel *> labelForDetail;
45
46 QFont getDefaultFont(void);
47};