33 Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
34 Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL)
35 Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL)
36 Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL)
37 Q_PROPERTY(QPlatformDialogHelper::StandardButton defaultStandardButton READ defaultStandardButton WRITE setDefaultStandardButton NOTIFY defaultStandardButtonChanged REVISION(6, 13))
39 Q_PROPERTY(
int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION(2, 3))
40 QML_EXTENDED_NAMESPACE(QPlatformDialogHelper)
42 Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5))
43 Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5))
44 Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5))
45 Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5))
46 Q_PROPERTY(QQuickText::TextFormat titleFormat READ titleFormat WRITE setTitleFormat RESET resetTitleFormat NOTIFY titleFormatChanged REVISION(6, 13))
47 QML_NAMED_ELEMENT(Dialog)
48 QML_ADDED_IN_VERSION(2, 1)
51 explicit QQuickDialog(QObject *parent =
nullptr);
54 QString title()
const;
55 void setTitle(
const QString &title);
57 QQuickItem *header()
const;
58 void setHeader(QQuickItem *header);
60 QQuickItem *footer()
const;
61 void setFooter(QQuickItem *footer);
63 QPlatformDialogHelper::StandardButtons standardButtons()
const;
64 void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
65 Q_REVISION(2, 3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button)
const;
67 QPlatformDialogHelper::StandardButton defaultStandardButton()
const;
68 void setDefaultStandardButton(QPlatformDialogHelper::StandardButton button);
71 enum StandardCode { Rejected, Accepted };
75 void setResult(
int result);
78 qreal implicitHeaderWidth()
const;
79 qreal implicitHeaderHeight()
const;
81 qreal implicitFooterWidth()
const;
82 qreal implicitFooterHeight()
const;
84 QQuickText::TextFormat titleFormat()
const;
85 void setTitleFormat(QQuickText::TextFormat titleFormat);
86 void resetTitleFormat();
88 void setOpacity(qreal opacity) override;
91 virtual void accept();
92 virtual void reject();
93 virtual void done(
int result);
100 void footerChanged();
101 void standardButtonsChanged();
103 Q_REVISION(2, 3)
void applied();
104 Q_REVISION(2, 3)
void reset();
105 Q_REVISION(2, 3)
void discarded();
106 Q_REVISION(2, 3)
void helpRequested();
107 Q_REVISION(2, 3)
void resultChanged();
109 void implicitHeaderWidthChanged();
110 void implicitHeaderHeightChanged();
111 void implicitFooterWidthChanged();
112 void implicitFooterHeightChanged();
113 Q_REVISION(6, 13)
void defaultStandardButtonChanged();
114 Q_REVISION(6, 13)
void titleFormatChanged();
117 QQuickDialog(QQuickDialogPrivate &dd, QObject *parent);
119 void keyPressEvent(QKeyEvent *event) override;
120 virtual void itemChange(QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData &data) override;
122#if QT_CONFIG(accessibility)
123 QAccessible::Role accessibleRole()
const override;
124 void accessibilityActiveChanged(
bool active) override;
128 Q_DISABLE_COPY(QQuickDialog)
129 Q_DECLARE_PRIVATE(QQuickDialog)