42 #ifndef QINPUTDIALOG_H 43 #define QINPUTDIALOG_H 45 #include <QtGui/qdialog.h> 46 #include <QtCore/qstring.h> 47 #include <QtGui/qlineedit.h> 55 #ifndef QT_NO_INPUTDIALOG 66 QDOC_PROPERTY(InputDialogOptions options READ options WRITE setOptions)
68 QDOC_PROPERTY(
int intValue READ intValue WRITE setIntValue NOTIFY intValueChanged)
69 QDOC_PROPERTY(
int doubleValue READ doubleValue WRITE setDoubleValue NOTIFY doubleValueChanged)
71 QDOC_PROPERTY(
bool comboBoxEditable READ isComboBoxEditable WRITE setComboBoxEditable)
73 QDOC_PROPERTY(
int intMinimum READ intMinimum WRITE setIntMinimum)
74 QDOC_PROPERTY(
int intMaximum READ intMaximum WRITE setIntMaximum)
76 QDOC_PROPERTY(
double doubleMinimum READ doubleMinimum WRITE setDoubleMinimum)
77 QDOC_PROPERTY(
double doubleMaximum READ doubleMaximum WRITE setDoubleMaximum)
78 QDOC_PROPERTY(
int doubleDecimals READ doubleDecimals WRITE setDoubleDecimals)
84 NoButtons = 0x00000001,
85 UseListViewForComboBoxItems = 0x00000002
107 void setOptions(InputDialogOptions options);
108 InputDialogOptions options()
const;
116 void setComboBoxEditable(
bool editable);
117 bool isComboBoxEditable()
const;
122 void setIntValue(
int value);
123 int intValue()
const;
125 void setIntMinimum(
int min);
126 int intMinimum()
const;
128 void setIntMaximum(
int max);
129 int intMaximum()
const;
131 void setIntRange(
int min,
int max);
133 void setIntStep(
int step);
136 void setDoubleValue(
double value);
137 double doubleValue()
const;
139 void setDoubleMinimum(
double min);
140 double doubleMinimum()
const;
142 void setDoubleMaximum(
double max);
143 double doubleMaximum()
const;
145 void setDoubleRange(
double min,
double max);
147 void setDoubleDecimals(
int decimals);
148 int doubleDecimals()
const;
154 QString cancelButtonText()
const;
156 #ifdef Q_NO_USING_KEYWORD 174 Qt::InputMethodHints inputMethodHints =
Qt::ImhNone);
176 const QStringList &items,
int current = 0,
bool editable =
true,
177 bool *ok = 0, Qt::WindowFlags flags = 0,
178 Qt::InputMethodHints inputMethodHints =
Qt::ImhNone);
184 const QStringList &items,
int current = 0,
bool editable =
true,
185 bool *ok = 0, Qt::WindowFlags flags = 0);
188 const QString &
text,
bool *ok, Qt::WindowFlags flags,
189 Qt::InputMethodHints inputMethodHints);
191 const QStringList &items,
int current,
bool editable,
192 bool *ok, Qt::WindowFlags flags,
193 Qt::InputMethodHints inputMethodHints);
196 int minValue = -2147483647,
int maxValue = 2147483647,
197 int step = 1,
bool *ok = 0, Qt::WindowFlags flags = 0);
198 static double getDouble(
QWidget *parent,
const QString &title,
const QString &label,
double value = 0,
199 double minValue = -2147483647,
double maxValue = 2147483647,
200 int decimals = 1,
bool *ok = 0, Qt::WindowFlags flags = 0);
204 int minValue = -2147483647,
int maxValue = 2147483647,
205 int step = 1,
bool *ok = 0, Qt::WindowFlags flags = 0);
211 QWidget *parent = 0,
const char * = 0, Qt::WindowFlags flags = 0)
212 {
return getText(parent, title, label, echo,
text, ok, flags); }
213 inline static QT3_SUPPORT
int getInteger(
const QString &title,
const QString &label,
int value = 0,
214 int minValue = -2147483647,
int maxValue = 2147483647,
215 int step = 1,
bool *ok = 0,
216 QWidget *parent = 0,
const char * = 0, Qt::WindowFlags flags = 0)
217 {
return getInteger(parent, title, label, value, minValue, maxValue, step, ok, flags); }
218 inline static QT3_SUPPORT
double getDouble(
const QString &title,
const QString &label,
double value = 0,
219 double minValue = -2147483647,
double maxValue = 2147483647,
220 int decimals = 1,
bool *ok = 0,
221 QWidget *parent = 0,
const char * = 0, Qt::WindowFlags flags = 0)
222 {
return getDouble(parent, title, label, value, minValue, maxValue, decimals, ok, flags); }
224 int current = 0,
bool editable =
true,
bool *ok = 0,
225 QWidget *parent = 0,
const char * = 0, Qt::WindowFlags flags = 0)
226 {
return getItem(parent, title, label, list, current, editable, ok, flags); }
233 void intValueChanged(
int value);
234 void intValueSelected(
int value);
235 void doubleValueChanged(
double value);
236 void doubleValueSelected(
double value);
240 void done(
int result);
250 #endif // QT_NO_INPUTDIALOG 256 #endif // QINPUTDIALOG_H
static void getText(QString &text, QTextDocumentPrivate *priv, const QString &docText, int pos, int end)
#define QT_END_NAMESPACE
This macro expands to.
#define QDOC_PROPERTY(text)
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QDialog class is the base class of dialog windows.
QSize minimumSizeHint() const
Reimplemented Function
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
EchoMode
This enum type describes how a line edit should display its contents.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
The QStringList class provides a list of strings.
QSize sizeHint() const
Reimplemented Function
virtual void done(int)
Closes the dialog and sets its result code to r.
The QModelIndex class is used to locate data in a data model.
void open()
Shows the dialog as a window modal dialog, returning immediately.
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
void setVisible(bool visible)
Reimplemented Function