Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qshapedpixmapdndwindow_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSHAPEDPIXMAPDNDWINDOW_H
5#define QSHAPEDPIXMAPDNDWINDOW_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtGui/QRasterWindow>
20#include <QtGui/QPixmap>
21
22QT_REQUIRE_CONFIG(draganddrop);
23
25
27{
29public:
30 explicit QShapedPixmapWindow(QScreen *screen = nullptr);
32
33 void setUseCompositing(bool on) { m_useCompositing = on; }
34 void setPixmap(const QPixmap &pixmap);
35 void setHotspot(const QPoint &hotspot);
36
37 void updateGeometry(const QPoint &pos);
38
39protected:
40 void paintEvent(QPaintEvent *) override;
41
42private:
43 QPixmap m_pixmap;
44 QPoint m_hotSpot;
45 bool m_useCompositing;
46};
47
49
50#endif // QSHAPEDPIXMAPDNDWINDOW_H
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtGui
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
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)
Combined button and popup list for selecting options.
QScreen * screen
[1]
Definition main.cpp:29
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
widget render & pixmap