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
qplatformsurface.cpp
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
5#ifndef QT_NO_DEBUG_STREAM
6#include <QtCore/qdebug.h>
7#include <QtGui/qwindow.h>
8#endif
9
11
12/*!
13 \class QPlatformSurface
14 \since 5.0
15 \internal
16 \preliminary
17 \ingroup qpa
18
19 \brief The QPlatformSurface class provides an abstraction for a surface.
20 */
21QPlatformSurface::~QPlatformSurface()
22{
23
24}
25
26QSurface *QPlatformSurface::surface() const
27{
28 return m_surface;
29}
30
31QPlatformSurface::QPlatformSurface(QSurface *surface) : m_surface(surface)
32{
33}
34
35#ifndef QT_NO_DEBUG_STREAM
36Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QPlatformSurface *surface)
37{
38 QDebugStateSaver saver(debug);
39 debug.nospace();
40 debug << "QPlatformSurface(" << (const void *)surface;
41 if (surface) {
42 QSurface *s = surface->surface();
43 auto surfaceClass = s->surfaceClass();
44 debug << ", class=" << surfaceClass;
45 debug << ", type=" << s->surfaceType();
46 if (surfaceClass == QSurface::Window)
47 debug << ", window=" << static_cast<QWindow *>(s);
48 else
49 debug << ", surface=" << s;
50 }
51 debug << ')';
52 return debug;
53}
54#endif // !QT_NO_DEBUG_STREAM
55
56QT_END_NAMESPACE
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2568