| 57 | } |
| 58 | |
| 59 | void |
| 60 | Monitor::Node::paint(QPainter *painter,const QStyleOptionGraphicsItem *option,QWidget *widget) |
| 61 | { |
| 62 | // set the node color |
| 63 | QPen pen; |
| 64 | pen.setColor(treeNode_->color(1).value<QColor>()); |
| 65 | painter->setPen(pen); |
| 66 | |
| 67 | // call the base class to draw the text. |
| 68 | this->QGraphicsTextItem::paint(painter, option, widget); |
| 69 | |
| 70 | // put a border around the node |
| 71 | painter->drawRect (boundingRect().adjusted(2, 2, -2, -2)); |
| 72 | |
| 73 | } |
| 74 | |
| 75 | void |
| 76 | Monitor::Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) |