GammaRay API Documentation 3.4.1
GammaRay::ObjectModelBase< Base > Class Template Reference

A container for a generic Object Model derived from some Base. More...

#include <objectmodelbase.h>

Inheritance diagram for GammaRay::ObjectModelBase< Base >:

Public Member Functions

 ObjectModelBase (QObject *parent)
 Constructor.
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 Returns the number of columns in the specified model (currently this is always 2).
QVariant dataForObject (QObject *object, const QModelIndex &index, int role) const
 Returns the data for the specified object.
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 Returns the header data for the Object, given a section (column), orientation and role.
QMap< int, QVariant > itemData (const QModelIndex &index) const override

Detailed Description

template<typename Base>
class GammaRay::ObjectModelBase< Base >

A container for a generic Object Model derived from some Base.

Constructor & Destructor Documentation

◆ ObjectModelBase()

template<typename Base>
GammaRay::ObjectModelBase< Base >::ObjectModelBase ( QObject * parent)
inlineexplicit

Constructor.

Parameters
parentis the parent object for this instance.

Member Function Documentation

◆ columnCount()

template<typename Base>
int GammaRay::ObjectModelBase< Base >::columnCount ( const QModelIndex & parent = QModelIndex()) const
inlineoverride

Returns the number of columns in the specified model (currently this is always 2).

Parameters
parentis the model QModelIndex.
Returns
the column count for specified model.

◆ dataForObject()

template<typename Base>
QVariant GammaRay::ObjectModelBase< Base >::dataForObject ( QObject * object,
const QModelIndex & index,
int role ) const
inline

Returns the data for the specified object.

Parameters
objectis a pointer to a QObject.
indexis the model QModelIndex.
roleis the Qt role.
Returns
on success, a QVariant containing the data for the specified QObject; QVariant() if some anamoly occurs.

◆ headerData()

template<typename Base>
QVariant GammaRay::ObjectModelBase< Base >::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
inlineoverride

Returns the header data for the Object, given a section (column), orientation and role.

Parameters
sectionan integer (either 0 or 1) corresponding to the section (column).
orientationis the Qt::Orientation.
roleis the Qt role.
Returns
on success, a QVariant containing the header data; QVariant() if some anamoly occurs.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
GammaRay Qt-application inspection and manipulation tool
https://www.kdab.com/development-resources/qt-tools/gammaray/
Generated on for GammaRay API Documentation by doxygen 1.15.0