10#include <QtCore/qpointer.h>
11#include <QtGui/private/qguiapplication_p.h>
12#include <QtGui/qpa/qplatformtheme.h>
13#include <QtQml/qqmlengine.h>
14#include <QtQml/qqmlcontext.h>
15#include <QtQml/qqmlcomponent.h>
210 QRectF geometry =
q->boundingRect().
adjusted(
q->leftPadding(),
q->topPadding(), -
q->rightPadding(), -
q->bottomPadding());
236 if (!
p->widthValid()) {
238 item->setWidth(itemWidth);
245 p->widthValidFlag =
false;
251 struct ButtonLayout {
263 const int *l = m_layout;
267 if (role == firstRole)
269 if (role == secondRole)
275 if (firstRole == secondRole)
285 for (
int i = 0;
i < buttons.
size() - 1; ++
i)
286 q->insertItem(
i, buttons.
at(
i));
297 qreal totalWidth = totalSpacing;
302 totalWidth +=
item->implicitWidth();
303 maxWidth =
qMax(maxWidth,
item->implicitWidth());
307 totalWidth =
qMax(totalWidth,
count * maxWidth + totalSpacing);
322 maxHeight =
qMax(maxHeight,
item->implicitHeight());
365 emit q->helpRequested();
384 if (!creationContext)
406 int i =
q->count() - 1;
411 qmlAttachedPropertiesObject<QQuickDialogButtonBox>(
button,
false));
427 int i =
q->count() - 1;
432 qmlAttachedPropertiesObject<QQuickDialogButtonBox>(
button,
true));
584 return d->standardButtons;
590 if (
d->standardButtons == buttons)
593 d->removeStandardButtons();
607 d->standardButtons = buttons;
680 return d->buttonLayout;
692 emit buttonLayoutChanged();
741 return qobject_cast<QQuickAbstractButton *>(
item);
752 d->updateImplicitContentSize();
765 d->updateImplicitContentSize();
770#if QT_CONFIG(accessibility)
771QAccessible::Role QQuickDialogButtonBox::accessibleRole()
const
773 return QAccessible::PageTabList;
784 emit q->buttonBoxChanged();
792 while (parentItem && !
d->buttonBox) {
793 d->buttonBox = qobject_cast<QQuickDialogButtonBox *>(parentItem);
833 return d->buttonRole;
839 if (
d->buttonRole == role)
842 d->buttonRole = role;
848#include "moc_qquickdialogbuttonbox_p.cpp"
static Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
static QPlatformTheme * platformTheme()
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
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.
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
void deleteLater()
\threadsafe
The QQmlComponent class encapsulates a QML component definition.
virtual QObject * beginCreate(QQmlContext *)
Create an object instance from this component, within the specified context.
virtual void completeCreate()
This method provides advanced control over component instance creation.
QQmlContext * creationContext() const
Returns the QQmlContext the component was created in.
The QQmlContext class defines a context within a QML engine.
int count() const override
\qmlproperty int QtQml.Models::ObjectModel::count
QQuickItem * itemAt(int index) const
QQmlObjectModel * contentModel
Q_INVOKABLE void addItem(QQuickItem *item)
\qmlmethod void QtQuick.Controls::Container::addItem(Item item)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override
QQuickDeferredPointer< QQuickItem > contentItem
void updateImplicitContentWidth()
void updateImplicitContentHeight()
static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button)
Popup dialog with standard buttons and a title, used for short-term interaction with the user.
virtual void itemImplicitWidthChanged(QQuickItem *)
virtual void itemImplicitHeightChanged(QQuickItem *)
void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types)
void addItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setSize(const QSizeF &size)
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
QQuickItem * parentItem() const
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
virtual void updatePolish()
This function should perform any layout as required for this item.
void setPosition(const QPointF &)
void polish()
Schedules a polish event for this item.
\inmodule QtCore\reentrant
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr qreal width() const noexcept
Returns the width.
constexpr qreal height() const noexcept
Returns the height.
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QStyleOptionButton * btn
[3]
Combined button and popup list for selecting options.
constexpr const T & qMax(const T &a, const T &b)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLsizei const GLint * box
GLfloat GLfloat GLfloat GLfloat h
GLdouble GLdouble GLdouble GLdouble q
QQmlContext * qmlContext(const QObject *obj)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QRectF alignedRect(bool mirrored, Qt::Alignment alignment, const QSizeF &size, const QRectF &rectangle)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
static const struct TessellationWindingOrderTab cw[]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent