Falkon Develop
Cross-platform Qt-based web browser
QmlUserScript Class Reference

The class exposing QWebEngineScript to QML. More...

#include <qmluserscript.h>

Inheritance diagram for QmlUserScript:

Public Types

enum  InjectionPoint { DocumentCreation = QWebEngineScript::DocumentCreation , DocumentReady = QWebEngineScript::DocumentReady , Deferred = QWebEngineScript::Deferred }
 The enum exposing QWebEngineScript::InjectionPoint. More...
 
enum  ScriptWorldId { MainWorld = QWebEngineScript::MainWorld , ApplicationWorld = QWebEngineScript::ApplicationWorld , UserWorld = QWebEngineScript::UserWorld }
 The enum wrapping QWebEngineScript::ScriptWorldId. More...
 

Signals

void nameChanged (const QString &name)
 The signal emitted when the script name is changed. More...
 
void runsOnSubFramesChanged (bool runsOnSubFrames)
 The signal emitted when runsOnSubFrame property of the script is changed. More...
 
void worldIdChanged (int worldId)
 The signal emitted when worldId property of the script is changed. More...
 
void sourceCodeChanged (const QString &sourceCode)
 The signal emitted when source code of the script is changed. More...
 
void injectionPointChanged (int injectionPoint)
 The signal emitted when injectionPoint property of the script is changed. More...
 

Public Member Functions

 QmlUserScript (QObject *parent=nullptr)
 
 ~QmlUserScript () override
 
QWebEngineScript webEngineScript () const
 
void setWebEngineScript (const QWebEngineScript &script)
 

Properties

bool null
 Checks if the UserScript is null. More...
 
QString name
 Name of the UserScript. More...
 
bool runsOnSubFrames
 Checks if the UserScript runs on sub frames. More...
 
int worldId
 WorldId of the UserScript. More...
 
QString sourceCode
 Source code of the UserScript. More...
 
InjectionPoint injectionPoint
 Injection point of the UserScript. More...
 

Detailed Description

The class exposing QWebEngineScript to QML.

Definition at line 29 of file qmluserscript.h.

Member Enumeration Documentation

◆ InjectionPoint

The enum exposing QWebEngineScript::InjectionPoint.

Enumerator
DocumentCreation 

Represents QWebEngineScript::DocumentCreation.

DocumentReady 

Represents QWebEngineScript::DocumentReady,.

Deferred 

Represents QWebEngineScript::Deferred.

Definition at line 60 of file qmluserscript.h.

◆ ScriptWorldId

The enum wrapping QWebEngineScript::ScriptWorldId.

Enumerator
MainWorld 

Represents QWebEngineScript::MainWorld.

ApplicationWorld 

Represents QWebEngineScript::ApplicationWorld.

UserWorld 

Represents QWebEngineScript::UserWorld.

Definition at line 68 of file qmluserscript.h.

Constructor & Destructor Documentation

◆ QmlUserScript()

QmlUserScript::QmlUserScript ( QObject *  parent = nullptr)
explicit

Definition at line 21 of file qmluserscript.cpp.

◆ ~QmlUserScript()

QmlUserScript::~QmlUserScript ( )
override

Definition at line 27 of file qmluserscript.cpp.

Member Function Documentation

◆ injectionPointChanged

void QmlUserScript::injectionPointChanged ( int  injectionPoint)
signal

The signal emitted when injectionPoint property of the script is changed.

◆ nameChanged

void QmlUserScript::nameChanged ( const QString &  name)
signal

The signal emitted when the script name is changed.

◆ runsOnSubFramesChanged

void QmlUserScript::runsOnSubFramesChanged ( bool  runsOnSubFrames)
signal

The signal emitted when runsOnSubFrame property of the script is changed.

◆ setWebEngineScript()

void QmlUserScript::setWebEngineScript ( const QWebEngineScript &  script)

Definition at line 37 of file qmluserscript.cpp.

◆ sourceCodeChanged

void QmlUserScript::sourceCodeChanged ( const QString &  sourceCode)
signal

The signal emitted when source code of the script is changed.

◆ webEngineScript()

QWebEngineScript QmlUserScript::webEngineScript ( ) const

Definition at line 32 of file qmluserscript.cpp.

◆ worldIdChanged

void QmlUserScript::worldIdChanged ( int  worldId)
signal

The signal emitted when worldId property of the script is changed.

Property Documentation

◆ injectionPoint

InjectionPoint QmlUserScript::injectionPoint
readwrite

Injection point of the UserScript.

Definition at line 29 of file qmluserscript.h.

◆ name

QString QmlUserScript::name
readwrite

Name of the UserScript.

Definition at line 29 of file qmluserscript.h.

◆ null

bool QmlUserScript::null
read

Checks if the UserScript is null.

Definition at line 29 of file qmluserscript.h.

◆ runsOnSubFrames

bool QmlUserScript::runsOnSubFrames
readwrite

Checks if the UserScript runs on sub frames.

Definition at line 29 of file qmluserscript.h.

◆ sourceCode

QString QmlUserScript::sourceCode
readwrite

Source code of the UserScript.

Definition at line 29 of file qmluserscript.h.

◆ worldId

int QmlUserScript::worldId
readwrite

WorldId of the UserScript.

Definition at line 29 of file qmluserscript.h.


The documentation for this class was generated from the following files: