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

The class exposing QWebEngineScriptCollection to QML. More...

#include <qmluserscripts.h>

Inheritance diagram for QmlUserScripts:

Public Member Functions

 QmlUserScripts (QObject *parent=nullptr)
 
Q_INVOKABLE bool contains (QObject *object) const
 Checks if the script is in collection. More...
 
Q_INVOKABLE QObject * findScript (const QString &name) const
 Finds a script in collection by name. More...
 
Q_INVOKABLE QList< QObject * > findScripts (const QString &name) const
 Finds all scripts in collection by a given name. More...
 
Q_INVOKABLE void remove (QObject *object) const
 Removes a script from collection. More...
 
Q_INVOKABLE QList< QObject * > toList () const
 Gets all the scripts of the collection. More...
 
void insert (QObject *object)
 

Properties

int count
 Number of elements in the collection. More...
 
int size
 Size of the collection. More...
 
bool empty
 Checks if the collection is empty. More...
 

Detailed Description

The class exposing QWebEngineScriptCollection to QML.

Definition at line 26 of file qmluserscripts.h.

Constructor & Destructor Documentation

◆ QmlUserScripts()

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

Definition at line 24 of file qmluserscripts.cpp.

Member Function Documentation

◆ contains()

bool QmlUserScripts::contains ( QObject *  object) const

Checks if the script is in collection.

Parameters
objectof type QmlUserScript
Returns
true if the script is in collection, else false

Definition at line 56 of file qmluserscripts.cpp.

◆ findScript()

QObject * QmlUserScripts::findScript ( const QString &  name) const

Finds a script in collection by name.

Parameters
nameof the script
Returns
object of type QmlUserScript, representing the script of given name

Definition at line 66 of file qmluserscripts.cpp.

◆ findScripts()

QList< QObject * > QmlUserScripts::findScripts ( const QString &  name) const

Finds all scripts in collection by a given name.

Returns
list of objects, each of type QmlUserScript, representing the script of given name

Definition at line 78 of file qmluserscripts.cpp.

◆ insert()

void QmlUserScripts::insert ( QObject *  object)

Definition at line 100 of file qmluserscripts.cpp.

◆ remove()

void QmlUserScripts::remove ( QObject *  object) const

Removes a script from collection.

Parameters
objectof type QmlUserScript

Definition at line 84 of file qmluserscripts.cpp.

◆ toList()

QList< QObject * > QmlUserScripts::toList ( ) const

Gets all the scripts of the collection.

Returns
list of objects, each of type QmlUserScript

Definition at line 94 of file qmluserscripts.cpp.

Property Documentation

◆ count

int QmlUserScripts::count
read

Number of elements in the collection.

Definition at line 26 of file qmluserscripts.h.

◆ empty

bool QmlUserScripts::empty
read

Checks if the collection is empty.

Definition at line 26 of file qmluserscripts.h.

◆ size

int QmlUserScripts::size
read

Size of the collection.

Definition at line 26 of file qmluserscripts.h.


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