QtBase  v6.3.1
qtooltip.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 <QtWidgets/private/qtwidgetsglobal_p.h>
41 
42 #include <qapplication.h>
43 #include <qevent.h>
44 #include <qpointer.h>
45 #include <qstyle.h>
46 #include <qstyleoption.h>
47 #include <qstylepainter.h>
48 #include <qtimer.h>
49 #if QT_CONFIG(effects)
50 #include <private/qeffects_p.h>
51 #endif
52 #include <qtextdocument.h>
53 #include <qdebug.h>
54 #include <qpa/qplatformscreen.h>
55 #include <qpa/qplatformcursor.h>
56 #include <private/qstylesheetstyle_p.h>
57 
58 #include <qlabel.h>
59 #include <QtWidgets/private/qlabel_p.h>
60 #include <QtGui/private/qhighdpiscaling_p.h>
61 #include <qtooltip.h>
62 
64 
115 class QTipLabel : public QLabel
116 {
117  Q_OBJECT
118 public:
119  QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime);
120  ~QTipLabel();
122 
124  void updateSize(const QPoint &pos);
125 
126  bool eventFilter(QObject *, QEvent *) override;
127 
129 
130  bool fadingOut;
131 
132  void reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos);
133  void hideTip();
134  void hideTipImmediately();
135  void setTipRect(QWidget *w, const QRect &r);
136  void restartExpireTimer(int msecDisplayTime);
137  bool tipChanged(const QPoint &pos, const QString &text, QObject *o);
138  void placeTip(const QPoint &pos, QWidget *w);
139 
140  static QScreen *getTipScreen(const QPoint &pos, QWidget *w);
141 protected:
142  void timerEvent(QTimerEvent *e) override;
143  void paintEvent(QPaintEvent *e) override;
144  void mouseMoveEvent(QMouseEvent *e) override;
145  void resizeEvent(QResizeEvent *e) override;
146 
147 #ifndef QT_NO_STYLE_STYLESHEET
148 public slots:
153  setProperty("_q_stylesheet_parent", QVariant());
154  styleSheetParent = nullptr;
155  }
156 
157 private:
158  QWidget *styleSheetParent;
159 #endif
160 
161 private:
162  QWidget *widget;
163  QRect rect;
164 };
165 
166 QTipLabel *QTipLabel::instance = nullptr;
167 
168 QTipLabel::QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime)
170 #ifndef QT_NO_STYLE_STYLESHEET
171  , styleSheetParent(nullptr)
172 #endif
173  , widget(nullptr)
174 {
175  delete instance;
176  instance = this;
180  ensurePolished();
181  setMargin(1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this));
184  setIndent(1);
185  qApp->installEventFilter(this);
186  setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0);
187  setMouseTracking(true);
188  fadingOut = false;
189  reuseTip(text, msecDisplayTime, pos);
190 }
191 
192 void QTipLabel::restartExpireTimer(int msecDisplayTime)
193 {
194  int time = 10000 + 40 * qMax(0, text().length()-100);
195  if (msecDisplayTime > 0)
196  time = msecDisplayTime;
197  expireTimer.start(time, this);
198  hideTimer.stop();
199 }
200 
201 void QTipLabel::reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos)
202 {
203 #ifndef QT_NO_STYLE_STYLESHEET
204  if (styleSheetParent){
205  disconnect(styleSheetParent, SIGNAL(destroyed()),
207  styleSheetParent = nullptr;
208  }
209 #endif
210 
211  setText(text);
212  updateSize(pos);
213  restartExpireTimer(msecDisplayTime);
214 }
215 
217 {
218  d_func()->setScreenForPoint(pos);
219  // Ensure that we get correct sizeHints by placing this window on the right screen.
220  QFontMetrics fm(font());
221  QSize extra(1, 0);
222  // Make it look good with the default ToolTip font on Mac, which has a small descent.
223  if (fm.descent() == 2 && fm.ascent() >= 11)
224  ++extra.rheight();
226  QSize sh = sizeHint();
227  const QScreen *screen = getTipScreen(pos, this);
228  if (!wordWrap() && sh.width() > screen->geometry().width()) {
229  setWordWrap(true);
230  sh = sizeHint();
231  }
232  resize(sh + extra);
233 }
234 
236 {
237  QStylePainter p(this);
239  opt.initFrom(this);
240  p.drawPrimitive(QStyle::PE_PanelTipLabel, opt);
241  p.end();
242 
243  QLabel::paintEvent(ev);
244 }
245 
247 {
248  QStyleHintReturnMask frameMask;
250  option.initFrom(this);
251  if (style()->styleHint(QStyle::SH_ToolTip_Mask, &option, this, &frameMask))
252  setMask(frameMask.region);
253 
255 }
256 
258 {
259  if (!rect.isNull()) {
260  QPoint pos = e->globalPosition().toPoint();
261  if (widget)
262  pos = widget->mapFromGlobal(pos);
263  if (!rect.contains(pos))
264  hideTip();
265  }
267 }
268 
270 {
271  instance = nullptr;
272 }
273 
275 {
276  if (!hideTimer.isActive())
277  hideTimer.start(300, this);
278 }
279 
281 {
282  close(); // to trigger QEvent::Close which stops the animation
283  deleteLater();
284 }
285 
287 {
288  if (Q_UNLIKELY(!r.isNull() && !w)) {
289  qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
290  return;
291  }
292  widget = w;
293  rect = r;
294 }
295 
297 {
298  if (e->timerId() == hideTimer.timerId()
299  || e->timerId() == expireTimer.timerId()){
300  hideTimer.stop();
301  expireTimer.stop();
303  }
304 }
305 
307 {
308  switch (e->type()) {
309 #ifdef Q_OS_MACOS
310  case QEvent::KeyPress:
311  case QEvent::KeyRelease: {
312  const int key = static_cast<QKeyEvent *>(e)->key();
313  // Anything except key modifiers or caps-lock, etc.
316  break;
317  }
318 #endif
319  case QEvent::Leave:
320  hideTip();
321  break;
322 
323 
324 #if defined (Q_OS_QNX) || defined (Q_OS_WASM) // On QNX the window activate and focus events are delayed and will appear
325  // after the window is shown.
327  case QEvent::FocusIn:
328  return false;
330  if (o != this)
331  return false;
333  break;
334  case QEvent::FocusOut:
335  if (reinterpret_cast<QWindow*>(o) != windowHandle())
336  return false;
338  break;
339 #else
342  case QEvent::FocusIn:
343  case QEvent::FocusOut:
344 #endif
348  case QEvent::Wheel:
350  break;
351 
352  case QEvent::MouseMove:
353  if (o == widget && !rect.isNull() && !rect.contains(static_cast<QMouseEvent*>(e)->position().toPoint()))
354  hideTip();
355  default:
356  break;
357  }
358  return false;
359 }
360 
362 {
363  QScreen *guess = w ? w->screen() : QGuiApplication::primaryScreen();
364  QScreen *exact = guess->virtualSiblingAt(pos);
365  return exact ? exact : guess;
366 }
367 
369 {
370 #ifndef QT_NO_STYLE_STYLESHEET
371  if (testAttribute(Qt::WA_StyleSheet) || (w && qt_styleSheet(w->style()))) {
372  //the stylesheet need to know the real parent
373  QTipLabel::instance->setProperty("_q_stylesheet_parent", QVariant::fromValue(w));
374  //we force the style to be the QStyleSheetStyle, and force to clear the cache as well.
376 
377  // Set up for cleaning up this later...
378  QTipLabel::instance->styleSheetParent = w;
379  if (w) {
382  // QTBUG-64550: A font inherited by the style sheet might change the size,
383  // particular on Windows, where the tip is not parented on a window.
385  }
386  }
387 #endif //QT_NO_STYLE_STYLESHEET
388 
389  QPoint p = pos;
390  const QScreen *screen = getTipScreen(pos, w);
391  // a QScreen's handle *should* never be null, so this is a bit paranoid
392  if (const QPlatformScreen *platformScreen = screen ? screen->handle() : nullptr) {
393  QPlatformCursor *cursor = platformScreen->cursor();
394  // default implementation of QPlatformCursor::size() returns QSize(16, 16)
395  const QSize nativeSize = cursor ? cursor->size() : QSize(16, 16);
396  const QSize cursorSize = QHighDpi::fromNativePixels(nativeSize,
397  platformScreen);
398  QPoint offset(2, cursorSize.height());
399  // assuming an arrow shape, we can just move to the side for very large cursors
400  if (cursorSize.height() > 2 * this->height())
401  offset = QPoint(cursorSize.width() / 2, 0);
402 
403  p += offset;
404 
405  QRect screenRect = screen->geometry();
406  if (p.x() + this->width() > screenRect.x() + screenRect.width())
407  p.rx() -= 4 + this->width();
408  if (p.y() + this->height() > screenRect.y() + screenRect.height())
409  p.ry() -= 24 + this->height();
410  if (p.y() < screenRect.y())
411  p.setY(screenRect.y());
412  if (p.x() + this->width() > screenRect.x() + screenRect.width())
413  p.setX(screenRect.x() + screenRect.width() - this->width());
414  if (p.x() < screenRect.x())
415  p.setX(screenRect.x());
416  if (p.y() + this->height() > screenRect.y() + screenRect.height())
417  p.setY(screenRect.y() + screenRect.height() - this->height());
418  }
419  this->move(p);
420 }
421 
423 {
424  if (QTipLabel::instance->text() != text)
425  return true;
426 
427  if (o != widget)
428  return true;
429 
430  if (!rect.isNull())
431  return !rect.contains(pos);
432  else
433  return false;
434 }
435 
459 void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
460 {
461  if (QTipLabel::instance && QTipLabel::instance->isVisible()) { // a tip does already exist
462  if (text.isEmpty()){ // empty text means hide current tip
464  return;
465  } else if (!QTipLabel::instance->fadingOut) {
466  // If the tip has changed, reuse the one
467  // that is showing (removes flickering)
468  QPoint localPos = pos;
469  if (w)
470  localPos = w->mapFromGlobal(pos);
471  if (QTipLabel::instance->tipChanged(localPos, text, w)){
472  QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
475  }
476  return;
477  }
478  }
479 
480  if (!text.isEmpty()) { // no tip can be reused, create new tip:
481  QWidget *tipLabelParent = [w]() -> QWidget* {
482 #ifdef Q_OS_WIN32
483  // On windows, we can't use the widget as parent otherwise the window will be
484  // raised when the tooltip will be shown
485  Q_UNUSED(w);
486  return nullptr;
487 #else
488  return w;
489 #endif
490  }();
491  new QTipLabel(text, pos, tipLabelParent, msecDisplayTime); // sets QTipLabel::instance to itself
495  QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
496 
497 #if QT_CONFIG(effects)
502  else
504 #else
506 #endif
507  }
508 }
509 
529 {
530  return (QTipLabel::instance != nullptr && QTipLabel::instance->isVisible());
531 }
532 
540 {
542  return QTipLabel::instance->text();
543  return QString();
544 }
545 
546 
547 Q_GLOBAL_STATIC(QPalette, tooltip_palette)
548 
549 
556 {
557  return *tooltip_palette();
558 }
559 
566 {
567  return QApplication::font("QTipLabel");
568 }
569 
579 {
580  *tooltip_palette() = palette;
583 }
584 
591 {
592  QApplication::setFont(font, "QTipLabel");
593 }
594 
596 
597 #include "qtooltip.moc"
static bool isEffectEnabled(Qt::UIEffect)
static QFont font()
static void setFont(const QFont &, const char *className=nullptr)
The QBasicTimer class provides timer events for objects.
Definition: qbasictimer.h:52
void start(int msec, QObject *obj)
int timerId() const noexcept
Definition: qbasictimer.h:69
bool isActive() const noexcept
Definition: qbasictimer.h:68
The QEvent class is the base class of all event classes. Event objects contain event parameters.
Definition: qcoreevent.h:58
@ FocusOut
Definition: qcoreevent.h:80
@ KeyRelease
Definition: qcoreevent.h:78
@ Leave
Definition: qcoreevent.h:83
@ MouseMove
Definition: qcoreevent.h:76
@ KeyPress
Definition: qcoreevent.h:77
@ FocusIn
Definition: qcoreevent.h:79
@ MouseButtonPress
Definition: qcoreevent.h:73
@ WindowActivate
Definition: qcoreevent.h:96
@ MouseButtonDblClick
Definition: qcoreevent.h:75
@ WindowDeactivate
Definition: qcoreevent.h:97
@ MouseButtonRelease
Definition: qcoreevent.h:74
The QFont class specifies a query for a font used for drawing text.
Definition: qfont.h:56
The QFontMetrics class provides font metrics information.
Definition: qfontmetrics.h:56
int descent() const
int ascent() const
void setFrameStyle(int)
Definition: qframe.cpp:335
@ NoFrame
Definition: qframe.h:75
QScreen * primaryScreen
the primary (or default) screen of the application.
The QKeyEvent class describes a key event.
Definition: qevent.h:471
The QLabel widget provides a text or image display.
Definition: qlabel.h:56
void setText(const QString &)
Definition: qlabel.cpp:297
void setMargin(int)
Definition: qlabel.cpp:575
void paintEvent(QPaintEvent *) override
Definition: qlabel.cpp:1035
void setIndent(int)
Definition: qlabel.cpp:544
void setAlignment(Qt::Alignment)
Definition: qlabel.cpp:476
void setWordWrap(bool on)
Definition: qlabel.cpp:506
bool wordWrap
the label's word-wrapping policy
Definition: qlabel.h:63
QString text
the label's text
Definition: qlabel.h:58
void mouseMoveEvent(QMouseEvent *ev) override
Definition: qlabel.cpp:901
QSize sizeHint() const override
Definition: qlabel.cpp:854
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
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
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Definition: qobject.cpp:2772
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Definition: qobject.cpp:3048
void setObjectName(const QString &name)
Definition: qobject.cpp:1261
bool setProperty(const char *name, const QVariant &value)
Definition: qobject.cpp:4063
void destroyed(QObject *=nullptr)
void deleteLater()
Definition: qobject.cpp:2319
The QPaintEvent class contains event parameters for paint events. \inmodule QtGui.
Definition: qevent.h:539
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:55
@ ToolTipBase
Definition: qpalette.h:92
@ ToolTipText
Definition: qpalette.h:92
constexpr QPoint toPoint() const
Definition: qpoint.h:420
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:52
constexpr int y() const noexcept
Definition: qpoint.h:160
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:59
constexpr int height() const noexcept
Definition: qrect.h:266
constexpr bool isNull() const noexcept
Definition: qrect.h:191
bool contains(const QRect &r, bool proper=false) const noexcept
Definition: qrect.cpp:887
constexpr int x() const noexcept
Definition: qrect.h:212
constexpr int width() const noexcept
Definition: qrect.h:263
constexpr int y() const noexcept
Definition: qrect.h:215
The QResizeEvent class contains event parameters for resize events. \inmodule QtGui.
Definition: qevent.h:612
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition: qscreen.h:68
QRect geometry
the screen's geometry in pixels
Definition: qscreen.h:81
QScreen * virtualSiblingAt(QPoint point)
Definition: qscreen.cpp:716
QPlatformScreen * handle() const
Definition: qscreen.cpp:177
QPointF position() const
Definition: qevent.h:150
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:55
constexpr int height() const noexcept
Definition: qsize.h:160
constexpr int width() const noexcept
Definition: qsize.h:157
constexpr int & rheight() noexcept
Definition: qsize.h:184
The QString class provides a Unicode character string.
Definition: qstring.h:388
bool isEmpty() const
Definition: qstring.h:1216
The QStyleHintReturnMask class provides style hints that return a QRegion.
Definition: qstyleoption.h:740
@ SH_ToolTipLabel_Opacity
Definition: qstyle.h:665
@ SH_ToolTip_Mask
Definition: qstyle.h:694
@ PM_ToolTipLabelFrameWidth
Definition: qstyle.h:535
@ PE_PanelTipLabel
Definition: qstyle.h:179
the background color on which the focus rectangle is being drawn
Definition: qstyleoption.h:127
The QStyleOption class stores the parameters used by QStyle functions.
Definition: qstyleoption.h:75
void initFrom(const QWidget *w)
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
Definition: qstylepainter.h:52
The QTimerEvent class contains parameters that describe a timer event.
Definition: qcoreevent.h:367
void reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos)
Definition: qtooltip.cpp:201
void restartExpireTimer(int msecDisplayTime)
Definition: qtooltip.cpp:192
void hideTip()
Definition: qtooltip.cpp:274
void resizeEvent(QResizeEvent *e) override
Definition: qtooltip.cpp:246
void mouseMoveEvent(QMouseEvent *e) override
Definition: qtooltip.cpp:257
void styleSheetParentDestroyed()
Definition: qtooltip.cpp:152
void hideTipImmediately()
Definition: qtooltip.cpp:280
bool tipChanged(const QPoint &pos, const QString &text, QObject *o)
Definition: qtooltip.cpp:422
void setTipRect(QWidget *w, const QRect &r)
Definition: qtooltip.cpp:286
bool fadingOut
Definition: qtooltip.cpp:130
QBasicTimer expireTimer
Definition: qtooltip.cpp:128
void paintEvent(QPaintEvent *e) override
Definition: qtooltip.cpp:235
QBasicTimer hideTimer
Definition: qtooltip.cpp:128
void timerEvent(QTimerEvent *e) override
Definition: qtooltip.cpp:296
void placeTip(const QPoint &pos, QWidget *w)
Definition: qtooltip.cpp:368
QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime)
Definition: qtooltip.cpp:168
static QScreen * getTipScreen(const QPoint &pos, QWidget *w)
Definition: qtooltip.cpp:361
static QTipLabel * instance
Definition: qtooltip.cpp:121
bool eventFilter(QObject *, QEvent *) override
Definition: qtooltip.cpp:306
void adjustTooltipScreen(const QPoint &pos)
void updateSize(const QPoint &pos)
Definition: qtooltip.cpp:216
The QToolTip class provides tool tips (balloon help) for any widget.
Definition: qtooltip.h:50
static QPalette palette()
Definition: qtooltip.cpp:555
static bool isVisible()
Definition: qtooltip.cpp:528
static QFont font()
Definition: qtooltip.cpp:565
static QString text()
Definition: qtooltip.cpp:539
static void setFont(const QFont &)
Definition: qtooltip.cpp:590
static void showText(const QPoint &pos, const QString &text, QWidget *w=nullptr, const QRect &rect={}, int msecShowTime=-1)
Definition: qtooltip.cpp:459
static void setPalette(const QPalette &)
Definition: qtooltip.cpp:578
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:95
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
Definition: qvariant.h:391
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
void setBackgroundRole(QPalette::ColorRole)
Definition: qwidget.cpp:4397
void setMask(const QBitmap &)
void setWindowOpacity(qreal level)
Definition: qwidget.cpp:11330
void setPalette(const QPalette &)
Definition: qwidget.cpp:4536
int width
the width of the widget excluding any window frame
Definition: qwidget.h:148
void setMouseTracking(bool enable)
Definition: qwidget.h:886
QPoint pos
the position of the widget within its parent widget
Definition: qwidget.h:145
bool close()
Definition: qwidget.cpp:8468
void move(int x, int y)
Definition: qwidget.h:913
int height
the height of the widget excluding any window frame
Definition: qwidget.h:149
void ensurePolished() const
Definition: qwidget.cpp:10066
QWindow * windowHandle() const
Definition: qwidget.cpp:2495
QStyle * style() const
Definition: qwidget.cpp:2612
QFont font
the font currently set for the widget
Definition: qwidget.h:167
void resize(int w, int h)
Definition: qwidget.h:916
virtual void resizeEvent(QResizeEvent *event)
Definition: qwidget.cpp:9723
QCursor cursor
the cursor shape for this widget
Definition: qwidget.h:169
QScreen * screen() const
Definition: qwidget.cpp:2508
void showNormal()
Definition: qwidget.cpp:3072
void setForegroundRole(QPalette::ColorRole)
Definition: qwidget.cpp:4462
void setStyleSheet(const QString &styleSheet)
Definition: qwidget.cpp:2567
QPointF mapFromGlobal(const QPointF &) const
bool testAttribute(Qt::WidgetAttribute) const
Definition: qwidget.h:943
bool setScreen(QScreen *screen)
Definition: qwidget.cpp:2428
static QWidgetPrivate * get(QWidget *w)
Definition: qwidget_p.h:252
The QWindow class represents a window in the underlying windowing system.
Definition: qwindow.h:99
#define this
Definition: dialogs.cpp:56
QOpenGLWidget * widget
[1]
QString text
[meta data]
double e
rect
[4]
QStyleOptionButton opt
palette
T fromNativePixels(const T &value, const C *context)
Definition: qnamespace.h:55
@ AlignLeft
Definition: qnamespace.h:169
@ WA_StyleSheet
Definition: qnamespace.h:397
@ UI_AnimateTooltip
Definition: qnamespace.h:1171
@ UI_FadeTooltip
Definition: qnamespace.h:1172
@ Key_ScrollLock
Definition: qnamespace.h:710
Q_GUI_EXPORT bool mightBeRichText(const QString &)
@ ToolTip
Definition: qnamespace.h:238
@ BypassGraphicsProxyWidget
Definition: qnamespace.h:268
#define QString()
Definition: parse-defines.h:51
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
#define Q_UNLIKELY(x)
#define qApp
void qScrollEffect(QWidget *w, QEffects::DirFlags orient, int time)
Definition: qeffects.cpp:562
void qFadeEffect(QWidget *w, int time)
Definition: qeffects.cpp:584
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
#define qWarning
Definition: qlogging.h:179
#define SLOT(a)
Definition: qobjectdefs.h:87
#define SIGNAL(a)
Definition: qobjectdefs.h:88
GLenum GLuint GLenum GLsizei length
Definition: qopengl.h:270
GLuint64 key
GLboolean r
[2]
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr offset
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
GLuint GLenum option
Definition: qopenglext.h:5929
QStyleSheetStyle * qt_styleSheet(QStyle *style)
#define Q_OBJECT
Definition: qtmetamacros.h:158
#define slots
Definition: qtmetamacros.h:76
Q_UNUSED(salary)
[21]
QObject::connect nullptr
QTime time
[5]