Vuo  2.4.1
VuoInputEditorMathExpressionList.hh
Go to the documentation of this file.
1
10#pragma once
11
13
14extern "C"
15{
16 #include "VuoText.h"
17 #include "VuoList_VuoText.h"
18}
19
24{
25 Q_OBJECT
26 Q_PLUGIN_METADATA(IID "org.vuo.inputEditor" FILE "VuoInputEditorMathExpressionList.json")
27 Q_INTERFACES(VuoInputEditorFactory)
28
29public:
31};
32
38{
39 Q_OBJECT
40
41public:
43
44private:
45 void setUpDialog(QDialog &dialog, json_object *originalValue, json_object *details);
46 QLayout * setUpRow(QDialog &dialog, QLineEdit *lineEdit);
47 void tearDownRow(QLayout *rowLayout);
48 json_object * getAcceptedValue(void);
49 QList<QString> convertToLineEditListFormat(json_object *value);
50 json_object * convertFromLineEditListFormat(const QList<QString> &lineEditTexts);
51 VuoList_VuoText getExpressionsFromLineEditTexts(const QList<QString> &lineEditTexts);
52 QString convertToUserLocale(QString valueInStandardLocale);
53 QString convertFromUserLocale(QString valueAsString);
54 QChar getDecimalPointInUserLocale(void);
55 QChar getListSeparatorInUserLocale(void);
56 bool eventFilter(QObject *o, QEvent *event) VuoWarnUnusedResult;
57
58private slots:
59 void validate();
60 void validateMathExpressionList(bool shouldCheckForAtLeastOneExpression=false);
61
62private:
63 bool isMathExpressionListValid(void);
64
65 bool hasError;
66 QLabel *errorMessage;
67 QMap<QLayout *, QLabel *> errorSymbols;
68 QRegExpValidator *validator;
69 json_object *originalValue;
70};