Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpaintdevicewindow.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// Qt-Security score:significant reason:default
4
5#ifndef QPAINTDEVICEWINDOW_H
6#define QPAINTDEVICEWINDOW_H
7
8#include <QtGui/qtguiglobal.h>
9#include <QtGui/QWindow>
10#include <QtGui/QPaintDevice>
11
12QT_BEGIN_NAMESPACE
13
14class QPaintDeviceWindowPrivate;
15class QPaintEvent;
16
17class Q_GUI_EXPORT QPaintDeviceWindow : public QWindow, public QPaintDevice
18{
19 Q_OBJECT
20 Q_DECLARE_PRIVATE(QPaintDeviceWindow)
21
22public:
23 void update(const QRect &rect);
24 void update(const QRegion &region);
25
26 using QWindow::width;
27 using QWindow::height;
28 using QWindow::devicePixelRatio;
29
30public Q_SLOTS:
31 void update();
32
33protected:
34 void exposeEvent(QExposeEvent *) override;
35 void paintEvent(QPaintEvent *event) override;
36
37 int metric(PaintDeviceMetric metric) const override;
38 bool event(QEvent *event) override;
39
40 QPaintDeviceWindow(QPaintDeviceWindowPrivate &dd, QWindow *parent);
41
42private:
43 QPaintEngine *paintEngine() const override;
44 Q_DISABLE_COPY(QPaintDeviceWindow)
45};
46
47QT_END_NAMESPACE
48
49#endif