QtBase  v6.3.1
qgroupbox.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtWidgets module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #include "qgroupbox.h"
41 
42 #include "qapplication.h"
43 #include "qbitmap.h"
44 #include "qdrawutil.h"
45 #include "qevent.h"
46 #include "qlayout.h"
47 #if QT_CONFIG(radiobutton)
48 #include "qradiobutton.h"
49 #endif
50 #include "qstyle.h"
51 #include "qstyleoption.h"
52 #include "qstylepainter.h"
53 #ifndef QT_NO_ACCESSIBILITY
54 #include "qaccessible.h"
55 #endif
56 #include <private/qwidget_p.h>
57 
58 #include "qdebug.h"
59 
61 
63 {
64  Q_DECLARE_PUBLIC(QGroupBox)
65 
66 public:
67  void skip();
68  void init();
69  void calculateFrame();
71  int align;
72 #ifndef QT_NO_SHORTCUT
74 #endif
75 
76  void _q_fixFocus(Qt::FocusReason reason);
77  void _q_setChildrenEnabled(bool b);
78  void click();
79  bool flat;
80  bool checkable;
81  bool checked;
82  bool hover;
85 };
86 
95 {
96  if (!option)
97  return;
98 
99  Q_D(const QGroupBox);
100  option->initFrom(this);
101  option->text = d->title;
102  option->lineWidth = 1;
103  option->midLineWidth = 0;
104  option->textAlignment = Qt::Alignment(d->align);
105  option->activeSubControls |= d->pressedControl;
106  option->subControls = QStyle::SC_GroupBoxFrame;
107 
108  option->state.setFlag(QStyle::State_MouseOver, d->hover);
109  if (d->flat)
110  option->features |= QStyleOptionFrame::Flat;
111 
112  if (d->checkable) {
113  option->subControls |= QStyle::SC_GroupBoxCheckBox;
114  option->state |= (d->checked ? QStyle::State_On : QStyle::State_Off);
115  if ((d->pressedControl == QStyle::SC_GroupBoxCheckBox
116  || d->pressedControl == QStyle::SC_GroupBoxLabel) && (d->hover || d->overCheckBox))
117  option->state |= QStyle::State_Sunken;
118  }
119 
120  if (!option->palette.isBrushSet(isEnabled() ? QPalette::Active :
122  option->textColor = QColor(style()->styleHint(QStyle::SH_GroupBox_TextLabelColor,
123  option, this));
124 
125  if (!d->title.isEmpty())
126  option->subControls |= QStyle::SC_GroupBoxLabel;
127 }
128 
130 {
131  Q_Q(QGroupBox);
132 
133  QPointer<QGroupBox> guard(q);
134  q->setChecked(!checked);
135  if (!guard)
136  return;
137  emit q->clicked(checked);
138 }
139 
181  : QWidget(*new QGroupBoxPrivate, parent, { })
182 {
183  Q_D(QGroupBox);
184  d->init();
185 }
186 
192  : QGroupBox(parent)
193 {
194  setTitle(title);
195 }
196 
197 
202 {
203 }
204 
206 {
207  Q_Q(QGroupBox);
209 #ifndef QT_NO_SHORTCUT
210  shortcutId = 0;
211 #endif
212  flat = false;
213  checkable = false;
214  checked = true;
215  hover = false;
216  overCheckBox = false;
218  calculateFrame();
221 }
222 
224 {
225  Q_D(QGroupBox);
226  if (d->title == title) // no change
227  return;
228  d->title = title;
229 #ifndef QT_NO_SHORTCUT
230  releaseShortcut(d->shortcutId);
231  d->shortcutId = grabShortcut(QKeySequence::mnemonic(title));
232 #endif
233  d->calculateFrame();
234 
235  update();
236  updateGeometry();
237 #ifndef QT_NO_ACCESSIBILITY
240 #endif
241 }
242 
263 {
264  Q_D(const QGroupBox);
265  return d->title;
266 }
267 
287 {
288  Q_D(const QGroupBox);
289  return QFlag(d->align);
290 }
291 
293 {
294  Q_D(QGroupBox);
295  d->align = alignment;
296  updateGeometry();
297  update();
298 }
299 
303 {
305 }
306 
311 {
312  QStylePainter paint(this);
315  paint.drawComplexControl(QStyle::CC_GroupBox, option);
316 }
317 
320 {
321  Q_D(QGroupBox);
322 #ifndef QT_NO_SHORTCUT
323  if (e->type() == QEvent::Shortcut) {
324  QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
325  if (se->shortcutId() == d->shortcutId) {
326  if (!isCheckable()) {
327  d->_q_fixFocus(Qt::ShortcutFocusReason);
328  } else {
329  d->click();
331  }
332  return true;
333  }
334  }
335 #endif
338  switch (e->type()) {
339  case QEvent::HoverEnter:
340  case QEvent::HoverMove: {
342  static_cast<QHoverEvent *>(e)->position().toPoint(),
343  this);
344  bool oldHover = d->hover;
345  d->hover = d->checkable && (control == QStyle::SC_GroupBoxLabel || control == QStyle::SC_GroupBoxCheckBox);
346  if (oldHover != d->hover) {
349  update(rect);
350  }
351  return true;
352  }
353  case QEvent::HoverLeave:
354  d->hover = false;
355  if (d->checkable) {
358  update(rect);
359  }
360  return true;
361  case QEvent::KeyPress: {
362  QKeyEvent *k = static_cast<QKeyEvent*>(e);
363  if (!k->isAutoRepeat() && (k->key() == Qt::Key_Select || k->key() == Qt::Key_Space)) {
364  d->pressedControl = QStyle::SC_GroupBoxCheckBox;
365  update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
366  return true;
367  }
368  break;
369  }
370  case QEvent::KeyRelease: {
371  QKeyEvent *k = static_cast<QKeyEvent*>(e);
372  if (!k->isAutoRepeat() && (k->key() == Qt::Key_Select || k->key() == Qt::Key_Space)) {
373  bool toggle = (d->pressedControl == QStyle::SC_GroupBoxLabel
374  || d->pressedControl == QStyle::SC_GroupBoxCheckBox);
375  d->pressedControl = QStyle::SC_None;
376  if (toggle)
377  d->click();
378  return true;
379  }
380  break;
381  }
382  default:
383  break;
384  }
385  return QWidget::event(e);
386 }
387 
390 {
391  Q_D(QGroupBox);
392  /*
393  Children might have been enabled after being added to the group box, in which case
394  the childEvent handler ran too early, and we need to disabled children again.
395  */
396  if (!(c->added() || c->polished()) || !c->child()->isWidgetType())
397  return;
398  QWidget *w = static_cast<QWidget*>(c->child());
399  if (w->isWindow())
400  return;
401  if (d->checkable) {
402  if (d->checked) {
403  if (!w->testAttribute(Qt::WA_ForceDisabled))
404  w->setEnabled(true);
405  } else {
406  if (w->isEnabled()) {
407  w->setEnabled(false);
408  w->setAttribute(Qt::WA_ForceDisabled, false);
409  }
410  }
411  }
412 }
413 
414 
423 {
424  Q_Q(QGroupBox);
425  QWidget *fw = q->focusWidget();
426  if (!fw || fw == q) {
427  QWidget * best = nullptr;
428  QWidget * candidate = nullptr;
429  QWidget * w = q;
430  while ((w = w->nextInFocusChain()) != q) {
431  if (q->isAncestorOf(w) && (w->focusPolicy() & Qt::TabFocus) == Qt::TabFocus && w->isVisibleTo(q)) {
432 #if QT_CONFIG(radiobutton)
433  if (!best && qobject_cast<QRadioButton*>(w) && ((QRadioButton*)w)->isChecked())
434  // we prefer a checked radio button or a widget that
435  // already has focus, if there is one
436  best = w;
437  else
438 #endif
439  if (!candidate)
440  // but we'll accept anything that takes focus
441  candidate = w;
442  }
443  }
444  if (best)
445  fw = best;
446  else if (candidate)
447  fw = candidate;
448  }
449  if (fw)
450  fw->setFocus(reason);
451 }
452 
453 /*
454  Sets the right frame rect depending on the title.
455 */
457 {
458  Q_Q(QGroupBox);
460  q->initStyleOption(&box);
461  QRect contentsRect = q->style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxContents, q);
462  q->setContentsMargins(contentsRect.left() - box.rect.left(), contentsRect.top() - box.rect.top(),
463  box.rect.right() - contentsRect.right(), box.rect.bottom() - contentsRect.bottom());
465 }
466 
470 { // note no call to super
471  Q_D(QGroupBox);
472  if (focusPolicy() == Qt::NoFocus) {
473  d->_q_fixFocus(fe->reason());
474  } else {
476  }
477 }
478 
479 
484 {
485  Q_D(const QGroupBox);
488 
490 
491  int baseWidth = metrics.horizontalAdvance(d->title) + metrics.horizontalAdvance(QLatin1Char(' '));
492  int baseHeight = metrics.height();
493  if (d->checkable) {
496  baseHeight = qMax(baseHeight, style()->pixelMetric(QStyle::PM_IndicatorHeight, &option));
497  }
498 
499  QSize size = style()->sizeFromContents(QStyle::CT_GroupBox, &option, QSize(baseWidth, baseHeight), this);
501 }
502 
520 bool QGroupBox::isFlat() const
521 {
522  Q_D(const QGroupBox);
523  return d->flat;
524 }
525 
527 {
528  Q_D(QGroupBox);
529  if (d->flat == b)
530  return;
531  d->flat = b;
532  updateGeometry();
533  update();
534 }
535 
536 
553 void QGroupBox::setCheckable(bool checkable)
554 {
555  Q_D(QGroupBox);
556 
557  bool wasCheckable = d->checkable;
558  d->checkable = checkable;
559 
560  if (checkable) {
561  setChecked(true);
562  if (!wasCheckable) {
564  d->_q_setChildrenEnabled(true);
565  updateGeometry();
566  }
567  } else {
568  if (wasCheckable) {
570  d->_q_setChildrenEnabled(true);
571  updateGeometry();
572  }
573  d->_q_setChildrenEnabled(true);
574  }
575 
576  if (wasCheckable != checkable) {
577  d->calculateFrame();
578  update();
579  }
580 }
581 
583 {
584  Q_D(const QGroupBox);
585  return d->checkable;
586 }
587 
588 
590 {
591  Q_D(const QGroupBox);
592  return d->checkable && d->checked;
593 }
594 
595 
634 {
635  Q_D(QGroupBox);
636  if (d->checkable && b != d->checked) {
637  update();
638  d->checked = b;
639  d->_q_setChildrenEnabled(b);
640 #ifndef QT_NO_ACCESSIBILITY
642  st.checked = true;
643  QAccessibleStateChangeEvent e(this, st);
645 #endif
646  emit toggled(b);
647  }
648 }
649 
650 /*
651  sets all children of the group box except the qt_groupbox_checkbox
652  to either disabled/enabled
653 */
655 {
656  Q_Q(QGroupBox);
657  for (QObject *o : q->children()) {
658  if (o->isWidgetType()) {
659  QWidget *w = static_cast<QWidget *>(o);
660  if (b) {
661  if (!w->testAttribute(Qt::WA_ForceDisabled))
662  w->setEnabled(true);
663  } else {
664  if (w->isEnabled()) {
665  w->setEnabled(false);
666  w->setAttribute(Qt::WA_ForceDisabled, false);
667  }
668  }
669  }
670  }
671 }
672 
675 {
676  Q_D(QGroupBox);
677  if (ev->type() == QEvent::EnabledChange) {
678  if (d->checkable && isEnabled()) {
679  // we are being enabled - disable children
680  if (!d->checked)
681  d->_q_setChildrenEnabled(false);
682  }
683  } else if (ev->type() == QEvent::FontChange
684 #ifdef Q_OS_MAC
685  || ev->type() == QEvent::MacSizeChange
686 #endif
687  || ev->type() == QEvent::StyleChange) {
688  d->calculateFrame();
689  }
691 }
692 
695 {
696  if (event->button() != Qt::LeftButton) {
697  event->ignore();
698  return;
699  }
700 
701  Q_D(QGroupBox);
704  d->pressedControl = style()->hitTestComplexControl(QStyle::CC_GroupBox, &box,
705  event->position().toPoint(), this);
706  if (d->checkable && (d->pressedControl & (QStyle::SC_GroupBoxCheckBox | QStyle::SC_GroupBoxLabel))) {
707  d->overCheckBox = true;
708  update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
709  } else {
710  event->ignore();
711  }
712 }
713 
716 {
717  Q_D(QGroupBox);
721  event->position().toPoint(), this);
722  bool oldOverCheckBox = d->overCheckBox;
723  d->overCheckBox = (pressed == QStyle::SC_GroupBoxCheckBox || pressed == QStyle::SC_GroupBoxLabel);
724  if (d->checkable && (d->pressedControl == QStyle::SC_GroupBoxCheckBox || d->pressedControl == QStyle::SC_GroupBoxLabel)
725  && (d->overCheckBox != oldOverCheckBox))
726  update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
727 
728  event->ignore();
729 }
730 
733 {
734  if (event->button() != Qt::LeftButton) {
735  event->ignore();
736  return;
737  }
738 
739  Q_D(QGroupBox);
740  if (!d->overCheckBox) {
741  event->ignore();
742  return;
743  }
747  event->position().toPoint(), this);
748  bool toggle = d->checkable && (released == QStyle::SC_GroupBoxLabel
749  || released == QStyle::SC_GroupBoxCheckBox);
750  d->pressedControl = QStyle::SC_None;
751  d->overCheckBox = false;
752  if (toggle)
753  d->click();
754  else if (d->checkable)
755  update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
756 }
757 
759 
760 #include "moc_qgroupbox.cpp"
The QAccessibleEvent class is the base class for accessibility notifications.
Definition: qaccessible.h:680
static void updateAccessibility(QAccessibleEvent *event)
The QAccessibleStateChangeEvent notfies the accessibility framework that the state of an object has c...
Definition: qaccessible.h:738
The QChildEvent class contains event parameters for child object events.
Definition: qcoreevent.h:383
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
The QEvent class is the base class of all event classes. Event objects contain event parameters.
Definition: qcoreevent.h:58
@ EnabledChange
Definition: qcoreevent.h:147
@ StyleChange
Definition: qcoreevent.h:149
@ FontChange
Definition: qcoreevent.h:146
@ KeyRelease
Definition: qcoreevent.h:78
@ Shortcut
Definition: qcoreevent.h:170
@ KeyPress
Definition: qcoreevent.h:77
@ HoverLeave
Definition: qcoreevent.h:189
@ HoverEnter
Definition: qcoreevent.h:188
@ HoverMove
Definition: qcoreevent.h:190
@ MacSizeChange
Definition: qcoreevent.h:230
Type type() const
Definition: qcoreevent.h:307
The QFlag class is a helper data type for QFlags.
Definition: qflags.h:53
The QFocusEvent class contains event parameters for widget focus events. \inmodule QtGui.
Definition: qevent.h:520
Qt::FocusReason reason() const
Definition: qevent.cpp:1608
The QFontMetrics class provides font metrics information.
Definition: qfontmetrics.h:56
The QGroupBox widget provides a group box frame with a title.
Definition: qgroupbox.h:53
void paintEvent(QPaintEvent *event) override
Definition: qgroupbox.cpp:310
QString title
the group box title text
Definition: qgroupbox.h:56
virtual void initStyleOption(QStyleOptionGroupBox *option) const
Definition: qgroupbox.cpp:94
void mouseReleaseEvent(QMouseEvent *event) override
Definition: qgroupbox.cpp:732
QGroupBox(QWidget *parent=nullptr)
Definition: qgroupbox.cpp:180
bool isChecked() const
Definition: qgroupbox.cpp:589
void mousePressEvent(QMouseEvent *event) override
Definition: qgroupbox.cpp:694
void resizeEvent(QResizeEvent *event) override
Definition: qgroupbox.cpp:302
void toggled(bool)
bool event(QEvent *event) override
Definition: qgroupbox.cpp:319
void childEvent(QChildEvent *event) override
Definition: qgroupbox.cpp:389
bool isFlat() const
Definition: qgroupbox.cpp:520
bool checkable
whether the group box has a checkbox in its title
Definition: qgroupbox.h:59
void mouseMoveEvent(QMouseEvent *event) override
Definition: qgroupbox.cpp:715
bool isCheckable() const
Definition: qgroupbox.cpp:582
void setChecked(bool checked)
Definition: qgroupbox.cpp:633
void setCheckable(bool checkable)
Definition: qgroupbox.cpp:553
void changeEvent(QEvent *event) override
Definition: qgroupbox.cpp:674
void setAlignment(int alignment)
Definition: qgroupbox.cpp:292
Qt::Alignment alignment
the alignment of the group box title.
Definition: qgroupbox.h:57
void focusInEvent(QFocusEvent *event) override
Definition: qgroupbox.cpp:469
void setFlat(bool flat)
Definition: qgroupbox.cpp:526
QSize minimumSizeHint() const override
Definition: qgroupbox.cpp:483
void setTitle(const QString &title)
Definition: qgroupbox.cpp:223
void calculateFrame()
Definition: qgroupbox.cpp:456
QStyle::SubControl pressedControl
Definition: qgroupbox.cpp:84
void _q_setChildrenEnabled(bool b)
Definition: qgroupbox.cpp:654
void _q_fixFocus(Qt::FocusReason reason)
Definition: qgroupbox.cpp:422
The QHoverEvent class contains parameters that describe a mouse event.
Definition: qevent.h:281
The QKeyEvent class describes a key event.
Definition: qevent.h:471
bool isAutoRepeat() const
Definition: qevent.h:494
int key() const
Definition: qevent.h:484
static QKeySequence mnemonic(const QString &text)
The QMouseEvent class contains parameters that describe a mouse event.
Definition: qevent.h:231
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
The QPaintEvent class contains event parameters for paint events. \inmodule QtGui.
Definition: qevent.h:539
@ Active
Definition: qpalette.h:84
@ Disabled
Definition: qpalette.h:84
@ WindowText
Definition: qpalette.h:86
The QPointer class is a template class that provides guarded pointers to QObject.
Definition: qpointer.h:54
The QRadioButton widget provides a radio button with a text label.
Definition: qradiobutton.h:55
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:59
constexpr int bottom() const noexcept
Definition: qrect.h:209
constexpr int top() const noexcept
Definition: qrect.h:203
constexpr int left() const noexcept
Definition: qrect.h:200
constexpr int right() const noexcept
Definition: qrect.h:206
The QResizeEvent class contains event parameters for resize events. \inmodule QtGui.
Definition: qevent.h:612
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.
Definition: qsize.h:55
constexpr QSize expandedTo(const QSize &) const noexcept
Definition: qsize.h:219
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Definition: qsizepolicy.h:54
The QString class provides a Unicode character string.
Definition: qstring.h:388
@ State_MouseOver
Definition: qstyle.h:116
@ State_Sunken
Definition: qstyle.h:105
@ State_Off
Definition: qstyle.h:106
@ State_On
Definition: qstyle.h:108
@ CT_GroupBox
Definition: qstyle.h:601
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=nullptr) const =0
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const =0
@ SH_GroupBox_TextLabelColor
Definition: qstyle.h:651
virtual SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=nullptr) const =0
@ PM_IndicatorWidth
Definition: qstyle.h:498
@ PM_CheckBoxLabelSpacing
Definition: qstyle.h:536
@ PM_IndicatorHeight
Definition: qstyle.h:499
@ CC_GroupBox
Definition: qstyle.h:375
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
@ SE_GroupBoxLayoutItem
Definition: qstyle.h:337
SubControl
Definition: qstyle.h:383
@ SC_GroupBoxContents
Definition: qstyle.h:428
@ SC_GroupBoxCheckBox
Definition: qstyle.h:426
@ SC_GroupBoxLabel
Definition: qstyle.h:427
@ SC_None
Definition: qstyle.h:384
@ SC_GroupBoxFrame
Definition: qstyle.h:429
a bitwise OR of the features that describe this frame.
Definition: qstyleoption.h:649
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
Definition: qstylepainter.h:52
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
void releaseShortcut(int id)
Definition: qwidget.cpp:11643
void updateGeometry()
Definition: qwidget.cpp:10386
void setEnabled(bool)
Definition: qwidget.cpp:3368
QFontMetrics fontMetrics() const
Definition: qwidget.h:880
QWidget * focusWidget() const
Definition: qwidget.cpp:6810
virtual void focusInEvent(QFocusEvent *event)
Definition: qwidget.cpp:9566
void setFocusPolicy(Qt::FocusPolicy policy)
Definition: qwidget.cpp:7773
QSize minimumSizeHint
the recommended minimum size for the widget
Definition: qwidget.h:183
QRect rect
the internal geometry of the widget excluding any window frame
Definition: qwidget.h:150
void setFocus()
Definition: qwidget.h:454
bool isEnabled() const
Definition: qwidget.h:847
void update()
Definition: qwidget.cpp:10977
virtual void changeEvent(QEvent *)
Definition: qwidget.cpp:9283
bool event(QEvent *event) override
Definition: qwidget.cpp:8772
int grabShortcut(const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut)
Definition: qwidget.cpp:11619
QStyle * style() const
Definition: qwidget.cpp:2612
virtual void resizeEvent(QResizeEvent *event)
Definition: qwidget.cpp:9723
Qt::FocusPolicy focusPolicy
the way the widget accepts keyboard focus
Definition: qwidget.h:174
void setLayoutItemMargins(int left, int top, int right, int bottom)
Definition: qwidget.cpp:12120
QPainter paint
double e
uint alignment
union Alignment_ Alignment
QHighDpiScaling::Point position(T, QHighDpiScaling::Point::Kind)
@ AlignLeft
Definition: qnamespace.h:169
@ LeftButton
Definition: qnamespace.h:83
@ WA_ForceDisabled
Definition: qnamespace.h:324
@ NoFocus
Definition: qnamespace.h:132
@ TabFocus
Definition: qnamespace.h:133
@ StrongFocus
Definition: qnamespace.h:135
@ Key_Select
Definition: qnamespace.h:1036
@ Key_Space
Definition: qnamespace.h:538
FocusReason
Definition: qnamespace.h:1360
@ ShortcutFocusReason
Definition: qnamespace.h:1366
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 &reg2 endm macro vzip8 reg2 vzip d d &reg2 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
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLsizei const GLint * box
struct _cl_event * event
Definition: qopenglext.h:2998
const GLubyte * c
Definition: qopenglext.h:12701
GLdouble GLdouble GLdouble GLdouble q
Definition: qopenglext.h:259
GLuint GLenum option
Definition: qopenglext.h:5929
#define emit
Definition: qtmetamacros.h:85
QString title
[35]
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53
Definition: jquant2.c:237
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent