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_P_H
5#define QQUICKSCREENCAPTURE_P_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 <QtCore/private/qglobal_p.h>
19
20#include <QtMultimedia/qscreencapture.h>
21
22#include <QtMultimediaQuick/qtmultimediaquickexports.h>
23
24#include <QtQml/qqml.h>
25
26#include <QtQuick/private/qquickscreen_p.h>
27
28#include <memory>
29
31
32class Q_MULTIMEDIAQUICK_EXPORT QQuickScreenCapture : public QScreenCapture
33{
34 Q_OBJECT
35 Q_PROPERTY(QQuickScreenInfo *screen READ ensureQmlScreen WRITE qmlSetScreen NOTIFY qmlScreenChanged)
36 Q_PROPERTY(qreal maximumFrameRate READ qmlMaximumFrameRate WRITE qmlSetMaximumFrameRate RESET
37 resetMaximumFrameRate NOTIFY maximumFrameRateChanged REVISION(6, 12))
38 QML_NAMED_ELEMENT(ScreenCapture)
39
40public:
41 QQuickScreenCapture(QObject *parent = nullptr);
42
43 void qmlSetScreen(QQuickScreenInfo *newQmlScreen);
44
45 QQuickScreenInfo *ensureQmlScreen();
46
47 void qmlSetMaximumFrameRate(qreal);
48 qreal qmlMaximumFrameRate() const;
49
50Q_SIGNALS:
51 void qmlScreenChanged(QQuickScreenInfo *);
52
53private:
54 QPointer<QQuickScreenInfo> m_qmlScreen;
55 std::unique_ptr<QQuickScreenInfo> m_ownQmlScreen;
56};
57
58QT_END_NAMESPACE
59
60#endif // QQUICKSCREENCAPTURE_P_H
Combined button and popup list for selecting options.