Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qquickabstractbutton_p_p.h>
Static Public Attributes | |
static const int | AUTO_REPEAT_DELAY = 300 |
static const int | AUTO_REPEAT_INTERVAL = 100 |
Static Public Attributes inherited from QQuickControlPrivate | |
static const ChangeTypes | ImplicitSizeChanges = QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight | QQuickItemPrivate::Destroyed |
Abstract base type providing functionality common to all controls. | |
Additional Inherited Members | |
Public Types inherited from QQuickControlPrivate | |
enum class | UnhideVisibility { Show , Hide } |
Public Types inherited from QQuickItemPrivate | |
enum | ChangeType { Geometry = 0x01 , SiblingOrder = 0x02 , Visibility = 0x04 , Opacity = 0x08 , Destroyed = 0x10 , Parent = 0x20 , Children = 0x40 , Rotation = 0x80 , ImplicitWidth = 0x100 , ImplicitHeight = 0x200 , Enabled = 0x400 , Focus = 0x800 , AllChanges = 0xFFFFFFFF } |
enum | ExtraDataTag { NoTag = 0x1 , LeftMouseButtonAccepted = 0x2 } |
enum | DirtyType { TransformOrigin = 0x00000001 , Transform = 0x00000002 , BasicTransform = 0x00000004 , Position = 0x00000008 , Size = 0x00000010 , ZValue = 0x00000020 , Content = 0x00000040 , Smooth = 0x00000080 , OpacityValue = 0x00000100 , ChildrenChanged = 0x00000200 , ChildrenStackingChanged = 0x00000400 , ParentChanged = 0x00000800 , Clip = 0x00001000 , Window = 0x00002000 , EffectReference = 0x00008000 , Visible = 0x00010000 , HideReference = 0x00020000 , Antialiasing = 0x00040000 , TransformUpdateMask , ComplexTransformUpdateMask = Transform | Window , ContentUpdateMask = Size | Content | Smooth | Window | Antialiasing , ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window } |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Protected Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickItem, QQuickItemPrivate > | |
void | setCurrentColorGroup () |
Definition at line 31 of file qquickabstractbutton_p_p.h.
|
virtual |
Reimplemented in QQuickFileDialogDelegatePrivate, and QQuickMenuItemPrivate.
Definition at line 231 of file qquickabstractbutton.cpp.
References QPlatformTheme::ButtonPressKeys, and QGuiApplicationPrivate::platformTheme().
Referenced by QQuickMenuItemPrivate::acceptKeyClick().
void QQuickAbstractButtonPrivate::actionTextChange | ( | ) |
Definition at line 326 of file qquickabstractbutton.cpp.
References QQuickAbstractButton::ButtonTextChange, and explicitText.
Referenced by QQuickAbstractButton::setAction().
void QQuickAbstractButtonPrivate::cancelIndicator | ( | ) |
Definition at line 392 of file qquickabstractbutton.cpp.
References indicatorName(), and quickCancelDeferred().
QPointF QQuickAbstractButtonPrivate::centerPressPoint | ( | ) | const |
Definition at line 109 of file qquickabstractbutton.cpp.
References qRound().
void QQuickAbstractButtonPrivate::click | ( | ) |
Definition at line 362 of file qquickabstractbutton.cpp.
References QQuickItemPrivate::effectiveEnable, and emit.
Referenced by QQuickAbstractButton::setAction().
Definition at line 398 of file qquickabstractbutton.cpp.
References indicator, indicatorName(), quickBeginDeferred(), quickCompleteDeferred(), and QQuickUntypedDeferredPointer::wasExecuted().
QQuickAbstractButton * QQuickAbstractButtonPrivate::findCheckedButton | ( | ) | const |
Definition at line 437 of file qquickabstractbutton.cpp.
References autoExclusive, button, checked, findExclusiveButtons(), and QAbstractButton::isChecked().
QList< QQuickAbstractButton * > QQuickAbstractButtonPrivate::findExclusiveButtons | ( | ) | const |
Definition at line 460 of file qquickabstractbutton.cpp.
References QAbstractButton::autoExclusive, button, child, QQuickItem::childItems(), QQuickItemPrivate::childItems, QList< T >::count(), get(), i, and QQuickItemPrivate::parentItem.
Referenced by findCheckedButton().
|
inlinestatic |
Definition at line 36 of file qquickabstractbutton_p_p.h.
References button.
Referenced by QQuickButtonGroup::addButton(), QQuickMaterialRipple::anchorPoint(), QQuickButtonGroupPrivate::clear(), findExclusiveButtons(), QQuickComboBoxPrivate::itemHovered(), QQuickMenuPrivate::onItemHovered(), and QQuickButtonGroup::removeButton().
|
overridevirtual |
Reimplemented from QQuickControlPrivate.
Reimplemented in QQuickSwitchPrivate, and QQuickSwitchDelegatePrivate.
Definition at line 150 of file qquickabstractbutton.cpp.
References autoRepeat, QQuickControlPrivate::handleMove(), holdTimer, keepPressed, pressed, pressPoint, setMovePoint(), stopPressAndHold(), stopPressRepeat(), and QGuiApplication::styleHints().
Referenced by QQuickSwitchPrivate::handleMove(), and QQuickSwitchDelegatePrivate::handleMove().
|
overridevirtual |
Reimplemented from QQuickControlPrivate.
Reimplemented in QQuickMenuBarItemPrivate.
Definition at line 132 of file qquickabstractbutton.cpp.
References autoRepeat, emit, QQuickControlPrivate::handlePress(), Qt::LeftButton, pressButtons, setPressPoint(), startPressAndHold(), startRepeatDelay(), stopPressAndHold(), and QQuickControlPrivate::touchId.
Referenced by QQuickMenuBarItemPrivate::handlePress().
|
overridevirtual |
Reimplemented from QQuickControlPrivate.
Reimplemented in QQuickMenuBarItemPrivate, QQuickSwitchPrivate, and QQuickSwitchDelegatePrivate.
Definition at line 164 of file qquickabstractbutton.cpp.
References autoRepeat, emit, QQuickControlPrivate::handleRelease(), isDoubleClickConnected(), keepPressed, lastTouchReleaseTimestamp, Qt::NoButton, pressButtons, pressed, qApp, setPressPoint(), stopPressAndHold(), stopPressRepeat(), QQuickControlPrivate::touchId, trigger(), wasDoubleClick, and wasHeld.
Referenced by QQuickMenuBarItemPrivate::handleRelease(), QQuickSwitchPrivate::handleRelease(), and QQuickSwitchDelegatePrivate::handleRelease().
|
overridevirtual |
Reimplemented from QQuickControlPrivate.
Definition at line 215 of file qquickabstractbutton.cpp.
References emit, QQuickControlPrivate::handleUngrab(), lastTouchReleaseTimestamp, Qt::NoButton, pressButtons, pressed, stopPressAndHold(), stopPressRepeat(), and wasDoubleClick.
QT_BEGIN_NAMESPACE void QQuickAbstractButtonPrivate::init | ( | ) |
Abstract base type providing functionality common to buttons.
\qmltype AbstractButton \inherits Control
! \instantiates QQuickAbstractButton \inqmlmodule QtQuick.Controls
AbstractButton provides the interface for controls with button-like behavior; for example, push buttons and checkable controls like radio buttons and check boxes. As an abstract control, it has no delegate implementations, leaving them to the types that derive from it.
\qmlsignal QtQuick.Controls::AbstractButton::pressed()
This signal is emitted when the button is interactively pressed by the user via touch, mouse, or keyboard.
\qmlsignal QtQuick.Controls::AbstractButton::released()
This signal is emitted when the button is interactively released by the user via touch, mouse, or keyboard.
\qmlsignal QtQuick.Controls::AbstractButton::canceled()
This signal is emitted when the button loses mouse grab while being pressed, or when it would emit the \l released signal but the mouse cursor is not inside the button.
\qmlsignal QtQuick.Controls::AbstractButton::clicked()
This signal is emitted when the button is interactively clicked by the user via touch, mouse, or keyboard.
This signal is emitted when a checkable button is interactively toggled by the user via touch, mouse, or keyboard.
\qmlsignal QtQuick.Controls::AbstractButton::pressAndHold()
This signal is emitted when the button is interactively pressed and held down by the user via touch or mouse. It is not emitted when \l autoRepeat is enabled.
\qmlsignal QtQuick.Controls::AbstractButton::doubleClicked()
This signal is emitted when the button is interactively double clicked by the user via touch or mouse.
Definition at line 90 of file qquickabstractbutton.cpp.
References Qt::ArrowCursor, QLayoutPolicy::Fixed, Qt::LeftButton, QLayoutPolicy::Preferred, QQuickItemPrivate::setSizePolicy(), Qt::StrongFocus, and Qt::TabFocus.
bool QQuickAbstractButtonPrivate::isDoubleClickConnected | ( | ) |
Definition at line 247 of file qquickabstractbutton.cpp.
References QQuickAbstractButton::doubleClicked(), QMetaMethod::fromSignal(), method, and signal.
Referenced by handleRelease().
bool QQuickAbstractButtonPrivate::isPressAndHoldConnected | ( | ) |
Definition at line 237 of file qquickabstractbutton.cpp.
References QMetaMethod::fromSignal(), method, QQuickAbstractButton::pressAndHold(), and signal.
Referenced by startPressAndHold().
|
overridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 426 of file qquickabstractbutton.cpp.
References emit, indicator, item, and QQuickControlPrivate::itemDestroyed().
|
overridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 418 of file qquickabstractbutton.cpp.
References emit, indicator, item, and QQuickControlPrivate::itemImplicitHeightChanged().
|
overridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 410 of file qquickabstractbutton.cpp.
References emit, indicator, item, and QQuickControlPrivate::itemImplicitWidthChanged().
Definition at line 120 of file qquickabstractbutton.cpp.
References emit, movePoint, qFuzzyCompare(), QPointF::x(), and QPointF::y().
Referenced by handleMove(), and setPressPoint().
Definition at line 114 of file qquickabstractbutton.cpp.
References pressPoint, and setMovePoint().
Referenced by QQuickSwipeDelegatePrivate::handleMousePressEvent(), handlePress(), and handleRelease().
Definition at line 335 of file qquickabstractbutton.cpp.
References QQuickAbstractButton::ButtonTextChange, explicitText, and text.
void QQuickAbstractButtonPrivate::startPressAndHold | ( | ) |
Definition at line 257 of file qquickabstractbutton.cpp.
References holdTimer, isPressAndHoldConnected(), stopPressAndHold(), QGuiApplication::styleHints(), and wasHeld.
Referenced by handlePress().
void QQuickAbstractButtonPrivate::startPressRepeat | ( | ) |
Definition at line 282 of file qquickabstractbutton.cpp.
References repeatInterval, repeatTimer, and stopPressRepeat().
void QQuickAbstractButtonPrivate::startRepeatDelay | ( | ) |
Definition at line 275 of file qquickabstractbutton.cpp.
References delayTimer, repeatDelay, and stopPressRepeat().
Referenced by handlePress().
void QQuickAbstractButtonPrivate::stopPressAndHold | ( | ) |
Definition at line 266 of file qquickabstractbutton.cpp.
References holdTimer.
Referenced by QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickSwipeDelegatePrivate::handleMouseReleaseEvent(), handleMove(), handlePress(), handleRelease(), handleUngrab(), and startPressAndHold().
void QQuickAbstractButtonPrivate::stopPressRepeat | ( | ) |
Definition at line 289 of file qquickabstractbutton.cpp.
References delayTimer, and repeatTimer.
Referenced by QQuickSwipeDelegatePrivate::handleMouseReleaseEvent(), handleMove(), handleRelease(), handleUngrab(), startPressRepeat(), and startRepeatDelay().
void QQuickAbstractButtonPrivate::toggle | ( | bool | value | ) |
Definition at line 383 of file qquickabstractbutton.cpp.
Definition at line 369 of file qquickabstractbutton.cpp.
References action, QQuickItemPrivate::effectiveEnable, emit, QQuickActionPrivate::get(), and QQuickAction::isEnabled().
Referenced by handleRelease().
void QQuickAbstractButtonPrivate::updateEffectiveIcon | ( | ) |
Definition at line 347 of file qquickabstractbutton.cpp.
References action, effectiveIcon, emit, icon, QQuickAction::icon, and QQuickIcon::resolve().
Referenced by QQuickAbstractButton::setAction().
QPointer<QQuickAction> QQuickAbstractButtonPrivate::action |
Definition at line 120 of file qquickabstractbutton_p_p.h.
Referenced by trigger(), and updateEffectiveIcon().
|
static |
Definition at line 87 of file qquickabstractbutton_p_p.h.
|
static |
Definition at line 88 of file qquickabstractbutton_p_p.h.
bool QQuickAbstractButtonPrivate::autoExclusive = false |
Definition at line 97 of file qquickabstractbutton_p_p.h.
Referenced by findCheckedButton().
bool QQuickAbstractButtonPrivate::autoRepeat = false |
Definition at line 98 of file qquickabstractbutton_p_p.h.
Referenced by handleMove(), handlePress(), and handleRelease().
bool QQuickAbstractButtonPrivate::checkable = false |
Definition at line 96 of file qquickabstractbutton_p_p.h.
bool QQuickAbstractButtonPrivate::checked = false |
Definition at line 95 of file qquickabstractbutton_p_p.h.
Referenced by findCheckedButton(), and toggle().
int QQuickAbstractButtonPrivate::delayTimer = 0 |
Definition at line 102 of file qquickabstractbutton_p_p.h.
Referenced by startRepeatDelay(), and stopPressRepeat().
QQuickAbstractButton::Display QQuickAbstractButtonPrivate::display = QQuickAbstractButton::TextBesideIcon |
Definition at line 117 of file qquickabstractbutton_p_p.h.
bool QQuickAbstractButtonPrivate::down = false |
Definition at line 91 of file qquickabstractbutton_p_p.h.
QQuickIcon QQuickAbstractButtonPrivate::effectiveIcon |
Definition at line 113 of file qquickabstractbutton_p_p.h.
Referenced by updateEffectiveIcon().
bool QQuickAbstractButtonPrivate::explicitDown = false |
Definition at line 92 of file qquickabstractbutton_p_p.h.
bool QQuickAbstractButtonPrivate::explicitText = false |
Definition at line 90 of file qquickabstractbutton_p_p.h.
Referenced by actionTextChange(), and setText().
QQuickButtonGroup* QQuickAbstractButtonPrivate::group = nullptr |
Definition at line 119 of file qquickabstractbutton_p_p.h.
int QQuickAbstractButtonPrivate::holdTimer = 0 |
Definition at line 101 of file qquickabstractbutton_p_p.h.
Referenced by QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), handleMove(), startPressAndHold(), and stopPressAndHold().
QQuickIcon QQuickAbstractButtonPrivate::icon |
Definition at line 112 of file qquickabstractbutton_p_p.h.
Referenced by updateEffectiveIcon().
QQuickDeferredPointer<QQuickItem> QQuickAbstractButtonPrivate::indicator |
Definition at line 118 of file qquickabstractbutton_p_p.h.
Referenced by executeIndicator(), itemDestroyed(), itemImplicitHeightChanged(), itemImplicitWidthChanged(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), QQuickTreeViewDelegatePrivate::updateIndicatorPointerHandlers(), and QQuickTreeViewDelegatePrivate::updateIndicatorVisibility().
bool QQuickAbstractButtonPrivate::keepPressed = false |
Definition at line 94 of file qquickabstractbutton_p_p.h.
Referenced by handleMove(), and handleRelease().
qreal QQuickAbstractButtonPrivate::lastTouchReleaseTimestamp = 0 |
Definition at line 110 of file qquickabstractbutton_p_p.h.
Referenced by handleRelease(), and handleUngrab().
QPointF QQuickAbstractButtonPrivate::movePoint |
Definition at line 115 of file qquickabstractbutton_p_p.h.
Referenced by QQuickSwitchPrivate::canDrag(), QQuickSwitchDelegatePrivate::canDrag(), and setMovePoint().
Qt::MouseButtons QQuickAbstractButtonPrivate::pressButtons = Qt::NoButton |
Definition at line 116 of file qquickabstractbutton_p_p.h.
Referenced by handlePress(), handleRelease(), and handleUngrab().
bool QQuickAbstractButtonPrivate::pressed = false |
Definition at line 93 of file qquickabstractbutton_p_p.h.
Referenced by QQuickSwipeDelegatePrivate::attachedObjectsSetPressed(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), handleMove(), handleRelease(), and handleUngrab().
QPointF QQuickAbstractButtonPrivate::pressPoint |
Definition at line 114 of file qquickabstractbutton_p_p.h.
Referenced by QQuickSwitchPrivate::canDrag(), QQuickSwitchDelegatePrivate::canDrag(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), handleMove(), and setPressPoint().
int QQuickAbstractButtonPrivate::repeatDelay = AUTO_REPEAT_DELAY |
Definition at line 104 of file qquickabstractbutton_p_p.h.
Referenced by startRepeatDelay().
int QQuickAbstractButtonPrivate::repeatInterval = AUTO_REPEAT_INTERVAL |
Definition at line 105 of file qquickabstractbutton_p_p.h.
Referenced by startPressRepeat().
int QQuickAbstractButtonPrivate::repeatTimer = 0 |
Definition at line 103 of file qquickabstractbutton_p_p.h.
Referenced by startPressRepeat(), and stopPressRepeat().
QString QQuickAbstractButtonPrivate::text |
Definition at line 111 of file qquickabstractbutton_p_p.h.
Referenced by setText().
bool QQuickAbstractButtonPrivate::wasDoubleClick = false |
Definition at line 100 of file qquickabstractbutton_p_p.h.
Referenced by handleRelease(), QQuickMenuBarItemPrivate::handleRelease(), and handleUngrab().
bool QQuickAbstractButtonPrivate::wasHeld = false |
Definition at line 99 of file qquickabstractbutton_p_p.h.
Referenced by handleRelease(), and startPressAndHold().