7#include <QtQuickTemplates2/private/qquickdialogbuttonbox_p_p.h>
22 emit q->buttonClicked(standardButton, role);
30 qmlAttachedPropertiesObject<QQuickMessageDialogImpl>(
q));
32 qmlWarning(
q) <<
"Expected MessageDialogImpl attached object to be present on" <<
this;
68 return d->options ?
d->options->text() :
QString();
74 return d->options ?
d->options->informativeText() :
QString();
80 return d->options ?
d->options->detailedText() :
QString();
86 return d->m_showDetailedText;
92 d->m_showDetailedText = !
d->m_showDetailedText;
104 if (!qobject_cast<QQuickMessageDialogImpl *>(
parent)) {
105 qmlWarning(
this) <<
"MessageDialogImpl attached properties should only be "
106 <<
"accessed through the root MessageDialogImpl instance";
119 if (
d->buttonBox == buttons)
124 qobject_cast<QQuickMessageDialogImpl *>(
parent());
125 if (messageDialogImpl) {
132 d->buttonBox = buttons;
136 qobject_cast<QQuickMessageDialogImpl *>(
parent());
137 if (messageDialogImpl) {
150 return d->detailedTextButton;
159 if (
d->detailedTextButton) {
161 qobject_cast<QQuickMessageDialogImpl *>(
parent());
162 if (messageDialogImpl)
169 if (
d->detailedTextButton) {
171 qobject_cast<QQuickMessageDialogImpl *>(
parent());
172 if (messageDialogImpl)
182#include "moc_qquickmessagedialogimpl_p.cpp"
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button)
Popup dialog with standard buttons and a title, used for short-term interaction with the user.
void detailedTextButtonChanged()
QQuickButton * detailedTextButton
void setButtonBox(QQuickDialogButtonBox *buttons)
QQuickDialogButtonBox * buttonBox
QQuickMessageDialogImplAttached(QObject *parent=nullptr)
void setDetailedTextButton(QQuickButton *detailedTextButton)
static QQuickMessageDialogImplPrivate * get(QQuickMessageDialogImpl *dialog)
QQuickMessageDialogImplAttached * attachedOrWarn()
void handleClick(QQuickAbstractButton *button) override
QQuickMessageDialogImplPrivate()
void setOptions(const QSharedPointer< QMessageDialogOptions > &options)
static QQuickMessageDialogImplAttached * qmlAttachedProperties(QObject *object)
QQuickMessageDialogImpl(QObject *parent=nullptr)
void toggleShowDetailedText()
QSharedPointer< QMessageDialogOptions > options() const
void showDetailedTextChanged()
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble q
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
myObject disconnect()
[26]