summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/doc/src/fullscreen_request.qdoc
blob: 60da2748c2a68c04688aadcec96db3842de39313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \qmltype FullScreenRequest
    \instantiates QWebEngineFullScreenRequest
    \inqmlmodule QtWebEngine
    \since QtWebEngine 1.1

    \brief A utility type for the WebEngineView::fullScreenRequested() signal.

    \sa WebEngineView::fullScreenRequested()
*/

/*!
    \qmlproperty url FullScreenRequest::origin
    \readonly
    The URL of the web page that issued the fullscreen request.
*/

/*!
    \qmlproperty bool FullScreenRequest::toggleOn
    \readonly

    Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise.

    \sa accept()
*/

/*!
    \qmlmethod void FullScreenRequest::accept()

    Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
    property to be equal to toggleOn.

    \qml
    ApplicationWindow {
        id: window
        WebEngineView {
            onFullScreenRequested: function(request) {
                if (request.toggleOn)
                    window.showFullScreen()
                else
                    window.showNormal()
                request.accept()
            }
        }
    }
    \endqml

    \sa toggleOn
*/

/*!
    \qmlmethod void FullScreenRequest::reject()
    Rejects a fullscreen request.
*/