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();
55 virtual void accessibleToggleAction();
57 bool isPressAndHoldConnected();
58 bool isDoubleClickConnected();
59 void startPressAndHold();
60 void stopPressAndHold();
62 void startRepeatDelay();
63 void startPressRepeat();
64 void stopPressRepeat();
66#if QT_CONFIG(shortcut)
68 void ungrabShortcut();
71 QQuickAbstractButton *findCheckedButton()
const;
72 QList<QQuickAbstractButton *> findExclusiveButtons()
const;
74 void actionTextChange();
75 void setText(
const QString &text, QQml::PropertyUtils::State propertyState);
78 void updateEffectiveIcon();
81 void trigger(
bool doubleClick =
false);
82 void toggle(
bool value);
84 void cancelIndicator();
85 void executeIndicator(
bool complete =
false);
87 void itemImplicitWidthChanged(QQuickItem *item) override;
88 void itemImplicitHeightChanged(QQuickItem *item) override;
89 void itemDestroyed(QQuickItem *item) override;
92 static const int AUTO_REPEAT_DELAY = 300;
93 static const int AUTO_REPEAT_INTERVAL = 100;
95 bool explicitText =
false;
97 bool explicitDown =
false;
99 bool keepPressed =
false;
100 bool checked =
false;
101 bool checkable =
false;
102 bool autoExclusive =
false;
103 bool autoRepeat =
false;
104 bool wasHeld =
false;
105 bool wasDoubleClick =
false;
109 int repeatDelay = AUTO_REPEAT_DELAY;
110 int repeatInterval = AUTO_REPEAT_INTERVAL;
111 int animateTimer = 0;
112#if QT_CONFIG(shortcut)
114 QKeySequence shortcut;
116 qreal lastTouchReleaseTimestamp = 0;
119 QQuickIcon effectiveIcon;
122 Qt::MouseButtons pressButtons = Qt::NoButton;
123 QQuickAbstractButton::Display display = QQuickAbstractButton::TextBesideIcon;
124 QQuickDeferredPointer<QQuickItem> indicator;
125 QQuickButtonGroup *group =
nullptr;
126 QPointer<QQuickAction> action;