8#include <QtGui/QPainter>
9#include <QtGui/QCursor>
10#include <QtGui/QGuiApplication>
11#include <QtGui/QPalette>
12#include <QtGui/QBitmap>
17 : m_useCompositing(true)
34 if (!m_useCompositing) {
39 if (
auto platformWindow =
handle()) {
42 const auto maskSize = (
QSizeF(m_pixmap.
size()) * winDpr / pixmapDpr).toSize();
78#include "moc_qshapedpixmapdndwindow_p.cpp"
static QBitmap fromPixmap(const QPixmap &pixmap)
Returns a copy of the given pixmap converted to a bitmap.
static QPalette palette()
Returns the current application palette.
qreal devicePixelRatio() const
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
QSizeF deviceIndependentSize() const
Returns the size of the pixmap in device independent pixels.
QSize size() const
Returns the size of the pixmap.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
QBitmap mask() const
Returns true if this pixmap has an alpha channel, or has a mask, otherwise returns false.
qreal devicePixelRatio() const
Returns the device pixel ratio for the pixmap.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QScreen class is used to query screen properties. \inmodule QtGui.
QShapedPixmapWindow(QScreen *screen=nullptr)
void setHotspot(const QPoint &hotspot)
void updateGeometry(const QPoint &pos)
void paintEvent(QPaintEvent *) override
Handles paint events passed in the event parameter.
void setPixmap(const QPixmap &pixmap)
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
QSurfaceFormat format() const override
Returns the actual format of this window.
QSize size() const override
Returns the size of the window excluding any window frame.
void setGeometry(int posx, int posy, int w, int h)
Sets the geometry of the window, excluding its window frame, to a rectangle constructed from posx,...
Combined button and popup list for selecting options.
@ BypassWindowManagerHint
@ WindowDoesNotAcceptFocus
@ WindowTransparentForInput
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format