|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
Private: what the mouse tools (inputtools.cpp) and the keyboard tools (keyboardtools.cpp) share. More...
#include <sonde/objecttree.h>#include <sonde/server.h>#include <sonde/types.h>#include <QtCore/QCoreApplication>#include <QtCore/QEvent>#include <QtCore/QJsonObject>#include <QtCore/QList>#include <QtCore/QObject>#include <QtCore/QString>#include <functional>Go to the source code of this file.
Classes | |
| class | Sonde::Input::DeliveryRecorder |
| Records which objects receive the events the input tools inject. More... | |
| struct | Sonde::Input::DeliveryRecorder::Chain |
| One injected event and the objects it reached. More... | |
Namespaces | |
| namespace | Sonde |
| Embeddable Model Context Protocol server for Qt applications. | |
Functions | |
| bool | Sonde::Input::isWithin (const QObject *o, const QObject *ancestor) |
Whether o is ancestor or below it, following Qt Quick's visual parent ("parent" property) where there is one, else the QObject parent. | |
| QJsonObject | Sonde::Input::keyboardSchema (const QString &main, const QJsonObject &mainProperty, const QJsonObject &extra={ }) |
The argument schema of a keyboard tool: main (required), window, object, settleMs, plus extra. | |
| QString | Sonde::Input::windowText (QWindow *w) |
| describeWindow(), or "(window closed)" for a null window. | |
| void | Sonde::Input::finishAfterSettle (const ToolCall &call, std::function< QString()> summary) |
Finishes call after its settleMs and once scrolling views have stopped, with the text summary returns at that point. | |
| QString | Sonde::Input::focusSummary () |
| "Focus: <object>" for the current focus object. | |
| void | Sonde::Input::addTool (Server &server, const char *name, const char *title, const QString &description, const QJsonObject &schema, AsyncToolHandler handler) |
| Registers an asynchronous tool from its parts. | |
| void | Sonde::Input::installKeyboardTools (Server &server) |
| Registers input_keys and input_text (keyboardtools.cpp). | |
Variables | |
| constexpr qsizetype | Sonde::Input::kMaxDeliveries = 256 |
| Most deliveries one recorder keeps (input_text of a long string stops here). | |
Private: what the mouse tools (inputtools.cpp) and the keyboard tools (keyboardtools.cpp) share.
| void Sonde::Input::finishAfterSettle | ( | const ToolCall & | call, |
| std::function< QString()> | summary ) |
Finishes call after its settleMs and once scrolling views have stopped, with the text summary returns at that point.
The summary is computed after the wait, so it reports the application's state after it reacted (and must cope with windows that closed meanwhile). With settleMs 0 the tool replies at once, and only reports views still scrolling.