TasTraverseUtils Class Reference

#include <ext/app/exttesttools/tastraverseutils.h>

class TasTraverseUtils
Public Member Functions
TasTraverseUtils()
~TasTraverseUtils()
voidaddFont(TasObject *, QFont)
QPair< QPoint, QPoint >addGraphicsItemCoordinates(TasObject *, QGraphicsItem *, TasCommand *)
voidaddObjectDetails(TasObject *, QObject *)
voidaddTextInfo(TasObject *, const QString &, const QFont &, qreal, Qt::TextElideMode)
voidaddVariantValue(TasAttribute &, const QVariant &)
voidclearFilter()
voidcreateFilter(TasCommand *)
QString getParentId(QObject *)
boolincludeAttribute(const QString &)
voidprintGraphicsItemProperties(TasObject *, QGraphicsItem *)
voidprintProperties(TasObject *, QObject *)

Detailed Description

Utility functions for traversers. Note that if you use filters always clear after use to make sure that a filter is not on when not wanted. Normally filters are not needed.

Constructor & Destructor Documentation

TasTraverseUtils ( )

TasTraverseUtils()

~TasTraverseUtils ( )

~TasTraverseUtils()

Member Function Documentation

addFont ( TasObject *, QFont )

voidaddFont(TasObject *objectInfo,
QFontfont
)

Adds font details to the item. The prefix can be used in situations where one item can have multiple fonts.

addGraphicsItemCoordinates ( TasObject *, QGraphicsItem *, TasCommand * )

QPair< QPoint, QPoint >addGraphicsItemCoordinates(TasObject *objectInfo,
QGraphicsItem *graphicsItem,
TasCommand *command
)

return the 1) xy coodrinates of the item, 2) the absolute xy coordinate. Coordinate 0,0 is returned if data not available.

addObjectDetails ( TasObject *, QObject * )

voidaddObjectDetails(TasObject *objectData,
QObject *object
)

addTextInfo ( TasObject *, const QString &, const QFont &, qreal, Qt::TextElideMode )

voidaddTextInfo(TasObject *objectInfo,
const QString &text,
const QFont &font,
qrealwidth,
Qt::TextElideModemode = Qt::ElideRight
)

Add details about the text into the attribute. Including elide and coded details. Add the elided text, e.g. "This is a long text" -> "This is a long ...", into attributes

addVariantValue ( TasAttribute &, const QVariant & )

voidaddVariantValue(TasAttribute &attr,
const QVariant &value
)

clearFilter ( )

voidclearFilter()

Clears the filter.

createFilter ( TasCommand * )

voidcreateFilter(TasCommand *command)

Createst a filter from the given data. A filter must always be cleared after use.

getParentId ( QObject * )

QString getParentId(QObject *object)

includeAttribute ( const QString & )

boolincludeAttribute(const QString &attributeName)

printGraphicsItemProperties ( TasObject *, QGraphicsItem * )

voidprintGraphicsItemProperties(TasObject *objectInfo,
QGraphicsItem *graphicsItem
)

Print graphicsitem details that could be usable to the model.

printProperties ( TasObject *, QObject * )

voidprintProperties(TasObject *objectData,
QObject *object
)