7#include <private/qguiapplication_p.h>
20#include <qpa/qplatformtheme.h>
21#include "private/qtextdocumentlayout_p.h"
23#if QT_CONFIG(accessibility)
163#ifdef QT_NO_TEXTHTMLPARSER
220 QWhatsThisClickedEvent
e(href);
253 r.adjust(0, 0, -1, -1);
258 p.setBrush(
palette().toolTipBase());
263 p.drawRect(1, 1,
w-2,
h-2);
266 p.drawPoint(
w + 5, 6);
267 p.drawLine(
w + 3, 6,
w + 5, 8);
268 p.drawLine(
w + 1, 6,
w + 5, 10);
270 for(
i=7;
i <
h;
i += 2)
271 p.drawLine(
w,
i,
w + 5,
i + 5);
272 for(
i =
w -
i +
h;
i > 6;
i -= 2)
273 p.drawLine(
i,
h,
i + 5,
h + 5);
274 for(;
i > 0 ;
i -= 2)
275 p.drawLine(6,
h + 6 -
i,
i + 5,
h + 5);
277 r.adjust(0, 0, 1, 1);
282 p.translate(
r.x(),
r.y());
336 for (
auto *
w : toplevels)
343 : leaveOnMouseRelease(
false)
346 qApp->installEventFilter(
this);
361#if QT_CONFIG(accessibility)
362 QAccessibleEvent
event(
this, QAccessible::ContextHelpStart);
363 QAccessible::updateAccessibility(&
event);
371 action->setChecked(
false);
376#if QT_CONFIG(accessibility)
377 QAccessibleEvent
event(
this, QAccessible::ContextHelpEnd);
378 QAccessible::updateAccessibility(&
event);
385 if (!
o->isWidgetType())
424#if QT_CONFIG(shortcut)
430 if (customWhatsThis) {
449class QWhatsThisAction:
public QAction
457 void actionTriggered();
462#ifndef QT_NO_IMAGEFORMAT_XPM
468#ifndef QT_NO_SHORTCUT
473void QWhatsThisAction::actionTriggered()
543 int w = whatsThat->
width();
545 int sx = screenRect.
x();
546 int sy = screenRect.
y();
563 : screenRect.
width())
573 if (
y +
h + 10 > sy + screenRect.
height())
626 return new QWhatsThisAction(
parent);
632#include "qwhatsthis.moc"
QString anchorAt(const QPointF &pos) const
Returns the reference of the anchor the given position, or an empty string if no anchor exists at tha...
virtual void draw(QPainter *painter, const PaintContext &context)=0
Draws the layout with the given painter using the given context.
The QAction class provides an abstraction for user commands that can be added to different user inter...
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or \nullptr if there is no Qt widget there.
static QWidgetList topLevelWidgets()
Returns a list of the top-level widgets (windows) in the application.
static QFont font()
Returns the default application font.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static QPoint pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
QRect boundingRect(QChar) const
Returns the rectangle that is covered by ink if character ch were to be drawn at the origin of the co...
static QPlatformTheme * platformTheme()
QScreen * primaryScreen
the primary (or default) screen of the application.
static void changeOverrideCursor(const QCursor &)
Changes the currently active application override cursor to cursor.
static void setOverrideCursor(const QCursor &)
Sets the application override cursor to cursor.
static void restoreOverrideCursor()
Undoes the last setOverrideCursor().
static QScreen * screenAt(const QPoint &point)
Returns the screen at point, or \nullptr if outside of any screen.
The QHelpEvent class provides an event that is used to request helpful information about a particular...
The QKeyEvent class describes a key event.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr void translate(int dx, int dy) noexcept
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
The QScreen class is used to query screen properties. \inmodule QtGui.
QRect geometry
the screen's geometry in pixels
QRect virtualGeometry
the pixel geometry of the virtual desktop to which this screen belongs
QPointF globalPosition() const
Returns the position of the point in this event on the screen or virtual desktop.
QPointF position() const
Returns the position of the point in this event, relative to the widget or item that received the eve...
Qt::MouseButton button() const
Returns the button that caused the event.
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
qsizetype size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
\reentrant \inmodule QtGui
void setHtml(const QString &html)
Replaces the entire contents of the document with the given HTML-formatted text in the html string.
QAbstractTextDocumentLayout * documentLayout() const
Returns the document layout for this document.
QSizeF size
the actual size of the document. This is equivalent to documentLayout()->documentSize();
void setDefaultFont(const QFont &font)
Sets the default font to use in the document layout.
void setUndoRedoEnabled(bool enable)
void setPlainText(const QString &text)
Replaces the entire contents of the document with the given plain text.
void keyPressEvent(QKeyEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
QWhatsThat(const QString &txt, QWidget *parent, QWidget *showTextFor)
void mouseReleaseEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
void mouseMoveEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
void mousePressEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
static QWhatsThat * instance
static void say(QWidget *, const QString &, int x=0, int y=0)
static QWhatsThisPrivate * instance
static void notifyToplevels(QEvent *e)
bool eventFilter(QObject *, QEvent *) override
Filters events if this object has been installed as an event filter for the watched object.
static void enterWhatsThisMode()
This function switches the user interface into "What's This?" mode.
static void leaveWhatsThisMode()
If the user interface is in "What's This?" mode, this function switches back to normal mode; otherwis...
static void showText(const QPoint &pos, const QString &text, QWidget *w=nullptr)
Shows text as a "What's This?" window, at global position pos.
static bool inWhatsThisMode()
Returns true if the user interface is in "What's This?" mode; otherwise returns false.
static void hideText()
If a "What's This?" window is showing, this destroys it.
Combined button and popup list for selecting options.
Q_GUI_EXPORT bool mightBeRichText(const QString &)
Returns true if the string text is likely to be rich text; otherwise returns false.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
constexpr const T & qMin(const T &a, const T &b)
void qDeleteInEventHandler(QObject *o)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLfloat GLfloat GLfloat GLfloat h
static const char *const button_image[]
Q_CORE_EXPORT void qDeleteInEventHandler(QObject *o)
myAction setIcon(SomeIcon)
\reentrant \inmodule QtGui
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent