21 Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode)
22 Q_PROPERTY(QString textValue READ textValue WRITE setTextValue NOTIFY textValueChanged)
23 Q_PROPERTY(
int intValue READ intValue WRITE setIntValue NOTIFY intValueChanged)
24 Q_PROPERTY(
int doubleValue READ doubleValue WRITE setDoubleValue NOTIFY doubleValueChanged)
25 Q_PROPERTY(QLineEdit::EchoMode textEchoMode READ textEchoMode WRITE setTextEchoMode)
26 Q_PROPERTY(
bool comboBoxEditable READ isComboBoxEditable WRITE setComboBoxEditable)
27 Q_PROPERTY(QStringList comboBoxItems READ comboBoxItems WRITE setComboBoxItems)
28 Q_PROPERTY(
int comboBoxCurrentIndex READ comboBoxCurrentIndex WRITE setComboBoxCurrentIndex NOTIFY comboBoxCurrentIndexChanged)
29 Q_PROPERTY(
int intMinimum READ intMinimum WRITE setIntMinimum)
30 Q_PROPERTY(
int intMaximum READ intMaximum WRITE setIntMaximum)
31 Q_PROPERTY(
int intStep READ intStep WRITE setIntStep)
32 Q_PROPERTY(
double doubleMinimum READ doubleMinimum WRITE setDoubleMinimum)
33 Q_PROPERTY(
double doubleMaximum READ doubleMaximum WRITE setDoubleMaximum)
34 Q_PROPERTY(
int doubleDecimals READ doubleDecimals WRITE setDoubleDecimals)
35 Q_PROPERTY(QString okButtonText READ okButtonText WRITE setOkButtonText)
36 Q_PROPERTY(QString cancelButtonText READ cancelButtonText WRITE setCancelButtonText)
37 Q_PROPERTY(
bool textAlert READ isTextAlert WRITE setTextAlert NOTIFY textAlertChanged)
49 Q_SLOT
void setInputMode(InputMode mode);
50 InputMode inputMode()
const;
52 Q_SLOT
void setTextValue(
const QString &text);
53 QString textValue()
const;
55 Q_SLOT
void setTextEchoMode(QLineEdit::EchoMode mode);
56 QLineEdit::EchoMode textEchoMode()
const;
58 Q_SLOT
void setComboBoxEditable(
bool editable);
59 bool isComboBoxEditable()
const;
61 Q_SLOT
void setComboBoxItems(
const QStringList &items);
62 QStringList comboBoxItems()
const;
64 Q_SLOT
void setComboBoxCurrentIndex(
int comboBoxCurrentIndex);
65 int comboBoxCurrentIndex()
const;
67 Q_SLOT
void setIntValue(
int value);
70 Q_SLOT
void setIntMinimum(
int min);
71 int intMinimum()
const;
73 Q_SLOT
void setIntMaximum(
int max);
74 int intMaximum()
const;
76 Q_SLOT
void setIntRange(
int min,
int max);
78 Q_SLOT
void setIntStep(
int step);
81 Q_SLOT
void setDoubleValue(
double value);
82 double doubleValue()
const;
84 Q_SLOT
void setDoubleMinimum(
double min);
85 double doubleMinimum()
const;
87 Q_SLOT
void setDoubleMaximum(
double max);
88 double doubleMaximum()
const;
90 Q_SLOT
void setDoubleRange(
double min,
double max);
92 Q_SLOT
void setDoubleDecimals(
int decimals);
93 int doubleDecimals()
const;
95 Q_SLOT
void setOkButtonText(
const QString &text);
96 QString okButtonText()
const;
98 Q_SLOT
void setOkButtonEnabled(
const bool enable);
99 bool okButtonIsEnabled()
const;
101 Q_SLOT
void setCancelButtonText(
const QString &text);
102 QString cancelButtonText()
const;
104 Q_SLOT
void setTextAlert(
bool textAlert);
105 bool isTextAlert()
const;
107 static QString getText(QWidget *parent,
const QString &title,
const QString &message,
108 QLineEdit::EchoMode echo = QLineEdit::Normal,
109 const QString &text = QString(),
bool *ok = 0, Qt::WindowFlags flags = Qt::WindowFlags{0},
110 Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
112 static QString getItem(QWidget *parent,
const QString &title,
const QString &message,
113 const QStringList &items,
int current = 0,
bool editable =
true,
114 bool *ok = 0, Qt::WindowFlags flags = Qt::WindowFlags{0},
115 Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
117 static int getInt(QWidget *parent,
const QString &title,
const QString &message,
int value = 0,
118 int minValue = -2147483647,
int maxValue = 2147483647,
119 int step = 1,
bool *ok = 0, Qt::WindowFlags flags = Qt::WindowFlags{0});
120 static double getDouble(QWidget *parent,
const QString &title,
const QString &message,
double value = 0,
121 double minValue = -2147483647,
double maxValue = 2147483647,
122 int decimals = 1,
bool *ok = 0, Qt::WindowFlags flags = Qt::WindowFlags{0});
125 void showEvent(QShowEvent *e);