Node item. More...
#include </local/robotpkg/var/tmp/robotpkg/graphics/qt-qgv/work/qgv-1.1.0/QGVCore/QGVNode.h>
Public Types | |
enum | { Type = UserType + 2 } |
Public Member Functions | |
~QGVNode () | |
QString | label () const |
void | setLabel (const QString &label) |
QRectF | boundingRect () const |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
void | setAttribute (const QString &label, const QString &value) |
QString | getAttribute (const QString &name) const |
QString | posToAttributeString () const |
void | setIcon (const QImage &icon) |
int | type () const |
void | updateLayout () |
Protected Member Functions | |
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
Friends | |
class | QGVScene |
class | QGVSubGraph |
Node item.
QGVNode::~QGVNode | ( | ) |
QRectF QGVNode::boundingRect | ( | ) | const |
Referenced by paint().
QString QGVNode::getAttribute | ( | const QString & | name | ) | const |
References QGVNodePrivate::node().
Referenced by itemChange(), label(), paint(), and updateLayout().
|
protected |
QString QGVNode::label | ( | ) | const |
References getAttribute().
Referenced by paint(), and QGVScene::setRootNode().
void QGVNode::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget = 0 |
||
) |
References boundingRect(), getAttribute(), label(), and QGVCore::toColor().
QString QGVNode::posToAttributeString | ( | ) | const |
References QGVCore::centerToOrigin(), DotDefaultDPI, QGVGraphPrivate::graph(), QGVCore::graphHeight(), QGVNodePrivate::node(), and QGVCore::qtToGvPos().
Referenced by QGVScene::setNodePositionAttribute().
void QGVNode::setAttribute | ( | const QString & | label, |
const QString & | value | ||
) |
References QGVNodePrivate::node().
Referenced by itemChange(), setLabel(), and QGVScene::setNodePositionAttribute().
void QGVNode::setIcon | ( | const QImage & | icon | ) |
void QGVNode::setLabel | ( | const QString & | label | ) |
References setAttribute().
Referenced by QGVScene::addNode().
|
inline |
void QGVNode::updateLayout | ( | ) |
References QGVCore::centerToOrigin(), DotDefaultDPI, getAttribute(), QGVGraphPrivate::graph(), QGVCore::graphHeight(), QGVNodePrivate::node(), QGVCore::toBrushStyle(), QGVCore::toColor(), QGVCore::toPath(), QGVCore::toPenStyle(), and QGVCore::toPoint().
Referenced by QGVScene::applyLayout(), and QGVScene::loadLayout().
|
friend |
|
friend |