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
qquickscreencapture.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
7
8QQuickScreenCatpure::QQuickScreenCatpure(QObject *parent) : QScreenCapture(parent)
9{
10 connect(this, &QScreenCapture::screenChanged, this, [this](QScreen *screen) {
11 emit QQuickScreenCatpure::screenChanged(new QQuickScreenInfo(this, screen));
12 });
13}
14
15void QQuickScreenCatpure::qmlSetScreen(const QQuickScreenInfo *info)
16{
17 setScreen(info ? info->wrappedScreen() : nullptr);
18}
19
20QQuickScreenInfo *QQuickScreenCatpure::qmlScreen()
21{
22 return new QQuickScreenInfo(this, screen());
23}
24
25QT_END_NAMESPACE
26
27#include "moc_qquickscreencapture_p.cpp"