summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/qquickdialog.cpp84
-rw-r--r--src/dialogs/qquickplatformmessagedialog.cpp100
2 files changed, 115 insertions, 69 deletions
diff --git a/src/dialogs/qquickdialog.cpp b/src/dialogs/qquickdialog.cpp
index 788c1e4c8..88f7776f2 100644
--- a/src/dialogs/qquickdialog.cpp
+++ b/src/dialogs/qquickdialog.cpp
@@ -416,14 +416,6 @@ void QQuickDialog::reject() {
QQuickAbstractDialog::reject();
}
-// TODO after QTBUG-35019 is fixed: fix links to this module's enums
-// rather than linking to those in QMessageBox
-/*!
- \enum QQuickStandardButton::StandardButton
-
- This enum specifies a button with a standard label to be used on a dialog.
-*/
-
/*!
\qmlproperty StandardButtons Dialog::standardButtons
@@ -434,27 +426,61 @@ void QQuickDialog::reject() {
property. You can control which buttons are available by setting
standardButtons to a bitwise-or combination of the following flags:
- \table
- \row \li StandardButton.Ok \li An \gui OK button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Open \li An \gui Open button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Save \li A \gui Save button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Cancel \li A \gui Cancel button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Close \li A \gui Close button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Discard \li A \gui Discard or \gui {Don't Save} button, depending on the platform,
- defined with the \l {QMessageBox::DestructiveRole} {DestructiveRole}.
- \row \li StandardButton.Apply \li An \gui Apply button defined with the \l {QMessageBox::ApplyRole} {ApplyRole}.
- \row \li StandardButton.Reset \li A \gui Reset button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.RestoreDefaults \li A \gui {Restore Defaults} button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.Help \li A \gui Help button defined with the \l {QMessageBox::HelpRole} {HelpRole}.
- \row \li StandardButton.SaveAll \li A \gui {Save All} button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Yes \li A \gui Yes button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.YesToAll \li A \gui {Yes to All} button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.No \li A \gui No button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.NoToAll \li A \gui {No to All} button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.Abort \li An \gui Abort button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Retry \li A \gui Retry button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Ignore \li An \gui Ignore button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \endtable
+ \value StandardButton.Ok
+ An \gui OK button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Open
+ An \gui Open button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Save
+ A \gui Save button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Cancel
+ A \gui Cancel button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Close
+ A \gui Close button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Discard
+ A \gui Discard or \gui {Don't Save} button,
+ depending on the platform, defined with the
+ \l {QMessageBox::}{DestructiveRole}.
+ \value StandardButton.Apply
+ An \gui Apply button defined with the
+ \l {QMessageBox::}{ApplyRole}.
+ \value StandardButton.Reset
+ A \gui Reset button defined with the
+ \l {QMessageBox::}{ResetRole}.
+ \value StandardButton.RestoreDefaults
+ A \gui {Restore Defaults} button defined with the
+ \l {QMessageBox::}{ResetRole}.
+ \value StandardButton.Help
+ A \gui Help button defined with the
+ \l {QMessageBox::}{HelpRole}.
+ \value StandardButton.SaveAll
+ A \gui {Save All} button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Yes
+ A \gui Yes button defined with the
+ \l {QMessageBox::}{YesRole}.
+ \value StandardButton.YesToAll
+ A \gui {Yes to All} button defined with the
+ \l {QMessageBox::}{YesRole}.
+ \value StandardButton.No
+ A \gui No button defined with the
+ \l {QMessageBox::}{NoRole}.
+ \value StandardButton.NoToAll
+ A \gui {No to All} button defined with the
+ \l {QMessageBox::}{NoRole}.
+ \value StandardButton.Abort
+ An \gui Abort button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Retry
+ A \gui Retry button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Ignore
+ An \gui Ignore button defined with the
+ \l {QMessageBox::}{AcceptRole}.
For example the following dialog will show a calendar with the ability to
save or cancel a date:
diff --git a/src/dialogs/qquickplatformmessagedialog.cpp b/src/dialogs/qquickplatformmessagedialog.cpp
index 42c32dcf6..dcc766e16 100644
--- a/src/dialogs/qquickplatformmessagedialog.cpp
+++ b/src/dialogs/qquickplatformmessagedialog.cpp
@@ -305,12 +305,6 @@ QPlatformMessageDialogHelper *QQuickPlatformMessageDialog::helper()
*/
/*!
- \enum QQuickStandardIcon::Icon
-
- This enum specifies a standard icon to be used on a dialog.
-*/
-
-/*!
\qmlproperty QQuickStandardIcon::Icon MessageDialog::icon
The icon of the message box can be specified with one of these values:
@@ -318,23 +312,23 @@ QPlatformMessageDialogHelper *QQuickPlatformMessageDialog::helper()
\table
\row
\li no icon
- \li \l StandardIcon.NoIcon
+ \li \c StandardIcon.NoIcon
\li For an unadorned text alert.
\row
\li \inlineimage ../images/question.png "Question icon"
- \li \l StandardIcon.Question
+ \li \c StandardIcon.Question
\li For asking a question during normal operations.
\row
\li \image information.png
- \li \l StandardIcon.Information
+ \li \c StandardIcon.Information
\li For reporting information about normal operations.
\row
\li \image warning.png
- \li \l StandardIcon.Warning
+ \li \c StandardIcon.Warning
\li For reporting non-critical errors.
\row
\li \image critical.png
- \li \l StandardIcon.Critical
+ \li \c StandardIcon.Critical
\li For reporting critical errors.
\endtable
@@ -343,14 +337,6 @@ QPlatformMessageDialogHelper *QQuickPlatformMessageDialog::helper()
The enum values are the same as in \l QMessageBox::Icon.
*/
-// TODO after QTBUG-35019 is fixed: fix links to this module's enums
-// rather than linking to those in QMessageBox
-/*!
- \enum QQuickStandardButton::StandardButton
-
- This enum specifies a button with a standard label to be used on a dialog.
-*/
-
/*!
\qmlproperty StandardButtons MessageDialog::standardButtons
@@ -361,27 +347,61 @@ QPlatformMessageDialogHelper *QQuickPlatformMessageDialog::helper()
property. You can control which buttons are available by setting
standardButtons to a bitwise-or combination of the following flags:
- \table
- \row \li StandardButton.Ok \li An \gui OK button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Open \li An \gui Open button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Save \li A \gui Save button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Cancel \li A \gui Cancel button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Close \li A \gui Close button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Discard \li A \gui Discard or \gui {Don't Save} button, depending on the platform,
- defined with the \l {QMessageBox::DestructiveRole} {DestructiveRole}.
- \row \li StandardButton.Apply \li An \gui Apply button defined with the \l {QMessageBox::ApplyRole} {ApplyRole}.
- \row \li StandardButton.Reset \li A \gui Reset button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.RestoreDefaults \li A \gui {Restore Defaults} button defined with the \l {QMessageBox::ResetRole} {ResetRole}.
- \row \li StandardButton.Help \li A \gui Help button defined with the \l {QMessageBox::HelpRole} {HelpRole}.
- \row \li StandardButton.SaveAll \li A \gui {Save All} button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Yes \li A \gui Yes button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.YesToAll \li A \gui {Yes to All} button defined with the \l {QMessageBox::YesRole} {YesRole}.
- \row \li StandardButton.No \li A \gui No button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.NoToAll \li A \gui {No to All} button defined with the \l {QMessageBox::NoRole} {NoRole}.
- \row \li StandardButton.Abort \li An \gui Abort button defined with the \l {QMessageBox::RejectRole} {RejectRole}.
- \row \li StandardButton.Retry \li A \gui Retry button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \row \li StandardButton.Ignore \li An \gui Ignore button defined with the \l {QMessageBox::AcceptRole} {AcceptRole}.
- \endtable
+ \value StandardButton.Ok
+ An \gui OK button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Open
+ An \gui Open button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Save
+ A \gui Save button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Cancel
+ A \gui Cancel button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Close
+ A \gui Close button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Discard
+ A \gui Discard or \gui {Don't Save} button,
+ depending on the platform, defined with the
+ \l {QMessageBox::}{DestructiveRole}.
+ \value StandardButton.Apply
+ An \gui Apply button defined with the
+ \l {QMessageBox::}{ApplyRole}.
+ \value StandardButton.Reset
+ A \gui Reset button defined with the
+ \l {QMessageBox::}{ResetRole}.
+ \value StandardButton.RestoreDefaults
+ A \gui {Restore Defaults} button defined with the
+ \l {QMessageBox::}{ResetRole}.
+ \value StandardButton.Help
+ A \gui Help button defined with the
+ \l {QMessageBox::}{HelpRole}.
+ \value StandardButton.SaveAll
+ A \gui {Save All} button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Yes
+ A \gui Yes button defined with the
+ \l {QMessageBox::}{YesRole}.
+ \value StandardButton.YesToAll
+ A \gui {Yes to All} button defined with the
+ \l {QMessageBox::}{YesRole}.
+ \value StandardButton.No
+ A \gui No button defined with the
+ \l {QMessageBox::}{NoRole}.
+ \value StandardButton.NoToAll
+ A \gui {No to All} button defined with the
+ \l {QMessageBox::}{NoRole}.
+ \value StandardButton.Abort
+ An \gui Abort button defined with the
+ \l {QMessageBox::}{RejectRole}.
+ \value StandardButton.Retry
+ A \gui Retry button defined with the
+ \l {QMessageBox::}{AcceptRole}.
+ \value StandardButton.Ignore
+ An \gui Ignore button defined with the
+ \l {QMessageBox::}{AcceptRole}.
For example the following dialog will ask a question with 5 possible answers: