|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
Hooks that let a UI toolkit built on QtGui (Qt Widgets, Qt Quick or your own) tell the GUI tools how to grab, hit-test and locate its objects. More...
#include <guiintegration.h>
Public Member Functions | |
| virtual | ~GuiIntegration () |
| Destroys the integration. | |
| virtual QString | name () const =0 |
| Unique name; registering another integration with the same name replaces this one. | |
| virtual Expected< QImage > | grabWindow (QWindow *window) |
| Renders the window's contents. | |
| virtual Expected< ScreenRect > | objectGeometry (QObject *object) |
Where object is on screen. | |
| virtual Expected< QObject * > | objectForWindow (QWindow *window) |
| The object that represents a top-level window in the object tree (e.g. | |
| virtual Expected< QObjectList > | children (QObject *object) |
Visual children of object if they differ from QObject::children(), or notHandled(). | |
| virtual Expected< QObject * > | objectAt (QWindow *window, const QPointF &pos) |
The deepest object at pos (window coordinates), or notHandled(). | |
| virtual Expected< QAbstractItemModel * > | model (QObject *object) |
The item model object shows (it is a view, combo box, ...), or notHandled(). | |
| virtual Expected< ScreenRect > | cellGeometry (QObject *view, const QModelIndex &index, ScrollToCell scroll) |
Where cell index of view view is on screen. | |
| virtual Expected< QJsonObject > | layoutInfo (QObject *object) |
Layout facts about object for layout_explain (size hints, policies, margins, clipping, ...), or notHandled(). | |
| virtual Expected< OverflowFacts > | overflowFacts (QObject *object) |
What this integration knows about how object may overflow, or notHandled(). | |
| virtual QList< OpenPopup > | openPopups (QObject *root) |
The open popups that belong to root or an object below it. | |
| virtual QObjectList | movingViews (QWindow *window) |
The views in window still scrolling on their own: a flick, kinetic scrolling, or an animated wheel scroll. | |
| virtual QJsonObject | appInfo () |
| Fields this integration adds to app_info's answer, such as the state of a feature it provides. | |
Hooks that let a UI toolkit built on QtGui (Qt Widgets, Qt Quick or your own) tell the GUI tools how to grab, hit-test and locate its objects.
Every method has a "not handled" default, so an integration only implements what it knows about. Integrations are consulted in registration order until one handles a request: a hook returns notHandled() for an object that isn't its own, so the next integration is asked, and a failure() for one that is but can't be answered for (it is hidden, say), which ends the search with that error (design 0031).
|
inlinevirtual |
Fields this integration adds to app_info's answer, such as the state of a feature it provides.
Every integration is asked.
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration.
|
inlinevirtual |
Where cell index of view view is on screen.
| view | The view showing the cell's model. |
| index | The cell. |
| scroll | Whether to scroll the view so the cell is visible first. |
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
Visual children of object if they differ from QObject::children(), or notHandled().
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration.
|
inlinevirtual |
Renders the window's contents.
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
Layout facts about object for layout_explain (size hints, policies, margins, clipping, ...), or notHandled().
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
The item model object shows (it is a view, combo box, ...), or notHandled().
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
The views in window still scrolling on their own: a flick, kinetic scrolling, or an animated wheel scroll.
Every integration is asked.
A press on a moving view stops it instead of reaching what is under it, so the input tools wait for these to stop before they reply.
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
pure virtual |
Unique name; registering another integration with the same name replaces this one.
Implemented in anonymous_namespace{test_windows.cpp}::NullIntegration, Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
The deepest object at pos (window coordinates), or notHandled().
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
The object that represents a top-level window in the object tree (e.g.
its QWidget), or notHandled() to use the QWindow itself.
Reimplemented in Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
Where object is on screen.
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
The open popups that belong to root or an object below it.
Every integration is asked, and the lists are joined.
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.
|
inlinevirtual |
What this integration knows about how object may overflow, or notHandled().
Reimplemented in Sonde::anonymous_namespace{quickintegration.cpp}::QuickIntegration, and Sonde::anonymous_namespace{widgetsintegration.cpp}::WidgetsIntegration.