40 #include "private/qabstractbutton_p.h"
42 #if QT_CONFIG(itemviews)
45 #if QT_CONFIG(buttongroup)
47 #include "private/qapplication_p.h"
48 #include "private/qbuttongroup_p.h"
55 #ifndef QT_NO_ACCESSIBILITY
63 #define AUTO_REPEAT_DELAY 300
64 #define AUTO_REPEAT_INTERVAL 100
173 #ifndef QT_NO_SHORTCUT
188 #if QT_CONFIG(buttongroup)
190 return group->d_func()->buttonList;
197 auto isNoMemberOfMyAutoExclusiveGroup = [](
QAbstractButton *candidate) {
199 #if QT_CONFIG(buttongroup)
200 || candidate->group()
204 candidates.
removeIf(isNoMemberOfMyAutoExclusiveGroup);
211 #if QT_CONFIG(buttongroup)
213 return group->d_func()->checkedButton;
221 for (
int i = 0;
i < buttonList.
count(); ++
i) {
223 if (
b->d_func()->checked &&
b !=
q)
231 #if QT_CONFIG(buttongroup)
235 group->d_func()->checkedButton =
q;
236 if (
group->d_func()->exclusive && previous && previous !=
q)
242 b->setChecked(
false);
249 #if QT_CONFIG(buttongroup)
256 if (!fb || !buttonList.
contains(fb))
265 for (
int i = 0;
i < buttonList.
count(); ++
i) {
279 score = (
qAbs(
p.y() - goal.
y()) << 16) +
qAbs(
p.x() - goal.
x());
283 score = (
qAbs(
p.x() - goal.
x()) << 16) +
qAbs(
p.y() - goal.
y());
285 score = (1 << 30) + (
p.y() - goal.
y()) * (
p.y() - goal.
y()) + (
p.x() - goal.
x()) * (
p.x() - goal.
x());
288 if (score > bestScore && candidate)
293 if (
p.y() < goal.
y()) {
299 if (
p.y() > goal.
y()) {
305 if (
p.x() < goal.
x()) {
311 if (
p.x() > goal.
x()) {
321 #ifdef QT_KEYPAD_NAVIGATION
322 && !QApplicationPrivate::keypadNavigationEnabled()
340 #if QT_CONFIG(buttongroup)
348 for (
int i = 0;
i < buttonList.
count(); ++
i) {
350 if (!
b->isCheckable())
384 bool changeState =
true;
387 #if QT_CONFIG(buttongroup)
415 #if QT_CONFIG(buttongroup)
416 if (guard &&
group) {
429 #if QT_CONFIG(buttongroup)
430 if (guard &&
group) {
443 #if QT_CONFIG(buttongroup)
444 if (guard &&
group) {
457 #if QT_CONFIG(buttongroup)
458 if (guard &&
group) {
481 #if QT_CONFIG(buttongroup)
484 d->group->removeButton(
this);
521 #ifndef QT_NO_SHORTCUT
528 #ifndef QT_NO_ACCESSIBILITY
563 #ifndef QT_NO_SHORTCUT
572 if (
d->shortcutId != 0)
620 if (!
d->checkable ||
d->checked ==
checked) {
621 if (!
d->blockRefresh)
626 if (!
checked &&
d->queryCheckedButton() ==
this) {
628 #if QT_CONFIG(buttongroup)
629 if (
d->group ?
d->group->d_func()->exclusive :
d->autoExclusive)
632 d->group->d_func()->detectCheckedButton();
634 if (
d->autoExclusive)
642 if (!
d->blockRefresh)
652 #ifndef QT_NO_ACCESSIBILITY
682 if (
d->autoRepeat &&
d->down)
683 d->repeatTimer.start(
d->autoRepeatDelay,
this);
685 d->repeatTimer.stop();
714 if (
d->autoRepeat &&
d->down)
715 d->repeatTimer.start(
d->autoRepeatDelay,
this);
717 d->repeatTimer.stop();
723 return d->autoRepeat;
746 return d->autoRepeatDelay;
769 return d->autoRepeatInterval;
800 return d->autoExclusive;
803 #if QT_CONFIG(buttongroup)
841 if (!
d->animateTimer.isActive())
843 d->animateTimer.start(100,
this);
942 #if QT_CONFIG(wheelevent)
951 #ifndef QT_NO_SHORTCUT
955 if (
d->shortcutId != se->shortcutId())
957 if (!se->isAmbiguous()) {
958 if (!
d->animateTimer.isActive())
1010 d->repeatTimer.stop();
1028 if (
hitButton(
e->position().toPoint()) !=
d->down) {
1036 }
else if (!
hitButton(
e->position().toPoint())) {
1053 if (!
e->isAutoRepeat()) {
1065 #ifdef QT_KEYPAD_NAVIGATION
1066 if ((QApplicationPrivate::keypadNavigationEnabled()
1075 if (
d->autoExclusive
1080 || (pw && qobject_cast<QAbstractItemView *>(pw->
parentWidget()))
1087 d->moveFocus(
e->key());
1103 #ifndef QT_NO_SHORTCUT
1120 if (!
e->isAutoRepeat())
1121 d->repeatTimer.stop();
1126 if (!
e->isAutoRepeat() &&
d->down)
1139 if (
e->timerId() ==
d->repeatTimer.timerId()) {
1140 d->repeatTimer.start(
d->autoRepeatInterval,
this);
1151 }
else if (
e->timerId() ==
d->animateTimer.timerId()) {
1152 d->animateTimer.stop();
1161 #ifdef QT_KEYPAD_NAVIGATION
1162 if (!QApplicationPrivate::keypadNavigationEnabled())
1164 d->fixFocusPolicy();
1183 switch (
e->type()) {
1272 if (
d->iconSize.isValid())
1281 if (
d->iconSize ==
size)
1296 #include "moc_qabstractbutton.cpp"
small capitals from c petite p scientific i
[1]
The QAccessibleEvent class is the base class for accessibility notifications.
static void updateAccessibility(QAccessibleEvent *event)
The QAccessibleStateChangeEvent notfies the accessibility framework that the state of an object has c...
static QWidget * focusWidget()
The QEvent class is the base class of all event classes. Event objects contain event parameters.
The QFocusEvent class contains event parameters for widget focus events. \inmodule QtGui.
The QIcon class provides scalable icons in different modes and states.
The QKeyEvent class describes a key event.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
static QKeySequence mnemonic(const QString &text)
const_reference at(qsizetype i) const noexcept
qsizetype removeIf(Predicate pred)
qsizetype count() const noexcept
The QMouseEvent class contains parameters that describe a mouse event.
QList< T > findChildren(const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
The QPoint class defines a point in the plane using integer precision.
constexpr int x() const noexcept
constexpr int y() const noexcept
The QRect class defines a rectangle in the plane using integer precision.
constexpr int bottom() const noexcept
bool contains(const QRect &r, bool proper=false) const noexcept
constexpr int x() const noexcept
constexpr QRect translated(int dx, int dy) const noexcept
constexpr int y() const noexcept
constexpr QPoint center() const noexcept
constexpr int right() const noexcept
The QShortcutEvent class provides an event which is generated when the user presses a key combination...
The QSize class defines the size of a two-dimensional object using integer point precision.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QString class provides a Unicode character string.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
The QTimerEvent class contains parameters that describe a timer event.
@ NavigationModeKeypadDirectional
@ WA_WState_OwnSizePolicy
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
[3]
#define QT_CONFIG(feature)
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble q
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent