GammaRay API Documentation  2.11.0
Public Member Functions | List of all members
GammaRay::ToolFactory Class Referenceabstract

An abstract interface for probe tools. More...

#include <toolfactory.h>

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

Public Member Functions

virtual QString id () const =0
 Unique id of this tool. More...
 
virtual void init (Probe *probe)=0
 Initialize the tool. More...
 
virtual bool isHidden () const
 Allows to hide a plug-in from the UI. More...
 
virtual QVector< QByteArrayselectableTypes () const
 Class names of types this tool can select. More...
 
void setSupportedTypes (const QVector< QByteArray > &types)
 Set names of supported classes. More...
 
const QVector< QByteArray > & supportedTypes () const
 Class names of types this tool can handle. More...
 
QString supportedTypesString () const
 Class names of types this tool can handle as a string. More...
 

Detailed Description

An abstract interface for probe tools.

The ToolFactory class is an abstract base class for creating probe tools for GammaRay. Each tool must have a unique identifier.

Member Function Documentation

virtual QString GammaRay::ToolFactory::id ( ) const
pure virtual

Unique id of this tool.

Returns
a QString containing the tool id.

Implemented in GammaRay::StandardToolFactory< Type, Tool >.

virtual void GammaRay::ToolFactory::init ( Probe probe)
pure virtual

Initialize the tool.

Implement this method to do non-GUI initialization, such as creating object tracking models etc.

Parameters
probeThe probe interface allowing access to the object models.

Implemented in GammaRay::StandardToolFactory< Type, Tool >.

virtual bool GammaRay::ToolFactory::isHidden ( ) const
virtual

Allows to hide a plug-in from the UI.

This is useful for plug-ins that only provide support for additional data types. The value is usually filled in by the plug-in loader

Returns
true if the plug-in has no tool view.
Since
2.1
virtual QVector<QByteArray> GammaRay::ToolFactory::selectableTypes ( ) const
virtual

Class names of types this tool can select.

This must be a subset of supportedTypes(), and is used to check if this tool is a viable candidate for object navigation. When returning an non-empty result here, you must handle the Probe::objectSelected() signal.

void GammaRay::ToolFactory::setSupportedTypes ( const QVector< QByteArray > &  types)

Set names of supported classes.

See also
supportedTypes()
Since
2.5
const QVector<QByteArray>& GammaRay::ToolFactory::supportedTypes ( ) const

Class names of types this tool can handle.

The tool will only be activated if an object of one of these types is seen in the probed application.

Returns
a QVector<QByteArray> of class names of types this tool supports.
QString GammaRay::ToolFactory::supportedTypesString ( ) const

Class names of types this tool can handle as a string.

Returns
a comma separated QString of class names of types this tool supports.

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