#include <ext/app/exttesttools/tastraverseutils.h>
class TasTraverseUtils |
Public Member Functions | |
---|---|
TasTraverseUtils() | |
~TasTraverseUtils() | |
void | addFont(TasObject *, QFont) |
QPair< QPoint, QPoint > | addGraphicsItemCoordinates(TasObject *, QGraphicsItem *, TasCommand *) |
void | addObjectDetails(TasObject *, QObject *) |
void | addTextInfo(TasObject *, const QString &, const QFont &, qreal, Qt::TextElideMode) |
void | addVariantValue(TasAttribute &, const QVariant &) |
void | clearFilter() |
void | createFilter(TasCommand *) |
QString | getParentId(QObject *) |
bool | includeAttribute(const QString &) |
void | printGraphicsItemProperties(TasObject *, QGraphicsItem *) |
void | printProperties(TasObject *, QObject *) |
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.
TasTraverseUtils | ( | ) |
~TasTraverseUtils | ( | ) |
void | addFont | ( | TasObject * | objectInfo, |
QFont | font | |||
) |
Adds font details to the item. The prefix can be used in situations where one item can have multiple fonts.
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.
void | addObjectDetails | ( | TasObject * | objectData, |
QObject * | object | |||
) |
void | addTextInfo | ( | TasObject * | objectInfo, |
const QString & | text, | |||
const QFont & | font, | |||
qreal | width, | |||
Qt::TextElideMode | mode = 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
void | addVariantValue | ( | TasAttribute & | attr, |
const QVariant & | value | |||
) |
void | createFilter | ( | TasCommand * | command | ) |
Createst a filter from the given data. A filter must always be cleared after use.
QString | getParentId | ( | QObject * | object | ) |
bool | includeAttribute | ( | const QString & | attributeName | ) |
void | printGraphicsItemProperties | ( | TasObject * | objectInfo, |
QGraphicsItem * | graphicsItem | |||
) |
Print graphicsitem details that could be usable to the model.
void | printProperties | ( | TasObject * | objectData, |
QObject * | object | |||
) |