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_p.h
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#ifndef QQUICKSCREENCAPTURE_H
5#define QQUICKSCREENCAPTURE_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 for the convenience
12// of other Qt classes. 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 <QtMultimedia/qscreencapture.h>
19#include <QtMultimediaQuick/qtmultimediaquickexports.h>
20#include <QtQuick/private/qquickscreen_p.h>
21#include <QtCore/private/qglobal_p.h>
22#include <memory>
23
25
26class Q_MULTIMEDIAQUICK_EXPORT QQuickScreenCapture : public QScreenCapture
27{
28 Q_OBJECT
29 Q_PROPERTY(QQuickScreenInfo *screen READ ensureQmlScreen WRITE qmlSetScreen NOTIFY qmlScreenChanged)
30 Q_PROPERTY(qreal frameRate READ qmlFrameRate WRITE qmlSetFrameRate RESET resetFrameRate NOTIFY frameRateChanged)
31 QML_NAMED_ELEMENT(ScreenCapture)
32
33public:
34 QQuickScreenCapture(QObject *parent = nullptr);
35
36 void qmlSetScreen(QQuickScreenInfo *newQmlScreen);
37
38 QQuickScreenInfo *ensureQmlScreen();
39
40 void qmlSetFrameRate(qreal);
41 qreal qmlFrameRate() const;
42
43Q_SIGNALS:
44 void qmlScreenChanged(QQuickScreenInfo *);
45
46private:
47 QPointer<QQuickScreenInfo> m_qmlScreen;
48 std::unique_ptr<QQuickScreenInfo> m_ownQmlScreen;
49};
50
51QT_END_NAMESPACE
52
53#endif
Combined button and popup list for selecting options.