|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
A window's own sonde object: Sonde's events, the window's settings and objects, and what QML can't find out by itself about objects and values (design 0034). More...
Public Member Functions | |
| QmlWindowApi (const QmlEventBridge *bridge, Server *server, QVariantMap params, QVariantMap objects, std::function< QUrl(const QString &)> visualiser, QObject *parent) | |
| The window's settings: a template's defaults, with the call's params applied. | |
| QVariantMap | params () const |
| See the params property. | |
| QVariantMap | objects () const |
| See the objects property. | |
| QVariantList | recentEvents (int seconds) const |
The events of the last seconds in the buffer, oldest first, each as event() gives one. | |
| QVariantMap | describe (QObject *object) const |
object's class chain, the most derived first, and each class's own properties: {className, classes: [{name, properties: [{name, type, writable, notifies}]}]}. | |
| QVariantMap | read (QObject *object, const QStringList &names) const |
The properties names of object: {name: {value, text, typeName}}, with text as object_inspect gives it. | |
| QVariantMap | describeValue (const QVariant &value) const |
What value is: {value, text, typeName}, and for an image a small "imageUrl". | |
| QObject * | model (QObject *object) const |
The model of object: itself if it is one, else the model of the view it is. | |
| QUrl | visualiser (const QString &typeName) const |
The value visualiser for values of type typeName, or an empty URL: the first components/values/<type>.qml in the libraries, in their usual order. | |
| void | event (const QVariantMap &event) |
| An event happened: {source, level, category, message, data, time, ...}. | |
Static Private Member Functions | |
| static QString | imageUrl (const QImage &image) |
image, at most 128 pixels on a side, as a PNG data URL. | |
Private Attributes | |
| Server * | m_server |
| Whose event buffer recentEvents() reads. | |
| QVariantMap | m_params |
| See the params property. | |
| QVariantMap | m_objects |
| See the objects property. | |
| std::function< QUrl(const QString &)> | m_visualiser |
| Finds a value visualiser. | |
| QHash< QString, QUrl > | m_visualisers |
| Visualisers found, by type name. | |
A window's own sonde object: Sonde's events, the window's settings and objects, and what QML can't find out by itself about objects and values (design 0034).
|
inline |
The window's settings: a template's defaults, with the call's params applied.
The objects the window was given, by name (null for an optional one not found).
The window's settings and objects; visualiser finds a value visualiser by type name. Re-emits bridge's events. A child of parent (the window's context).
|
inline |
The properties names of object: {name: {value, text, typeName}}, with text as object_inspect gives it.
A name it hasn't is left out.