9#include <QtGui/QPainter>
10#include <QtGui/private/qpixmap_raster_p.h>
11#include <QtGui/private/qguiapplication_p.h>
13#include <qpa/qplatformcursor.h>
14#include <qpa/qplatformwindow.h>
27 return platformScreens;
50 local -= containing->position();
54 if (containing != previous)
74 : m_geometry(0, 0, 800, 600)
76 , m_integration(integration)
95 if (
w->isExposed() &&
w->geometry().intersects(
rect)) {
145 m_windowAreaHash[
id] = bounds;
146 m_backingStoreForWinIdHash[
id] =
this;
177 if (adjusted.
width() <= 0)
179 if (adjusted.
height() <= 0)
192 return m_backingStoreForWinIdHash.
value(
id,
nullptr);
195void QOffscreenBackingStore::clearHash()
198 const auto it2 = std::as_const(m_backingStoreForWinIdHash).find(
it.key());
199 if (it2.value() ==
this)
200 m_backingStoreForWinIdHash.
erase(it2);
202 m_windowAreaHash.
clear();
208 : m_integration(integration)
228 return iface->m_integration->configuration();
233 if (resource ==
"setConfiguration")
235 else if (resource ==
"configuration")
The QCursor class provides a mouse cursor with an arbitrary shape.
static QWindowList topLevelWindows()
Returns a list of the top-level windows in the application.
QScreen * primaryScreen
the primary (or default) screen of the application.
static Qt::KeyboardModifiers keyboardModifiers()
Returns the current state of the modifier keys on the keyboard.
static Qt::MouseButtons mouseButtons()
Returns the current state of the buttons on the mouse.
const_iterator cbegin() const noexcept
iterator erase(const_iterator it)
T value(const Key &key) const noexcept
const_iterator cend() const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
QSize size() const
Returns the size of the image, i.e.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Format
The following image formats are available in Qt.
\inmodule QtCore\reentrant
void append(parameter_type t)
bool scroll(const QRegion &area, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
static QOffscreenBackingStore * backingStoreForWinId(WId id)
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override
Flushes the given region from the specified window.
~QOffscreenBackingStore()
void resize(const QSize &size, const QRegion &staticContents) override
QOffscreenBackingStore(QWindow *window)
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
QPixmap grabWindow(WId window, const QRect &rect) const
void setPos(const QPoint &pos) override
QPoint pos() const override
void changeCursor(QCursor *windowCursor, QWindow *window) override
This method is called by Qt whenever the cursor graphic should be changed.
QList< QOffscreenScreen * > screens() const
static QPlatformWindow * windowContainingCursor
QOffscreenScreen(const QOffscreenIntegration *integration)
QList< QPlatformScreen * > virtualSiblings() const override
Returns a list of all the platform screens that are part of the same virtual desktop.
QPixmap grabWindow(WId window, int x, int y, int width, int height) const override
This function is called when Qt needs to be able to grab the content of a window.
const QOffscreenIntegration * m_integration
The QPainter class performs low-level painting on widgets and other paint devices.
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Draws the rectangular portion source of the given image into the target rectangle in the paint device...
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
constexpr void setWidth(int w) noexcept
Sets the width of the rectangle to the given width.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr void setHeight(int h) noexcept
Sets the height of the rectangle to the given height.
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
QPlatformScreen * handle() const
Get the platform screen handle.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
static bool handleMouseEvent(QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
static void handleEnterLeaveEvent(QWindow *enter, QWindow *leave, const QPointF &local=QPointF(), const QPointF &global=QPointF())
This method can be used to ensure leave and enter events are both in queue when moving from one QWind...
int width
the width of the window's geometry
int height
the height of the window's geometry
QSet< QString >::iterator it
Combined button and popup list for selecting options.
@ MouseEventSynthesizedByQt
static int area(const QSize &s)
void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)