GammaRay API Documentation  2.7.0
Public Member Functions | List of all members
GammaRay::ProbeInterface Class Referenceabstract

An abstract interface for accessing the core GammaRay probe. More...

#include <probeinterface.h>

Inheritance diagram for GammaRay::ProbeInterface:
Inheritance graph
[legend]

Public Member Functions

virtual void discoverObject (QObject *object)=0
 
virtual bool filterObject (QObject *object) const =0
 
virtual void installGlobalEventFilter (QObject *filter)=0
 
virtual bool needsObjectDiscovery () const =0
 
virtual QAbstractItemModelobjectListModel () const =0
 
virtual QAbstractItemModelobjectTreeModel () const =0
 
virtual QObjectprobe () const =0
 
virtual void registerModel (const QString &objectName, QAbstractItemModel *model)=0
 
virtual void registerSignalSpyCallbackSet (const SignalSpyCallbackSet &callbacks)=0
 
virtual void selectObject (QObject *object, const QPoint &pos=QPoint())=0
 
virtual void selectObject (QObject *object, const QString &toolId, const QPoint &pos=QPoint())=0
 
virtual void selectObject (void *object, const QString &typeName)=0
 

Detailed Description

An abstract interface for accessing the core GammaRay probe.

The ProbeInterface is an abstract interface that allows one to access the core GammaRay probe without linking to it.

Member Function Documentation

virtual void GammaRay::ProbeInterface::discoverObject ( QObject object)
pure virtual

Notify the probe about QObjects your plug-in can discover by using information about the types it can handle. Only use this if needsObjectDiscovery() returns true to maximise performance.

See also
needsObjectDiscovery()
Since
2.0

Implemented in GammaRay::Probe.

virtual bool GammaRay::ProbeInterface::filterObject ( QObject object) const
pure virtual

Determines if the specified QObject belongs to the GammaRay Probe or Window.

These objects should not be tracked or shown to the user, hence must be explictly filtered.

Parameters
objectis a pointer to a QObject instance.
Returns
true if the specified QObject belongs to the GammaRay Probe or Window; false otherwise.

Implemented in GammaRay::Probe.

virtual void GammaRay::ProbeInterface::installGlobalEventFilter ( QObject filter)
pure virtual

Install a global event filter. Use this rather than installing the filter manually on QCoreApplication, this will filter out GammaRay-internal events and objects already for you.

Implemented in GammaRay::Probe.

virtual bool GammaRay::ProbeInterface::needsObjectDiscovery ( ) const
pure virtual

Returns true if we haven't been able to track all objects from startup, ie. usually when attaching at runtime. If this is the case, we try to discover QObjects by walking the hierarchy, starting from known singletons, and by watching out for unknown receivers of events. This is far from complete obviously, and plug-ins can help finding more objects, using specific knowledge about the types they are responsible for.

Connect to the objectAdded(QObject*) signal on probe(), and call discoverObject(QObject*) for "your" objects.

Since
2.5

Implemented in GammaRay::Probe.

virtual QAbstractItemModel* GammaRay::ProbeInterface::objectListModel ( ) const
pure virtual

Returns the object list model.

Returns
a pointer to a QAbstractItemModel instance.

Implemented in GammaRay::Probe.

virtual QAbstractItemModel* GammaRay::ProbeInterface::objectTreeModel ( ) const
pure virtual

Returns the object tree model.

Returns
a pointer to a QAbstractItemModel instance.

Implemented in GammaRay::Probe.

virtual QObject* GammaRay::ProbeInterface::probe ( ) const
pure virtual

Returns the probe QObject for connecting signals.

Returns
a pointer to a QObject instance.

Implemented in GammaRay::Probe.

virtual void GammaRay::ProbeInterface::registerModel ( const QString objectName,
QAbstractItemModel model 
)
pure virtual

Register a model for remote usage.

Parameters
objectNameunique identifier for the model, typically in reverse domain notation.

Implemented in GammaRay::Probe.

virtual void GammaRay::ProbeInterface::registerSignalSpyCallbackSet ( const SignalSpyCallbackSet callbacks)
pure virtual

Register a signal spy callback set. Signal indexes provided as arguments are mapped to method indexes, ie. argument semantics are the same with Qt4 and Qt5.

Since
2.2

Implemented in GammaRay::Probe.

virtual void GammaRay::ProbeInterface::selectObject ( QObject object,
const QPoint pos = QPoint() 
)
pure virtual

Notify the probe about the user selecting one of "your" objects via in-app interaction. If you know the exact position the user interacted with, pass that in as pos.

Since
2.0

Implemented in GammaRay::Probe.

virtual void GammaRay::ProbeInterface::selectObject ( void *  object,
const QString typeName 
)
pure virtual

Notify the probe about the user selecting one of "your" objects.

Since
2.1

Implemented in GammaRay::Probe.


Klarälvdalens Datakonsult AB (KDAB)
"The Qt Experts"
https://www.kdab.com/
GammaRay
Qt-application inspection and manipulation tool
https://www.kdab.com/gammaray/