GammaRay  2.2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
GammaRay::ProbeInterface Class Referenceabstract

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

#include <probeinterface.h>

Public Member Functions

virtual QAbstractItemModel * connectionModel () const =0
 
virtual void discoverObject (QObject *object)=0
 
virtual bool filterObject (QObject *object) const =0
 
virtual bool hasReliableObjectTracking () const =0
 
virtual void installGlobalEventFilter (QObject *filter)=0
 
virtual QAbstractItemModel * objectListModel () const =0
 
virtual QAbstractItemModel * objectTreeModel () const =0
 
virtual QObject * probe () const =0
 
virtual void registerModel (const QString &objectName, QAbstractItemModel *model)=0
 
virtual void registerSignalSpyCallbackSet (const QSignalSpyCallbackSet &callbacks)=0
 
virtual void selectObject (QObject *object, 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 QAbstractItemModel* GammaRay::ProbeInterface::connectionModel ( ) const
pure virtual

Returns the connection model.

Returns
a pointer to a QAbstractItemModel instance.
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 hasReliableObjectTracking() returns false.

See Also
hasReliableObjectTracking()
Since
2.0
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.
virtual bool GammaRay::ProbeInterface::hasReliableObjectTracking ( ) const
pure virtual

Returns true if we have working hooks in QtCore, that is we are notified reliably about every QObject creation/destruction. If this is not 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.0
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.

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

Returns the object list model.

Returns
a pointer to a QAbstractItemModel instance.
virtual QAbstractItemModel* GammaRay::ProbeInterface::objectTreeModel ( ) const
pure virtual

Returns the object tree model.

Returns
a pointer to a QAbstractItemModel instance.
virtual QObject* GammaRay::ProbeInterface::probe ( ) const
pure virtual

Returns the probe QObject for connecting signals.

Returns
a pointer to a QObject instance.
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.
virtual void GammaRay::ProbeInterface::registerSignalSpyCallbackSet ( const QSignalSpyCallbackSet &  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
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
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

The documentation for this class was generated from the following file:

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