Doc: Modularize QtWidgets documentation.
This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
@ -1717,7 +1717,7 @@ QColor QColorDialog::currentColor() const
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the color that the user selected by clicking the \gui{OK}
|
||||
Returns the color that the user selected by clicking the \uicontrol{OK}
|
||||
or equivalent button.
|
||||
|
||||
\note This color is not always the same as the color held by the
|
||||
@ -1795,7 +1795,7 @@ QColorDialog::ColorDialogOptions QColorDialog::options() const
|
||||
of a color dialog.
|
||||
|
||||
\value ShowAlphaChannel Allow the user to select the alpha component of a color.
|
||||
\value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value DontUseNativeDialog Use Qt's standard color dialog on the Mac instead of Apple's
|
||||
native color panel.
|
||||
|
||||
@ -1819,7 +1819,7 @@ bool QColorDialogPrivate::sharedColorPanelAvailable = true;
|
||||
/*!
|
||||
\fn void QColorDialog::colorSelected(const QColor &color);
|
||||
|
||||
This signal is emitted just after the user has clicked \gui{OK} to
|
||||
This signal is emitted just after the user has clicked \uicontrol{OK} to
|
||||
select a color to use. The chosen color is specified by \a color.
|
||||
|
||||
\sa color, currentColorChanged()
|
||||
@ -1933,7 +1933,7 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr
|
||||
initially set to \a initial. The dialog is a child of \a parent.
|
||||
|
||||
If \a ok is non-null, \e *\a ok is set to true if the user clicked
|
||||
\gui{OK}, and to false if the user clicked Cancel.
|
||||
\uicontrol{OK}, and to false if the user clicked Cancel.
|
||||
|
||||
If the user clicks Cancel, the \a initial value is returned.
|
||||
|
||||
|
@ -181,8 +181,8 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
|
||||
exec() function. When the user closes the dialog, exec() will
|
||||
provide a useful \link #return return value\endlink. Typically,
|
||||
to get the dialog to close and return the appropriate value, we
|
||||
connect a default button, e.g. \gui OK, to the accept() slot and a
|
||||
\gui Cancel button to the reject() slot.
|
||||
connect a default button, e.g. \uicontrol OK, to the accept() slot and a
|
||||
\uicontrol Cancel button to the reject() slot.
|
||||
Alternatively you can call the done() slot with \c Accepted or
|
||||
\c Rejected.
|
||||
|
||||
@ -239,7 +239,7 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
|
||||
partial dialog that shows the most commonly used options, and a
|
||||
full dialog that shows all the options. Typically an extensible
|
||||
dialog will initially appear as a partial dialog, but with a
|
||||
\gui More toggle button. If the user presses the \gui More button down,
|
||||
\uicontrol More toggle button. If the user presses the \uicontrol More button down,
|
||||
the dialog is expanded. The \l{Extension Example} shows how to achieve
|
||||
extensible dialogs using Qt.
|
||||
|
||||
@ -247,8 +247,8 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
|
||||
\section1 Return Value (Modal Dialogs)
|
||||
|
||||
Modal dialogs are often used in situations where a return value is
|
||||
required, e.g. to indicate whether the user pressed \gui OK or
|
||||
\gui Cancel. A dialog can be closed by calling the accept() or the
|
||||
required, e.g. to indicate whether the user pressed \uicontrol OK or
|
||||
\uicontrol Cancel. A dialog can be closed by calling the accept() or the
|
||||
reject() slots, and exec() will return \c Accepted or \c Rejected
|
||||
as appropriate. The exec() call returns the result of the dialog.
|
||||
The result is also available from result() if the dialog has not
|
||||
@ -265,11 +265,11 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
|
||||
|
||||
A modal dialog:
|
||||
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 1
|
||||
\snippet dialogs/dialogs.cpp 1
|
||||
|
||||
A modeless dialog:
|
||||
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 0
|
||||
\snippet dialogs/dialogs.cpp 0
|
||||
|
||||
\sa QDialogButtonBox, QTabWidget, QWidget, QProgressDialog,
|
||||
{fowler}{GUI Design Handbook: Dialogs, Standard}, {Extension Example},
|
||||
|
@ -108,7 +108,7 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
|
||||
functions. On Windows, Mac OS X, KDE and GNOME, these static functions will
|
||||
call the native file dialog when possible.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 0
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 0
|
||||
|
||||
In the above example, a modal QFileDialog is created using a static
|
||||
function. The dialog initially displays the contents of the "/home/jana"
|
||||
@ -119,13 +119,13 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
|
||||
If you want to use multiple filters, separate each one with
|
||||
\e two semicolons. For example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 1
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 1
|
||||
|
||||
You can create your own QFileDialog without using the static
|
||||
functions. By calling setFileMode(), you can specify what the user must
|
||||
select in the dialog:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 2
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 2
|
||||
|
||||
In the above example, the mode of the file dialog is set to
|
||||
AnyFile, meaning that the user can select any file, or even specify a
|
||||
@ -138,7 +138,7 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
|
||||
this indicates what types of objects the user is expected to select.
|
||||
Use setNameFilter() to set the dialog's file filter. For example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 3
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 3
|
||||
|
||||
In the above example, the filter is set to \c{"Images (*.png *.xpm *.jpg)"},
|
||||
this means that only files with the extension \c png, \c xpm,
|
||||
@ -154,12 +154,12 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
|
||||
information alongside each name, such as the file size and modification
|
||||
date. Set the mode with setViewMode():
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 4
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 4
|
||||
|
||||
The last important function you will need to use when creating your
|
||||
own file dialog is selectedFiles().
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 5
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 5
|
||||
|
||||
In the above example, a modal file dialog is created and shown. If
|
||||
the user clicked OK, the file they selected is put in \c fileName.
|
||||
@ -377,7 +377,7 @@ QFileDialog::~QFileDialog()
|
||||
|
||||
For instance:
|
||||
|
||||
\snippet doc/src/snippets/filedialogurls.cpp 0
|
||||
\snippet filedialogurls.cpp 0
|
||||
|
||||
The file dialog will then look like this:
|
||||
|
||||
@ -1100,7 +1100,7 @@ QStringList qt_make_filter_list(const QString &filter)
|
||||
text contained in the parentheses is used as the filter. This means
|
||||
that these calls are all equivalent:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 6
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 6
|
||||
|
||||
\sa setNameFilters()
|
||||
*/
|
||||
@ -1156,7 +1156,7 @@ QStringList qt_strip_filters(const QStringList &filters)
|
||||
|
||||
Sets the \a filters used in the file dialog.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 7
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 7
|
||||
*/
|
||||
void QFileDialog::setNameFilters(const QStringList &filters)
|
||||
{
|
||||
@ -1707,7 +1707,7 @@ extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
|
||||
This is a convenience static function that returns an existing file
|
||||
selected by the user. If the user presses Cancel, it returns a null string.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 8
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 8
|
||||
|
||||
The function creates a modal file dialog with the given \a parent widget.
|
||||
If \a parent is not 0, the dialog will be shown centered over the parent
|
||||
@ -1789,7 +1789,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
|
||||
This is a convenience static function that will return one or more existing
|
||||
files selected by the user.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 9
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 9
|
||||
|
||||
This function creates a modal file dialog with the given \a parent widget.
|
||||
If \a parent is not 0, the dialog will be shown centered over the parent
|
||||
@ -1826,7 +1826,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
|
||||
\note If you want to iterate over the list of files, you should iterate
|
||||
over a copy. For example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 10
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 10
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||
want to do this, you should create the dialog yourself using one of the
|
||||
@ -1878,7 +1878,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
|
||||
\a parent is not 0, the dialog will be shown centered over the parent
|
||||
widget.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 11
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 11
|
||||
|
||||
The file dialog's working directory will be set to \a dir. If \a dir
|
||||
includes a file name, the file will be selected. Only files that match the
|
||||
@ -1962,7 +1962,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
|
||||
This is a convenience static function that will return an existing
|
||||
directory selected by the user.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 12
|
||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 12
|
||||
|
||||
This function creates a modal file dialog with the given \a parent widget.
|
||||
If \a parent is not 0, the dialog will be shown centered over the parent
|
||||
|
@ -95,16 +95,16 @@ QT_BEGIN_NAMESPACE
|
||||
A directory model that displays the contents of a default directory
|
||||
is usually constructed with a parent object:
|
||||
|
||||
\snippet doc/src/snippets/shareddirmodel/main.cpp 2
|
||||
\snippet shareddirmodel/main.cpp 2
|
||||
|
||||
A tree view can be used to display the contents of the model
|
||||
|
||||
\snippet doc/src/snippets/shareddirmodel/main.cpp 4
|
||||
\snippet shareddirmodel/main.cpp 4
|
||||
|
||||
and the contents of a particular directory can be displayed by
|
||||
setting the tree view's root index:
|
||||
|
||||
\snippet doc/src/snippets/shareddirmodel/main.cpp 7
|
||||
\snippet shareddirmodel/main.cpp 7
|
||||
|
||||
The view's root index can be used to control how much of a
|
||||
hierarchical model is displayed. QDirModel provides a convenience
|
||||
|
@ -122,10 +122,10 @@ static const Qt::WindowFlags DefaultWindowFlags =
|
||||
|
||||
Examples:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 0
|
||||
\snippet code/src_gui_dialogs_qfontdialog.cpp 0
|
||||
|
||||
The dialog can also be used to set a widget's font directly:
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 1
|
||||
\snippet code/src_gui_dialogs_qfontdialog.cpp 1
|
||||
If the user clicks OK the font they chose will be used for myWidget,
|
||||
and if they click Cancel the original font is used.
|
||||
|
||||
@ -345,20 +345,20 @@ QFontDialog::~QFontDialog()
|
||||
/*!
|
||||
Executes a modal font dialog and returns a font.
|
||||
|
||||
If the user clicks \gui OK, the selected font is returned. If the user
|
||||
clicks \gui Cancel, the \a initial font is returned.
|
||||
If the user clicks \uicontrol OK, the selected font is returned. If the user
|
||||
clicks \uicontrol Cancel, the \a initial font is returned.
|
||||
|
||||
The dialog is constructed with the given \a parent and the options specified
|
||||
in \a options. \a title is shown as the window title of the dialog and \a
|
||||
initial is the initially selected font. If the \a ok parameter is not-null,
|
||||
the value it refers to is set to true if the user clicks \gui OK, and set to
|
||||
false if the user clicks \gui Cancel.
|
||||
the value it refers to is set to true if the user clicks \uicontrol OK, and set to
|
||||
false if the user clicks \uicontrol Cancel.
|
||||
|
||||
Examples:
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 2
|
||||
\snippet code/src_gui_dialogs_qfontdialog.cpp 2
|
||||
|
||||
The dialog can also be used to set a widget's font directly:
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 3
|
||||
\snippet code/src_gui_dialogs_qfontdialog.cpp 3
|
||||
In this example, if the user clicks OK the font they chose will be
|
||||
used, and if they click Cancel the original font is used.
|
||||
|
||||
@ -377,16 +377,16 @@ QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, cons
|
||||
|
||||
Executes a modal font dialog and returns a font.
|
||||
|
||||
If the user clicks \gui OK, the selected font is returned. If the user
|
||||
clicks \gui Cancel, the Qt default font is returned.
|
||||
If the user clicks \uicontrol OK, the selected font is returned. If the user
|
||||
clicks \uicontrol Cancel, the Qt default font is returned.
|
||||
|
||||
The dialog is constructed with the given \a parent.
|
||||
If the \a ok parameter is not-null, the value it refers to is set
|
||||
to true if the user clicks \gui OK, and false if the user clicks
|
||||
\gui Cancel.
|
||||
to true if the user clicks \uicontrol OK, and false if the user clicks
|
||||
\uicontrol Cancel.
|
||||
|
||||
Example:
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 4
|
||||
\snippet code/src_gui_dialogs_qfontdialog.cpp 4
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog.
|
||||
If you want to do this, you should create the dialog
|
||||
@ -829,7 +829,7 @@ QFont QFontDialog::currentFont() const
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the font that the user selected by clicking the \gui{OK}
|
||||
Returns the font that the user selected by clicking the \uicontrol{OK}
|
||||
or equivalent button.
|
||||
|
||||
\note This font is not always the same as the font held by the
|
||||
@ -849,7 +849,7 @@ QFont QFontDialog::selectedFont() const
|
||||
This enum specifies various options that affect the look and feel
|
||||
of a font dialog.
|
||||
|
||||
\value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value DontUseNativeDialog Use Qt's standard font dialog on the Mac instead of Apple's
|
||||
native font panel. (Currently, the native dialog is never used,
|
||||
but this is likely to change in future Qt releases.)
|
||||
|
@ -442,9 +442,9 @@ void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
|
||||
getDouble(), and getItem(). All the functions can be used in a similar way,
|
||||
for example:
|
||||
|
||||
\snippet examples/dialogs/standarddialogs/dialog.cpp 3
|
||||
\snippet dialogs/standarddialogs/dialog.cpp 3
|
||||
|
||||
The \c ok variable is set to true if the user clicks \gui OK; otherwise it
|
||||
The \c ok variable is set to true if the user clicks \uicontrol OK; otherwise it
|
||||
is set to false.
|
||||
|
||||
\img inputdialogs.png Input Dialogs
|
||||
@ -576,7 +576,7 @@ QString QInputDialog::labelText() const
|
||||
This enum specifies various options that affect the look and feel
|
||||
of an input dialog.
|
||||
|
||||
\value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
|
||||
\value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
|
||||
displaying the items set with setComboBoxItems().
|
||||
|
||||
@ -1133,7 +1133,7 @@ void QInputDialog::done(int result)
|
||||
edit widget if an input method is active.
|
||||
|
||||
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
|
||||
\gui OK and to false if the user pressed \gui Cancel. The dialog's parent
|
||||
\uicontrol OK and to false if the user pressed \uicontrol Cancel. The dialog's parent
|
||||
is \a parent. The dialog will be modal and uses the specified widget
|
||||
\a flags.
|
||||
|
||||
@ -1142,7 +1142,7 @@ void QInputDialog::done(int result)
|
||||
|
||||
Use this static function like this:
|
||||
|
||||
\snippet examples/dialogs/standarddialogs/dialog.cpp 3
|
||||
\snippet dialogs/standarddialogs/dialog.cpp 3
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||
want to do this, you should create the dialog yourself using one of the
|
||||
@ -1185,8 +1185,8 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
|
||||
\a step is the amount by which the values change as the user presses the
|
||||
arrow buttons to increment or decrement the value.
|
||||
|
||||
If \a ok is nonnull *\a ok will be set to true if the user pressed \gui OK
|
||||
and to false if the user pressed \gui Cancel. The dialog's parent is
|
||||
If \a ok is nonnull *\a ok will be set to true if the user pressed \uicontrol OK
|
||||
and to false if the user pressed \uicontrol Cancel. The dialog's parent is
|
||||
\a parent. The dialog will be modal and uses the widget \a flags.
|
||||
|
||||
On success, this function returns the integer which has been entered by the
|
||||
@ -1194,7 +1194,7 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
|
||||
|
||||
Use this static function like this:
|
||||
|
||||
\snippet examples/dialogs/standarddialogs/dialog.cpp 0
|
||||
\snippet dialogs/standarddialogs/dialog.cpp 0
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||
want to do this, you should create the dialog yourself using one of the
|
||||
@ -1234,8 +1234,8 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
|
||||
\a min and \a max are the minimum and maximum values the user may choose.
|
||||
\a decimals is the maximum number of decimal places the number may have.
|
||||
|
||||
If \a ok is nonnull, *\a ok will be set to true if the user pressed \gui OK
|
||||
and to false if the user pressed \gui Cancel. The dialog's parent is
|
||||
If \a ok is nonnull, *\a ok will be set to true if the user pressed \uicontrol OK
|
||||
and to false if the user pressed \uicontrol Cancel. The dialog's parent is
|
||||
\a parent. The dialog will be modal and uses the widget \a flags.
|
||||
|
||||
This function returns the floating point number which has been entered by
|
||||
@ -1243,7 +1243,7 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
|
||||
|
||||
Use this static function like this:
|
||||
|
||||
\snippet examples/dialogs/standarddialogs/dialog.cpp 1
|
||||
\snippet dialogs/standarddialogs/dialog.cpp 1
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||
want to do this, you should create the dialog yourself using one of the
|
||||
@ -1289,7 +1289,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
|
||||
user may only select one of the existing items.
|
||||
|
||||
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
|
||||
\gui OK and to false if the user pressed \gui Cancel. The dialog's parent
|
||||
\uicontrol OK and to false if the user pressed \uicontrol Cancel. The dialog's parent
|
||||
is \a parent. The dialog will be modal and uses the widget \a flags.
|
||||
|
||||
This function returns the text of the current item, or if \a editable is
|
||||
@ -1297,7 +1297,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
|
||||
|
||||
Use this static function like this:
|
||||
|
||||
\snippet examples/dialogs/standarddialogs/dialog.cpp 2
|
||||
\snippet dialogs/standarddialogs/dialog.cpp 2
|
||||
|
||||
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||
want to do this, you should create the dialog yourself using one of the
|
||||
@ -1379,7 +1379,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
|
||||
\fn void QInputDialog::doubleValueSelected(double value)
|
||||
|
||||
This signal is emitted whenever the user selects a double value by
|
||||
accepting the dialog; for example, by clicking the \gui{OK} button.
|
||||
accepting the dialog; for example, by clicking the \uicontrol{OK} button.
|
||||
The selected value is specified by \a value.
|
||||
|
||||
This signal is only relevant when the input dialog is used in
|
||||
@ -1400,7 +1400,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
|
||||
\fn void QInputDialog::intValueSelected(int value)
|
||||
|
||||
This signal is emitted whenever the user selects a integer value by
|
||||
accepting the dialog; for example, by clicking the \gui{OK} button.
|
||||
accepting the dialog; for example, by clicking the \uicontrol{OK} button.
|
||||
The selected value is specified by \a value.
|
||||
|
||||
This signal is only relevant when the input dialog is used in
|
||||
@ -1421,7 +1421,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
|
||||
\fn void QInputDialog::textValueSelected(const QString &text)
|
||||
|
||||
This signal is emitted whenever the user selects a text string by
|
||||
accepting the dialog; for example, by clicking the \gui{OK} button.
|
||||
accepting the dialog; for example, by clicking the \uicontrol{OK} button.
|
||||
The selected string is specified by \a text.
|
||||
|
||||
This signal is only relevant when the input dialog is used in
|
||||
|
@ -498,9 +498,9 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||
the message. The simplest configuration is to set only the
|
||||
\l{QMessageBox::text} {message text} property.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 5
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 5
|
||||
|
||||
The user must click the \gui{OK} button to dismiss the message
|
||||
The user must click the \uicontrol{OK} button to dismiss the message
|
||||
box. The rest of the GUI is blocked until the message box is
|
||||
dismissed.
|
||||
|
||||
@ -514,13 +514,13 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||
responses. The buttons are specified by combining values from
|
||||
StandardButtons using the bitwise OR operator. The display order
|
||||
for the buttons is platform-dependent. For example, on Windows,
|
||||
\gui{Save} is displayed to the left of \gui{Cancel}, whereas on
|
||||
\uicontrol{Save} is displayed to the left of \uicontrol{Cancel}, whereas on
|
||||
Mac OS, the order is reversed.
|
||||
|
||||
Mark one of your standard buttons to be your
|
||||
\l{QMessageBox::defaultButton()} {default button}.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 6
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 6
|
||||
|
||||
This is the approach recommended in the
|
||||
\l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID}
|
||||
@ -534,16 +534,16 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||
The exec() slot returns the StandardButtons value of the button
|
||||
that was clicked.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 7
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 7
|
||||
|
||||
To give the user more information to help him answer the question,
|
||||
set the \l{QMessageBox::detailedText} {detailed text} property. If
|
||||
the \l{QMessageBox::detailedText} {detailed text} property is set,
|
||||
the \gui{Show Details...} button will be shown.
|
||||
the \uicontrol{Show Details...} button will be shown.
|
||||
|
||||
\image msgbox3.png
|
||||
|
||||
Clicking the \gui{Show Details...} button displays the detailed text.
|
||||
Clicking the \uicontrol{Show Details...} button displays the detailed text.
|
||||
|
||||
\image msgbox4.png
|
||||
|
||||
@ -632,7 +632,7 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||
Static functions are available for creating information(),
|
||||
question(), warning(), and critical() message boxes.
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 0
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 0
|
||||
|
||||
The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
|
||||
how to use QMessageBox and the other built-in Qt dialogs.
|
||||
@ -647,7 +647,7 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||
platform). You can test the value of clickedButton() after calling
|
||||
exec(). For example,
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 2
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 2
|
||||
|
||||
\section1 Default and Escape Keys
|
||||
|
||||
@ -1028,7 +1028,7 @@ void QMessageBoxPrivate::detectEscapeButton()
|
||||
|
||||
Example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 3
|
||||
\snippet code/src_gui_dialogs_qmessagebox.cpp 3
|
||||
|
||||
\sa standardButton(), button()
|
||||
*/
|
||||
@ -1707,7 +1707,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
|
||||
and centered over \a parent (if \a parent is not 0). The message
|
||||
includes the version number of Qt being used by the application.
|
||||
|
||||
This is useful for inclusion in the \gui Help menu of an application,
|
||||
This is useful for inclusion in the \uicontrol Help menu of an application,
|
||||
as shown in the \l{mainwindows/menus}{Menus} example.
|
||||
|
||||
QApplication provides this functionality as a slot.
|
||||
@ -1964,7 +1964,7 @@ void QMessageBoxPrivate::retranslateStrings()
|
||||
to make it the cancel or close button (clicked when \key Esc is
|
||||
pressed).
|
||||
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 2
|
||||
\snippet dialogs/dialogs.cpp 2
|
||||
|
||||
The message box is an \l{Qt::ApplicationModal} {application modal}
|
||||
dialog box.
|
||||
|
@ -244,7 +244,7 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
|
||||
to use for the programmer. Do the operation in a loop, call \l setValue() at
|
||||
intervals, and check for cancellation with wasCanceled(). For example:
|
||||
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 3
|
||||
\snippet dialogs/dialogs.cpp 3
|
||||
|
||||
A modeless progress dialog is suitable for operations that take
|
||||
place in the background, where the user is able to interact with the
|
||||
@ -257,11 +257,11 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
|
||||
canceled() signal to a slot that stops the operation, and call \l
|
||||
setValue() at intervals. For example:
|
||||
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 4
|
||||
\snippet dialogs/dialogs.cpp 4
|
||||
\codeline
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 5
|
||||
\snippet dialogs/dialogs.cpp 5
|
||||
\codeline
|
||||
\snippet doc/src/snippets/dialogs/dialogs.cpp 6
|
||||
\snippet dialogs/dialogs.cpp 6
|
||||
|
||||
In both modes the progress dialog may be customized by
|
||||
replacing the child widgets with custom widgets by using setLabel(),
|
||||
|
@ -1809,17 +1809,17 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
\l{dialogs/classwizard}{Class Wizard} and \l{dialogs/licensewizard}{License
|
||||
Wizard}.
|
||||
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 1
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 3
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 1
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 3
|
||||
\dots
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 4
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 4
|
||||
\codeline
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 5
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 7
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 5
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 7
|
||||
\dots
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 8
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 8
|
||||
\codeline
|
||||
\snippet examples/dialogs/trivialwizard/trivialwizard.cpp 10
|
||||
\snippet dialogs/trivialwizard/trivialwizard.cpp 10
|
||||
|
||||
\section1 Wizard Look and Feel
|
||||
|
||||
@ -1856,19 +1856,19 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
In addition to the wizard style, there are several options that
|
||||
control the look and feel of the wizard. These can be set using
|
||||
setOption() or setOptions(). For example, HaveHelpButton makes
|
||||
QWizard show a \gui Help button along with the other wizard
|
||||
QWizard show a \uicontrol Help button along with the other wizard
|
||||
buttons.
|
||||
|
||||
You can even change the order of the wizard buttons to any
|
||||
arbitrary order using setButtonLayout(), and you can add up to
|
||||
three custom buttons (e.g., a \gui Print button) to the button
|
||||
three custom buttons (e.g., a \uicontrol Print button) to the button
|
||||
row. This is achieved by calling setButton() or setButtonText()
|
||||
with CustomButton1, CustomButton2, or CustomButton3 to set up the
|
||||
button, and by enabling the HaveCustomButton1, HaveCustomButton2,
|
||||
or HaveCustomButton3 options. Whenever the user clicks a custom
|
||||
button, customButtonClicked() is emitted. For example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 29
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 29
|
||||
|
||||
\section1 Elements of a Wizard Page
|
||||
|
||||
@ -1936,12 +1936,12 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
To register a field, call QWizardPage::registerField() field.
|
||||
For example:
|
||||
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 8
|
||||
\snippet dialogs/classwizard/classwizard.cpp 8
|
||||
\dots
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 10
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 11
|
||||
\snippet dialogs/classwizard/classwizard.cpp 10
|
||||
\snippet dialogs/classwizard/classwizard.cpp 11
|
||||
\dots
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 13
|
||||
\snippet dialogs/classwizard/classwizard.cpp 13
|
||||
|
||||
The above code registers three fields, \c className, \c
|
||||
baseClass, and \c qobjectMacro, which are associated with three
|
||||
@ -1952,7 +1952,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
The fields of any page are accessible from any other page. For
|
||||
example:
|
||||
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 17
|
||||
\snippet dialogs/classwizard/classwizard.cpp 17
|
||||
|
||||
Here, we call QWizardPage::field() to access the contents of the
|
||||
\c className field (which was defined in the \c ClassInfoPage)
|
||||
@ -1971,7 +1971,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
|
||||
If an asterisk (\c *) is appended to the name when the property
|
||||
is registered, the field is a \e{mandatory field}. When a page has
|
||||
mandatory fields, the \gui Next and/or \gui Finish buttons are
|
||||
mandatory fields, the \uicontrol Next and/or \uicontrol Finish buttons are
|
||||
enabled only when all mandatory fields are filled.
|
||||
|
||||
To consider a field "filled", QWizard simply checks that the
|
||||
@ -1987,7 +1987,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
QWizardPage::completeChanged() signal whenever the page becomes
|
||||
complete or incomplete.
|
||||
|
||||
The enabled/disabled state of the \gui Next and/or \gui Finish
|
||||
The enabled/disabled state of the \uicontrol Next and/or \uicontrol Finish
|
||||
buttons is one way to perform validation on the user input.
|
||||
Another way is to reimplement validateCurrentPage() (or
|
||||
QWizardPage::validatePage()) to perform some last-minute
|
||||
@ -2005,9 +2005,9 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
them using addPage(). By default, the pages are shown in the
|
||||
order in which they were added. For example:
|
||||
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 0
|
||||
\snippet dialogs/classwizard/classwizard.cpp 0
|
||||
\dots
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 2
|
||||
\snippet dialogs/classwizard/classwizard.cpp 2
|
||||
|
||||
When a page is about to be shown, QWizard calls initializePage()
|
||||
(which in turn calls QWizardPage::initializePage()) to fill the
|
||||
@ -2016,11 +2016,11 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
based on other pages' fields (see the \l{initialize page}{example
|
||||
above}).
|
||||
|
||||
If the user presses \gui Back, cleanupPage() is called (which in
|
||||
If the user presses \uicontrol Back, cleanupPage() is called (which in
|
||||
turn calls QWizardPage::cleanupPage()). The default
|
||||
implementation resets the page's fields to their original values
|
||||
(the values they had before initializePage() was called). If you
|
||||
want the \gui Back button to be non-destructive and keep the
|
||||
want the \uicontrol Back button to be non-destructive and keep the
|
||||
values entered by the user, simply enable the IndependentPages
|
||||
option.
|
||||
|
||||
@ -2037,37 +2037,37 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
In complex wizards, pages are identified by IDs. These IDs are
|
||||
typically defined using an enum. For example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.h 0
|
||||
\snippet dialogs/licensewizard/licensewizard.h 0
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.h 2
|
||||
\snippet dialogs/licensewizard/licensewizard.h 2
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.h 3
|
||||
\snippet dialogs/licensewizard/licensewizard.h 3
|
||||
|
||||
The pages are inserted using setPage(), which takes an ID and an
|
||||
instance of QWizardPage (or of a subclass):
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 1
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 1
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 8
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 8
|
||||
|
||||
By default, the pages are shown in increasing ID order. To
|
||||
provide a dynamic order that depends on the options chosen by the
|
||||
user, we must reimplement QWizardPage::nextId(). For example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 18
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 18
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 23
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 23
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 24
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 24
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 25
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 25
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 26
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 26
|
||||
|
||||
It would also be possible to put all the logic in one place, in a
|
||||
QWizard::nextId() reimplementation. For example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qwizard.cpp 0
|
||||
\snippet code/src_gui_dialogs_qwizard.cpp 0
|
||||
|
||||
To start at another page than the page with the lowest ID, call
|
||||
setStartId().
|
||||
@ -2075,7 +2075,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
To test whether a page has been visited or not, call
|
||||
hasVisitedPage(). For example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 27
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 27
|
||||
|
||||
\sa QWizardPage, {Class Wizard Example}, {License Wizard Example}
|
||||
*/
|
||||
@ -2085,12 +2085,12 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
|
||||
This enum specifies the buttons in a wizard.
|
||||
|
||||
\value BackButton The \gui Back button (\gui {Go Back} on Mac OS X)
|
||||
\value NextButton The \gui Next button (\gui Continue on Mac OS X)
|
||||
\value CommitButton The \gui Commit button
|
||||
\value FinishButton The \gui Finish button (\gui Done on Mac OS X)
|
||||
\value CancelButton The \gui Cancel button (see also NoCancelButton)
|
||||
\value HelpButton The \gui Help button (see also HaveHelpButton)
|
||||
\value BackButton The \uicontrol Back button (\uicontrol {Go Back} on Mac OS X)
|
||||
\value NextButton The \uicontrol Next button (\uicontrol Continue on Mac OS X)
|
||||
\value CommitButton The \uicontrol Commit button
|
||||
\value FinishButton The \uicontrol Finish button (\uicontrol Done on Mac OS X)
|
||||
\value CancelButton The \uicontrol Cancel button (see also NoCancelButton)
|
||||
\value HelpButton The \uicontrol Help button (see also HaveHelpButton)
|
||||
\value CustomButton1 The first user-defined button (see also HaveCustomButton1)
|
||||
\value CustomButton2 The second user-defined button (see also HaveCustomButton2)
|
||||
\value CustomButton3 The third user-defined button (see also HaveCustomButton3)
|
||||
@ -2148,18 +2148,18 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
|
||||
\value IgnoreSubTitles Don't show any subtitles, even if they are set.
|
||||
\value ExtendedWatermarkPixmap Extend any WatermarkPixmap all the
|
||||
way down to the window's edge.
|
||||
\value NoDefaultButton Don't make the \gui Next or \gui Finish button the
|
||||
\value NoDefaultButton Don't make the \uicontrol Next or \uicontrol Finish button the
|
||||
dialog's \l{QPushButton::setDefault()}{default button}.
|
||||
\value NoBackButtonOnStartPage Don't show the \gui Back button on the start page.
|
||||
\value NoBackButtonOnLastPage Don't show the \gui Back button on the last page.
|
||||
\value DisabledBackButtonOnLastPage Disable the \gui Back button on the last page.
|
||||
\value HaveNextButtonOnLastPage Show the (disabled) \gui Next button on the last page.
|
||||
\value HaveFinishButtonOnEarlyPages Show the (disabled) \gui Finish button on non-final pages.
|
||||
\value NoCancelButton Don't show the \gui Cancel button.
|
||||
\value CancelButtonOnLeft Put the \gui Cancel button on the left of \gui Back (rather than on
|
||||
the right of \gui Finish or \gui Next).
|
||||
\value HaveHelpButton Show the \gui Help button.
|
||||
\value HelpButtonOnRight Put the \gui Help button on the far right of the button layout
|
||||
\value NoBackButtonOnStartPage Don't show the \uicontrol Back button on the start page.
|
||||
\value NoBackButtonOnLastPage Don't show the \uicontrol Back button on the last page.
|
||||
\value DisabledBackButtonOnLastPage Disable the \uicontrol Back button on the last page.
|
||||
\value HaveNextButtonOnLastPage Show the (disabled) \uicontrol Next button on the last page.
|
||||
\value HaveFinishButtonOnEarlyPages Show the (disabled) \uicontrol Finish button on non-final pages.
|
||||
\value NoCancelButton Don't show the \uicontrol Cancel button.
|
||||
\value CancelButtonOnLeft Put the \uicontrol Cancel button on the left of \uicontrol Back (rather than on
|
||||
the right of \uicontrol Finish or \uicontrol Next).
|
||||
\value HaveHelpButton Show the \uicontrol Help button.
|
||||
\value HelpButtonOnRight Put the \uicontrol Help button on the far right of the button layout
|
||||
(rather than on the far left).
|
||||
\value HaveCustomButton1 Show the first user-defined button (CustomButton1).
|
||||
\value HaveCustomButton2 Show the second user-defined button (CustomButton2).
|
||||
@ -2363,7 +2363,7 @@ QWizardPage *QWizard::page(int theid) const
|
||||
Returns true if the page history contains page \a id; otherwise,
|
||||
returns false.
|
||||
|
||||
Pressing \gui Back marks the current page as "unvisited" again.
|
||||
Pressing \uicontrol Back marks the current page as "unvisited" again.
|
||||
|
||||
\sa visitedPages()
|
||||
*/
|
||||
@ -2377,7 +2377,7 @@ bool QWizard::hasVisitedPage(int theid) const
|
||||
Returns the list of IDs of visited pages, in the order in which the pages
|
||||
were visited.
|
||||
|
||||
Pressing \gui Back marks the current page as "unvisited" again.
|
||||
Pressing \uicontrol Back marks the current page as "unvisited" again.
|
||||
|
||||
\sa hasVisitedPage()
|
||||
*/
|
||||
@ -2635,10 +2635,10 @@ QWizard::WizardOptions QWizard::options() const
|
||||
Sets the text on button \a which to be \a text.
|
||||
|
||||
By default, the text on buttons depends on the wizardStyle. For
|
||||
example, on Mac OS X, the \gui Next button is called \gui
|
||||
example, on Mac OS X, the \uicontrol Next button is called \uicontrol
|
||||
Continue.
|
||||
|
||||
To add extra buttons to the wizard (e.g., a \gui Print button),
|
||||
To add extra buttons to the wizard (e.g., a \uicontrol Print button),
|
||||
one way is to call setButtonText() with CustomButton1,
|
||||
CustomButton2, or CustomButton3 to set their text, and make the
|
||||
buttons visible using the HaveCustomButton1, HaveCustomButton2,
|
||||
@ -2667,7 +2667,7 @@ void QWizard::setButtonText(WizardButton which, const QString &text)
|
||||
If a text has ben set using setButtonText(), this text is returned.
|
||||
|
||||
By default, the text on buttons depends on the wizardStyle. For
|
||||
example, on Mac OS X, the \gui Next button is called \gui
|
||||
example, on Mac OS X, the \uicontrol Next button is called \uicontrol
|
||||
Continue.
|
||||
|
||||
\sa button(), setButton(), setButtonText(), QWizardPage::buttonText(),
|
||||
@ -2704,7 +2704,7 @@ QString QWizard::buttonText(WizardButton which) const
|
||||
|
||||
Example:
|
||||
|
||||
\snippet doc/src/snippets/code/src_gui_dialogs_qwizard.cpp 1
|
||||
\snippet code/src_gui_dialogs_qwizard.cpp 1
|
||||
|
||||
\sa setButton(), setButtonText(), setOptions()
|
||||
*/
|
||||
@ -2738,7 +2738,7 @@ void QWizard::setButtonLayout(const QList<WizardButton> &layout)
|
||||
/*!
|
||||
Sets the button corresponding to role \a which to \a button.
|
||||
|
||||
To add extra buttons to the wizard (e.g., a \gui Print button),
|
||||
To add extra buttons to the wizard (e.g., a \uicontrol Print button),
|
||||
one way is to call setButton() with CustomButton1 to
|
||||
CustomButton3, and make the buttons visible using the
|
||||
HaveCustomButton1 to HaveCustomButton3 options.
|
||||
@ -3029,27 +3029,27 @@ QSize QWizard::sizeHint() const
|
||||
/*!
|
||||
\fn void QWizard::helpRequested()
|
||||
|
||||
This signal is emitted when the user clicks the \gui Help button.
|
||||
This signal is emitted when the user clicks the \uicontrol Help button.
|
||||
|
||||
By default, no \gui Help button is shown. Call
|
||||
By default, no \uicontrol Help button is shown. Call
|
||||
setOption(HaveHelpButton, true) to have one.
|
||||
|
||||
Example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 0
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 0
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 5
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 7
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 5
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 7
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 8
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 8
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 10
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 10
|
||||
\dots
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 12
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 12
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 14
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 14
|
||||
\codeline
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 15
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 15
|
||||
|
||||
\sa customButtonClicked()
|
||||
*/
|
||||
@ -3070,7 +3070,7 @@ QSize QWizard::sizeHint() const
|
||||
/*!
|
||||
Goes back to the previous page.
|
||||
|
||||
This is equivalent to pressing the \gui Back button.
|
||||
This is equivalent to pressing the \uicontrol Back button.
|
||||
|
||||
\sa next(), accept(), reject(), restart()
|
||||
*/
|
||||
@ -3086,7 +3086,7 @@ void QWizard::back()
|
||||
/*!
|
||||
Advances to the next page.
|
||||
|
||||
This is equivalent to pressing the \gui Next or \gui Commit button.
|
||||
This is equivalent to pressing the \uicontrol Next or \uicontrol Commit button.
|
||||
|
||||
\sa nextId(), back(), accept(), reject(), restart()
|
||||
*/
|
||||
@ -3253,7 +3253,7 @@ void QWizard::done(int result)
|
||||
|
||||
This virtual function is called by QWizard to prepare page \a id
|
||||
just before it is shown either as a result of QWizard::restart()
|
||||
being called, or as a result of the user clicking \gui Next. (However, if the \l
|
||||
being called, or as a result of the user clicking \uicontrol Next. (However, if the \l
|
||||
QWizard::IndependentPages option is set, this function is only
|
||||
called the first time the page is shown.)
|
||||
|
||||
@ -3277,7 +3277,7 @@ void QWizard::initializePage(int theid)
|
||||
\fn void QWizard::cleanupPage(int id)
|
||||
|
||||
This virtual function is called by QWizard to clean up page \a id just before the
|
||||
user leaves it by clicking \gui Back (unless the \l QWizard::IndependentPages option is set).
|
||||
user leaves it by clicking \uicontrol Back (unless the \l QWizard::IndependentPages option is set).
|
||||
|
||||
The default implementation calls QWizardPage::cleanupPage() on
|
||||
page(\a id).
|
||||
@ -3293,15 +3293,15 @@ void QWizard::cleanupPage(int theid)
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard when the user clicks
|
||||
\gui Next or \gui Finish to perform some last-minute validation.
|
||||
\uicontrol Next or \uicontrol Finish to perform some last-minute validation.
|
||||
If it returns true, the next page is shown (or the wizard
|
||||
finishes); otherwise, the current page stays up.
|
||||
|
||||
The default implementation calls QWizardPage::validatePage() on
|
||||
the currentPage().
|
||||
|
||||
When possible, it is usually better style to disable the \gui
|
||||
Next or \gui Finish button (by specifying \l{mandatory fields} or
|
||||
When possible, it is usually better style to disable the \uicontrol
|
||||
Next or \uicontrol Finish button (by specifying \l{mandatory fields} or
|
||||
by reimplementing QWizardPage::isComplete()) than to reimplement
|
||||
validateCurrentPage().
|
||||
|
||||
@ -3318,7 +3318,7 @@ bool QWizard::validateCurrentPage()
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard to find out which page
|
||||
to show when the user clicks the \gui Next button.
|
||||
to show when the user clicks the \uicontrol Next button.
|
||||
|
||||
The return value is the ID of the next page, or -1 if no page follows.
|
||||
|
||||
@ -3362,29 +3362,29 @@ int QWizard::nextId() const
|
||||
|
||||
\list
|
||||
\li initializePage() is called to initialize the page's contents
|
||||
when the user clicks the wizard's \gui Next button. If you
|
||||
when the user clicks the wizard's \uicontrol Next button. If you
|
||||
want to derive the page's default from what the user entered
|
||||
on previous pages, this is the function to reimplement.
|
||||
\li cleanupPage() is called to reset the page's contents when the
|
||||
user clicks the wizard's \gui Back button.
|
||||
\li validatePage() validates the page when the user clicks \gui
|
||||
Next or \gui Finish. It is often used to show an error message
|
||||
user clicks the wizard's \uicontrol Back button.
|
||||
\li validatePage() validates the page when the user clicks \uicontrol
|
||||
Next or \uicontrol Finish. It is often used to show an error message
|
||||
if the user has entered incomplete or invalid information.
|
||||
\li nextId() returns the ID of the next page. It is useful when
|
||||
\l{creating non-linear wizards}, which allow different
|
||||
traversal paths based on the information provided by the user.
|
||||
\li isComplete() is called to determine whether the \gui Next
|
||||
and/or \gui Finish button should be enabled or disabled. If
|
||||
\li isComplete() is called to determine whether the \uicontrol Next
|
||||
and/or \uicontrol Finish button should be enabled or disabled. If
|
||||
you reimplement isComplete(), also make sure that
|
||||
completeChanged() is emitted whenever the complete state
|
||||
changes.
|
||||
\endlist
|
||||
|
||||
Normally, the \gui Next button and the \gui Finish button of a
|
||||
wizard are mutually exclusive. If isFinalPage() returns true, \gui
|
||||
Finish is available; otherwise, \gui Next is available. By
|
||||
Normally, the \uicontrol Next button and the \uicontrol Finish button of a
|
||||
wizard are mutually exclusive. If isFinalPage() returns true, \uicontrol
|
||||
Finish is available; otherwise, \uicontrol Next is available. By
|
||||
default, isFinalPage() is true only when nextId() returns -1. If
|
||||
you want to show \gui Next and \gui Final simultaneously for a
|
||||
you want to show \uicontrol Next and \uicontrol Final simultaneously for a
|
||||
page (letting the user perform an "early finish"), call
|
||||
setFinalPage(true) on that page. For wizards that support early
|
||||
finishes, you might also want to set the
|
||||
@ -3532,7 +3532,7 @@ QPixmap QWizardPage::pixmap(QWizard::WizardPixmap which) const
|
||||
/*!
|
||||
This virtual function is called by QWizard::initializePage() to
|
||||
prepare the page just before it is shown either as a result of QWizard::restart()
|
||||
being called, or as a result of the user clicking \gui Next.
|
||||
being called, or as a result of the user clicking \uicontrol Next.
|
||||
(However, if the \l QWizard::IndependentPages option is set, this function is only
|
||||
called the first time the page is shown.)
|
||||
|
||||
@ -3540,7 +3540,7 @@ QPixmap QWizardPage::pixmap(QWizard::WizardPixmap which) const
|
||||
fields are properly initialized based on fields from previous
|
||||
pages. For example:
|
||||
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 17
|
||||
\snippet dialogs/classwizard/classwizard.cpp 17
|
||||
|
||||
The default implementation does nothing.
|
||||
|
||||
@ -3552,7 +3552,7 @@ void QWizardPage::initializePage()
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard::cleanupPage() when
|
||||
the user leaves the page by clicking \gui Back (unless the \l QWizard::IndependentPages
|
||||
the user leaves the page by clicking \uicontrol Back (unless the \l QWizard::IndependentPages
|
||||
option is set).
|
||||
|
||||
The default implementation resets the page's fields to their
|
||||
@ -3576,14 +3576,14 @@ void QWizardPage::cleanupPage()
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard::validateCurrentPage()
|
||||
when the user clicks \gui Next or \gui Finish to perform some
|
||||
when the user clicks \uicontrol Next or \uicontrol Finish to perform some
|
||||
last-minute validation. If it returns true, the next page is shown
|
||||
(or the wizard finishes); otherwise, the current page stays up.
|
||||
|
||||
The default implementation returns true.
|
||||
|
||||
When possible, it is usually better style to disable the \gui
|
||||
Next or \gui Finish button (by specifying \l{mandatory fields} or
|
||||
When possible, it is usually better style to disable the \uicontrol
|
||||
Next or \uicontrol Finish button (by specifying \l{mandatory fields} or
|
||||
reimplementing isComplete()) than to reimplement validatePage().
|
||||
|
||||
\sa QWizard::validateCurrentPage(), isComplete()
|
||||
@ -3595,7 +3595,7 @@ bool QWizardPage::validatePage()
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard to determine whether
|
||||
the \gui Next or \gui Finish button should be enabled or
|
||||
the \uicontrol Next or \uicontrol Finish button should be enabled or
|
||||
disabled.
|
||||
|
||||
The default implementation returns true if all \l{mandatory
|
||||
@ -3645,7 +3645,7 @@ bool QWizardPage::isComplete() const
|
||||
/*!
|
||||
Explicitly sets this page to be final if \a finalPage is true.
|
||||
|
||||
After calling setFinalPage(true), isFinalPage() returns true and the \gui
|
||||
After calling setFinalPage(true), isFinalPage() returns true and the \uicontrol
|
||||
Finish button is visible (and enabled if isComplete() returns
|
||||
true).
|
||||
|
||||
@ -3664,7 +3664,7 @@ void QWizardPage::setFinalPage(bool finalPage)
|
||||
}
|
||||
|
||||
/*!
|
||||
This function is called by QWizard to determine whether the \gui
|
||||
This function is called by QWizard to determine whether the \uicontrol
|
||||
Finish button should be shown for this page or not.
|
||||
|
||||
By default, it returns true if there is no next page
|
||||
@ -3695,12 +3695,12 @@ bool QWizardPage::isFinalPage() const
|
||||
sets it to be a normal page.
|
||||
|
||||
A commit page is a page that represents an action which cannot be undone
|
||||
by clicking \gui Back or \gui Cancel.
|
||||
by clicking \uicontrol Back or \uicontrol Cancel.
|
||||
|
||||
A \gui Commit button replaces the \gui Next button on a commit page. Clicking this
|
||||
button simply calls QWizard::next() just like clicking \gui Next does.
|
||||
A \uicontrol Commit button replaces the \uicontrol Next button on a commit page. Clicking this
|
||||
button simply calls QWizard::next() just like clicking \uicontrol Next does.
|
||||
|
||||
A page entered directly from a commit page has its \gui Back button disabled.
|
||||
A page entered directly from a commit page has its \uicontrol Back button disabled.
|
||||
|
||||
\sa isCommitPage()
|
||||
*/
|
||||
@ -3748,7 +3748,7 @@ void QWizardPage::setButtonText(QWizard::WizardButton which, const QString &text
|
||||
this text is returned.
|
||||
|
||||
By default, the text on buttons depends on the QWizard::wizardStyle.
|
||||
For example, on Mac OS X, the \gui Next button is called \gui
|
||||
For example, on Mac OS X, the \uicontrol Next button is called \uicontrol
|
||||
Continue.
|
||||
|
||||
\sa setButtonText(), QWizard::buttonText(), QWizard::setButtonText()
|
||||
@ -3768,7 +3768,7 @@ QString QWizardPage::buttonText(QWizard::WizardButton which) const
|
||||
|
||||
/*!
|
||||
This virtual function is called by QWizard::nextId() to find
|
||||
out which page to show when the user clicks the \gui Next button.
|
||||
out which page to show when the user clicks the \uicontrol Next button.
|
||||
|
||||
The return value is the ID of the next page, or -1 if no page follows.
|
||||
|
||||
@ -3778,7 +3778,7 @@ QString QWizardPage::buttonText(QWizard::WizardButton which) const
|
||||
By reimplementing this function, you can specify a dynamic page
|
||||
order. For example:
|
||||
|
||||
\snippet examples/dialogs/licensewizard/licensewizard.cpp 18
|
||||
\snippet dialogs/licensewizard/licensewizard.cpp 18
|
||||
|
||||
\sa QWizard::nextId()
|
||||
*/
|
||||
@ -3845,7 +3845,7 @@ void QWizardPage::setField(const QString &name, const QVariant &value)
|
||||
|
||||
Example:
|
||||
|
||||
\snippet examples/dialogs/classwizard/classwizard.cpp 17
|
||||
\snippet dialogs/classwizard/classwizard.cpp 17
|
||||
|
||||
\sa QWizard::field(), setField(), registerField()
|
||||
*/
|
||||
@ -3868,8 +3868,8 @@ QVariant QWizardPage::field(const QString &name) const
|
||||
explicitly about each other.
|
||||
|
||||
If \a name ends with an asterisk (\c *), the field is a mandatory
|
||||
field. When a page has mandatory fields, the \gui Next and/or
|
||||
\gui Finish buttons are enabled only when all mandatory fields
|
||||
field. When a page has mandatory fields, the \uicontrol Next and/or
|
||||
\uicontrol Finish buttons are enabled only when all mandatory fields
|
||||
are filled. This requires a \a changedSignal to be specified, to
|
||||
tell QWizard to recheck the value stored by the mandatory field.
|
||||
|
||||
|
BIN
src/widgets/doc/images/assistant-toolbar.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
src/widgets/doc/images/buttonbox-gnomelayout-horizontal.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
src/widgets/doc/images/buttonbox-gnomelayout-vertical.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
src/widgets/doc/images/buttonbox-kdelayout-horizontal.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
src/widgets/doc/images/buttonbox-kdelayout-vertical.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
src/widgets/doc/images/buttonbox-mac-modeless-horizontal.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
src/widgets/doc/images/buttonbox-mac-modeless-vertical.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
src/widgets/doc/images/buttonbox-maclayout-horizontal.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
src/widgets/doc/images/buttonbox-maclayout-vertical.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
src/widgets/doc/images/buttonbox-winlayout-horizontal.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
src/widgets/doc/images/buttonbox-winlayout-vertical.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1007 B After Width: | Height: | Size: 1007 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 538 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 934 B After Width: | Height: | Size: 934 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 863 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
src/widgets/doc/images/checkboxes-exclusive.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
src/widgets/doc/images/checkboxes-non-exclusive.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 538 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
src/widgets/doc/images/cleanlooks-pushbutton-menu.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
Before Width: | Height: | Size: 983 B After Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
BIN
src/widgets/doc/images/graphicsview-ellipseitem-pie.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
src/widgets/doc/images/graphicsview-ellipseitem.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |