13#include <QtGui/qstylehints.h>
14#include <QtGui/qguiapplication.h>
15#if QT_CONFIG(shortcut)
16# include <QtGui/private/qshortcutmap_p.h>
18#include <QtGui/private/qguiapplication_p.h>
19#include <QtGui/qpa/qplatformtheme.h>
20#include <QtQuick/private/qquickevents_p_p.h>
21#include <QtQml/qqmllist.h>
108 emit q->pressXChanged();
110 emit q->pressYChanged();
149 const int pressTouchId =
touchId;
154 q->setPressed(
false);
177 if (!touchDoubleClick) {
180 if (pressTouchId != -1) {
204 q->setPressed(
false);
225 return q->isSignalConnected(
method);
235 return q->isSignalConnected(
method);
283#if QT_CONFIG(shortcut)
284void QQuickAbstractButtonPrivate::grabShortcut()
296void QQuickAbstractButtonPrivate::ungrabShortcut()
322 if (oldText ==
q->text())
340 emit q->iconChanged();
360 emit q->doubleClicked();
367 const bool wasChecked =
checked;
396 emit q->implicitIndicatorWidthChanged();
404 emit q->implicitIndicatorHeightChanged();
413 emit q->implicitIndicatorWidthChanged();
414 emit q->implicitIndicatorHeightChanged();
422 return group->checkedButton();
446 int count = groupButtons.
count(&groupButtons);
473#if QT_CONFIG(quicktemplates2_multitouch)
491#if QT_CONFIG(quicktemplates2_multitouch)
502 d->removeImplicitSizeListener(
d->indicator);
504 auto *attached = qobject_cast<QQuickButtonGroupAttached *>(
505 qmlAttachedPropertiesObject<QQuickButtonGroup>(
this,
false));
507 attached->setGroup(
nullptr);
509 d->group->removeButton(
this);
511#if QT_CONFIG(shortcut)
529 return d->explicitText || !
d->action ?
d->text :
d->action->text();
535 d->setText(
text,
true);
563 d->explicitDown =
true;
575 if (!
d->explicitDown)
579 d->explicitDown =
false;
608 if (!
d->explicitDown) {
610 d->explicitDown =
false;
695 return d->autoExclusive;
701 if (
d->autoExclusive == exclusive)
704 d->autoExclusive = exclusive;
725 return d->autoRepeat;
731 if (
d->autoRepeat == repeat)
734 d->stopPressRepeat();
735 d->autoRepeat = repeat;
748 d->executeIndicator();
760 if (!
d->indicator.isExecuting())
761 d->cancelIndicator();
766 d->removeImplicitSizeListener(
d->indicator);
778 emit implicitIndicatorWidthChanged();
780 emit implicitIndicatorHeightChanged();
781 if (!
d->indicator.isExecuting())
803 return d->effectiveIcon;
810 d->icon.ensureRelativeSourceResolved(
this);
811 d->updateEffectiveIcon();
844 emit displayChanged();
897 if (oldText !=
text())
900 d->updateEffectiveIcon();
902 emit actionChanged();
917 return d->repeatDelay;
923 if (
d->repeatDelay == delay)
926 d->repeatDelay = delay;
927 emit autoRepeatDelayChanged();
942 return d->repeatInterval;
948 if (
d->repeatInterval == interval)
951 d->repeatInterval = interval;
952 emit autoRepeatIntervalChanged();
955#if QT_CONFIG(shortcut)
989 return d->movePoint.x();
1006 return d->movePoint.y();
1028 return d->indicator->implicitWidth();
1050 return d->indicator->implicitHeight();
1067 d->executeIndicator(
true);
1073#if QT_CONFIG(shortcut)
1077 if (se->shortcutId() ==
d->shortcutId) {
1090 if (
d->touchId == -1)
1098 if (
d->acceptKeyClick(
static_cast<Qt::Key>(
event->key()))) {
1099 d->setPressPoint(
d->centerPressPoint());
1103 d->startRepeatDelay();
1114 if (
d->pressed &&
d->acceptKeyClick(
static_cast<Qt::Key>(
event->key()))) {
1122 d->stopPressRepeat();
1130 d->pressButtons =
event->buttons();
1138 if (
d->isDoubleClickConnected()) {
1141 d->wasDoubleClick =
true;
1149 if (
event->timerId() ==
d->holdTimer) {
1150 d->stopPressAndHold();
1153 }
else if (
event->timerId() ==
d->delayTimer) {
1154 d->startPressRepeat();
1155 }
else if (
event->timerId() ==
d->repeatTimer) {
1165#if QT_CONFIG(shortcut)
1168 if (
value.boolValue)
1171 d->ungrabShortcut();
1190#if QT_CONFIG(shortcut)
1208 if (
d->findCheckedButton() ==
this)
1213 if (
group->checkedAction() ==
d->action)
1218 d->toggle(!
d->checked);
1221#if QT_CONFIG(accessibility)
1222void QQuickAbstractButton::accessibilityActiveChanged(
bool active)
1224 QQuickControl::accessibilityActiveChanged(active);
1235QAccessible::Role QQuickAbstractButton::accessibleRole()
const
1239 return QAccessible::CheckBox;
1241 return QAccessible::Button;
1244void QQuickAbstractButton::accessiblePressAction()
1253#include "moc_qquickabstractbutton_p.cpp"
The QFocusEvent class contains event parameters for widget focus events.
static QGuiApplicationPrivate * instance()
static QPlatformTheme * platformTheme()
static QStyleHints * styleHints()
Returns the application's style hints.
The QKeyEvent class describes a key event.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
static QKeySequence mnemonic(const QString &text)
Returns the shortcut key sequence for the mnemonic in text, or an empty key sequence if no mnemonics ...
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)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
void trigger(QObject *, bool doToggle)
void registerItem(QQuickItem *item)
static QQuickActionPrivate * get(QQuickAction *action)
QQuickActionGroup * group
void unregisterItem(QQuickItem *item)
bool isCheckable() const
\qmlproperty bool QtQuick.Controls::Action::checkable
void triggered(QObject *source=nullptr)
void checkedChanged(bool checked)
void checkableChanged(bool checkable)
void enabledChanged(bool enabled)
void textChanged(const QString &text)
void iconChanged(const QQuickIcon &icon)
bool isEnabled() const
\qmlproperty bool QtQuick.Controls::Action::enabled
bool isChecked() const
\qmlproperty bool QtQuick.Controls::Action::checked
void itemImplicitWidthChanged(QQuickItem *item) override
virtual bool handlePress(const QPointF &point, ulong timestamp)
static void hideOldItem(QQuickItem *item)
virtual void handleUngrab()
virtual bool handleRelease(const QPointF &point, ulong timestamp)
static void warnIfCustomizationNotSupported(QObject *control, QQuickItem *item, const QString &propertyName)
void itemDestroyed(QQuickItem *item) override
virtual bool handleMove(const QPointF &point, ulong timestamp)
void itemImplicitHeightChanged(QQuickItem *item) override
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void maybeSetAccessibleName(const QString &name)
void setFocusPolicy(Qt::FocusPolicy policy)
void itemChange(ItemChange change, const ItemChangeData &value) override
Called when change occurs for this item.
void mousePressEvent(QMouseEvent *event) override
This event handler can be reimplemented in a subclass to receive mouse press events for an item.
bool setAccessibleProperty(const char *propertyName, const QVariant &value)
void focusOutEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive focus-out events for an item.
QQuickIcon resolve(const QQuickIcon &other) const
QList< QQuickItem * > childItems
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QList< QQuickItem * > childItems() const
Returns the children of this item.
virtual void keyPressEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key press events for an item.
void setParentItem(QQuickItem *parent)
void setAcceptTouchEvents(bool accept)
If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accept...
void setAcceptedMouseButtons(Qt::MouseButtons buttons)
Sets the mouse buttons accepted by this item to buttons.
QQuickItem * parentItem() const
virtual void keyReleaseEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key release events for an item.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
void setActiveFocusOnTab(bool)
The QShortcutEvent class provides an event which is generated when the user presses a key combination...
\macro QT_RESTRICTED_CAST_FROM_ASCII
struct wl_display * display
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
int qRound(qfloat16 d) noexcept
GLint GLsizei GLsizei height
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLdouble GLdouble GLdouble GLdouble q
void quickCancelDeferred(QObject *object, const QString &property)
void quickCompleteDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)
void quickBeginDeferred(QObject *object, const QString &property, QQuickDeferredPointer< T > &delegate)
#define QStringLiteral(str)
static QString indicatorName()
myObject disconnect()
[26]
item setCursor(Qt::IBeamCursor)
[1]
bool contains(const AT &t) const noexcept
static bool matcher(QObject *object, Qt::ShortcutContext context)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent