File: qgswebenginepage.sip.in

package info (click to toggle)
qgis 3.44.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,237,544 kB
  • sloc: cpp: 1,668,420; python: 381,688; xml: 23,474; perl: 4,078; sh: 3,733; ansic: 2,799; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (161 lines) | stat: -rw-r--r-- 5,439 bytes parent folder | download | duplicates (4)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/web/qgswebenginepage.h                                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsWebEnginePage : QObject
{
%Docstring(signature="appended")
A wrapper around the QWebEnginePage class, adding extra functionality.

.. warning::

   This class is only available on QGIS builds with WebEngine support enabled.

.. versionadded:: 3.36
%End

%TypeHeaderCode
#include "qgswebenginepage.h"
%End
  public:

    QgsWebEnginePage( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsWebEnginePage, with the specified ``parent`` widget.
%End
    ~QgsWebEnginePage();


    bool setContent( const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl(), bool blocking = false );
%Docstring
Sets the content of the web page to ``data``. If the ``mimeType``
argument is empty, it is assumed that the content is
text/plain,charset=US-ASCII

The ``baseUrl`` is optional and used to resolve relative URLs in the
document, such as referenced images or stylesheets.

If ``blocking`` is ``True`` then the call will block while the HTML is
loaded. Otherwise the html is loaded immediately; external objects are
loaded asynchronously.

.. warning::

   Setting ``blocking`` to ``True`` involves running the event loop on the current thread. Take care when calling from the main thread as incorrect use will result in crashes.

:return: ``True`` if loading was successful
%End

    bool setHtml( const QString &html, const QUrl &baseUrl = QUrl(), bool blocking = false );
%Docstring
Sets the content of this page to ``html``.

The ``baseUrl`` is optional and used to resolve relative URLs in the
document, such as referenced images or stylesheets.

If ``blocking`` is ``True`` then the call will block while the HTML is
loaded. Otherwise the html is loaded immediately; external objects are
loaded asynchronously.

.. note::

   This function works only for HTML, for other mime types (such as XHTML and SVG) :py:func:`~QgsWebEnginePage.setContent` should be used instead.

.. warning::

   Setting ``blocking`` to ``True`` involves running the event loop on the current thread. Take care when calling from the main thread as incorrect use will result in crashes.

:return: ``True`` if loading was successful
%End

    bool setUrl( const QUrl &url, bool blocking = false );
%Docstring
Sets the ``url`` of the web page to be displayed.

Setting this property clears the page and loads the URL.

If ``blocking`` is ``True`` then the call will block while the HTML is
loaded. Otherwise the html is loaded immediately; external objects are
loaded asynchronously.

.. warning::

   Setting ``blocking`` to ``True`` involves running the event loop on the current thread. Take care when calling from the main thread as incorrect use will result in crashes.

:return: ``True`` if loading was successful
%End

    QSize documentSize() const;
%Docstring
Returns the size of the page document, in pixels.

.. warning::

   If the page content was NOT loaded using a blocking method, then this method involves running the event loop on the current thread. Take care when calling from the main thread as incorrect use will result in crashes.
%End

    bool render( QPainter *painter, const QRectF &painterRect );
%Docstring
Renders the web page contents to a ``painter``. Content will be rendered
as vector objects.

The ``painterRect`` argument specifies the target rectangle for the page
in ``painter`` coordinates.

.. warning::

   This method involves running the event loop on the current thread. Take care when calling from the main thread as incorrect use will result in crashes.

.. warning::

   This method requires a QGIS build with PDF4Qt library support.

:return: ``True`` if rendering was successful

:raises QgsNotSupportedException: on QGIS builds without PDF4Qt library
                                  support.
%End

  signals:

    void loadStarted();
%Docstring
This signal is emitted when the page starts loading content.
%End

    void loadProgress( int progress );
%Docstring
This signal is emitted when the global ``progress`` status changes.

The current value is provided by ``progress`` and scales from 0 to 100.
It accumulates changes from all the child frames.
%End

    void loadFinished( bool ok );
%Docstring
This signal is emitted when the page finishes loading content.

This signal is independent of script execution or page rendering.

``ok`` will indicate whether the load was successful or any error
occurred.
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/web/qgswebenginepage.h                                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/