37 Q_DECLARE_PUBLIC(QQuickAbstractButton)
39 static QQuickAbstractButtonPrivate *get(QQuickAbstractButton *button)
41 return button->d_func();
44 QPointF centerPressPoint()
const;
45 void setPressPoint(
const QPointF &point);
46 void setMovePoint(
const QPointF &point);
48 bool handlePress(
const QPointF &point, ulong timestamp) override;
49 bool handleMove(
const QPointF &point, ulong timestamp) override;
50 bool handleRelease(
const QPointF &point, ulong timestamp) override;
51 void handleUngrab() override;
53 virtual bool acceptKeyClick(Qt::Key key)
const;
54 virtual void accessiblePressAction();
56 bool isPressAndHoldConnected();
57 bool isDoubleClickConnected();
58 void startPressAndHold();
59 void stopPressAndHold();
61 void startRepeatDelay();
62 void startPressRepeat();
63 void stopPressRepeat();
65#if QT_CONFIG(shortcut)
67 void ungrabShortcut();
70 QQuickAbstractButton *findCheckedButton()
const;
71 QList<QQuickAbstractButton *> findExclusiveButtons()
const;
73 void actionTextChange();
74 void setText(
const QString &text, QQml::PropertyUtils::State propertyState);
77 void updateEffectiveIcon();
80 void trigger(
bool doubleClick =
false);
81 void toggle(
bool value);
83 void cancelIndicator();
84 void executeIndicator(
bool complete =
false);
86 void itemImplicitWidthChanged(QQuickItem *item) override;
87 void itemImplicitHeightChanged(QQuickItem *item) override;
88 void itemDestroyed(QQuickItem *item) override;
91 static const int AUTO_REPEAT_DELAY = 300;
92 static const int AUTO_REPEAT_INTERVAL = 100;
94 bool explicitText =
false;
96 bool explicitDown =
false;
98 bool keepPressed =
false;
100 bool checkable =
false;
101 bool autoExclusive =
false;
102 bool autoRepeat =
false;
103 bool wasHeld =
false;
104 bool wasDoubleClick =
false;
108 int repeatDelay = AUTO_REPEAT_DELAY;
109 int repeatInterval = AUTO_REPEAT_INTERVAL;
110 int animateTimer = 0;
111#if QT_CONFIG(shortcut)
113 QKeySequence shortcut;
115 qreal lastTouchReleaseTimestamp = 0;
118 QQuickIcon effectiveIcon;
121 Qt::MouseButtons pressButtons = Qt::NoButton;
122 QQuickAbstractButton::Display display = QQuickAbstractButton::TextBesideIcon;
123 QQuickDeferredPointer<QQuickItem> indicator;
124 QQuickButtonGroup *group =
nullptr;
125 QPointer<QQuickAction> action;