Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
guiintegration.h File Reference

Sonde::GuiIntegration and the Sonde::Gui window helpers. More...

#include <sonde/expected.h>
#include <sonde/global.h>
#include <sonde/sonde_gui_export.h>
#include <QtCore/QJsonObject>
#include <QtCore/QList>
#include <QtCore/QMargins>
#include <QtCore/QModelIndex>
#include <QtCore/QObject>
#include <QtCore/QRectF>
#include <QtCore/QStringList>
#include <QtGui/QImage>
#include <memory>
#include <optional>

Go to the source code of this file.

Classes

struct  Sonde::ScreenRect
 Where something is on screen: the window that shows it, and its rectangle there. More...
struct  Sonde::OverflowFacts
 What an integration knows about how one object may overflow, for layout_overflow. More...
struct  Sonde::OpenPopup
 An open popup (menu, drop-down, tooltip) that belongs to an object, for layout_overflow. More...
class  Sonde::GuiIntegration
 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...

Namespaces

namespace  Sonde
 Embeddable Model Context Protocol server for Qt applications.
namespace  Sonde::Gui
 Window lookup, grabbing and geometry, dispatched to the registered GuiIntegration objects.

Enumerations

enum class  Sonde::ScrollToCell { Sonde::No , Sonde::Yes }
 Whether cellGeometry() may scroll the view to show the cell. More...

Functions

void Sonde::Gui::registerIntegration (std::unique_ptr< GuiIntegration > integration)
 Registers integration, replacing one with the same name().
Expected< QWindow * > Sonde::Gui::findWindow (const QString &spec)
 Finds a window.
QList< QWindow * > Sonde::Gui::visibleWindows ()
 All visible top-level windows.
Expected< ScreenRect > Sonde::Gui::objectGeometry (QObject *object)
 Where object is on screen (see GuiIntegration::objectGeometry()).
QObject * Sonde::Gui::objectForWindow (QWindow *window)
 The object representing window in the object tree: what an integration reports (its QWidget, say), else the window itself.
QObject * Sonde::Gui::objectAt (QWindow *window, const QPointF &pos)
 The deepest object at pos in window, or nullptr if there is none.
Expected< QImage > Sonde::Gui::grabWindow (QWindow *window)
 Renders window (device pixels).
QString Sonde::Gui::describeWindow (QWindow *window)
 One-line summary: @id Class "Title".
QAbstractItemModel * Sonde::Gui::modelFor (QObject *object)
 The item model object is or shows, or nullptr if none.
Expected< ScreenRect > Sonde::Gui::cellGeometry (QObject *view, const QModelIndex &index, ScrollToCell scroll)
 Where cell index of view is (see GuiIntegration::cellGeometry()).
Expected< QJsonObject > Sonde::Gui::layoutInfo (QObject *object)
 Layout facts about object (see GuiIntegration::layoutInfo()), or a failure if no integration knows its layout.
Expected< OverflowFacts > Sonde::Gui::overflowFacts (QObject *object)
 Overflow facts about object (see GuiIntegration::overflowFacts()), or a failure if no integration knows about it.
QList< OpenPopup > Sonde::Gui::openPopups (QObject *root)
 The open popups below root, from every integration (see GuiIntegration::openPopups()).
QObjectList Sonde::Gui::movingViews (QWindow *window)
 The views in window still scrolling, from every integration (see GuiIntegration::movingViews()).
QJsonObject Sonde::Gui::appInfo ()
 The fields every integration adds to app_info (see GuiIntegration::appInfo()).

Detailed Description

Sonde::GuiIntegration and the Sonde::Gui window helpers.