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
4
#
include
"qquickscreencapture_p.h"
5
6
QT_BEGIN_NAMESPACE
7
8
QQuickScreenCatpure::QQuickScreenCatpure(QObject *parent) : QScreenCapture(parent)
9
{
10
connect(
this
, &QScreenCapture::screenChanged,
this
, [
this
] {
11
emit qmlScreenChanged(ensureQmlScreen());
12
});
13
}
14
15
void
QQuickScreenCatpure::qmlSetScreen(QQuickScreenInfo *qmlScreen)
16
{
17
setScreen(qmlScreen ? qmlScreen->wrappedScreen() :
nullptr
);
18
}
19
20
QQuickScreenInfo *QQuickScreenCatpure::ensureQmlScreen()
21
{
22
// Note QQuickApplication may recreate QQuickScreenInfo
23
// so we implement creating our own instance.
24
// TODO: perhaps, we should return null QQuickScreenInfo for null QScreen
25
if
(!m_qmlScreen || m_qmlScreen->wrappedScreen() != screen()) {
26
m_ownQmlScreen = std::make_unique<QQuickScreenInfo>(
this
, screen());
27
m_qmlScreen = m_ownQmlScreen.get();
28
}
29
30
return
m_qmlScreen;
31
}
32
33
QT_END_NAMESPACE
34
35
#
include
"moc_qquickscreencapture_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtmultimedia
src
multimediaquick
qquickscreencapture.cpp
Generated on
for Qt by
1.16.1