![]() |
Falkon Develop
Cross-platform Qt-based web browser
|
The class exposing QWebEngineScriptCollection to QML. More...
#include <qmluserscripts.h>
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... | |
The class exposing QWebEngineScriptCollection to QML.
Definition at line 26 of file qmluserscripts.h.
|
explicit |
Definition at line 24 of file qmluserscripts.cpp.
bool QmlUserScripts::contains | ( | QObject * | object | ) | const |
Checks if the script is in collection.
object | of type QmlUserScript |
Definition at line 56 of file qmluserscripts.cpp.
QObject * QmlUserScripts::findScript | ( | const QString & | name | ) | const |
Finds a script in collection by name.
name | of the script |
Definition at line 66 of file qmluserscripts.cpp.
QList< QObject * > QmlUserScripts::findScripts | ( | const QString & | name | ) | const |
Finds all scripts in collection by a given name.
Definition at line 78 of file qmluserscripts.cpp.
void QmlUserScripts::insert | ( | QObject * | object | ) |
Definition at line 100 of file qmluserscripts.cpp.
void QmlUserScripts::remove | ( | QObject * | object | ) | const |
Removes a script from collection.
object | of type QmlUserScript |
Definition at line 84 of file qmluserscripts.cpp.
QList< QObject * > QmlUserScripts::toList | ( | ) | const |
Gets all the scripts of the collection.
Definition at line 94 of file qmluserscripts.cpp.
|
read |
Number of elements in the collection.
Definition at line 26 of file qmluserscripts.h.
|
read |
Checks if the collection is empty.
Definition at line 26 of file qmluserscripts.h.
|
read |
Size of the collection.
Definition at line 26 of file qmluserscripts.h.