#include <beamtreescene.h>
Public Slots | |
void | setScale (int scale) |
void | resetColor () |
Public Member Functions | |
BeamTreeScene (QObject *parent=0) | |
void | render (node *dir) |
Erzeugt die Rechtecke, die das node-Objekt dir, sowie dessen Kinder repräsentieren. | |
void | draw () |
void | draw (float scale) |
Fügt die mittels render() erzeugten Rechtecke zur QGraphicsScene hinzu. | |
void | reset () |
void | hilight (node *n) |
void | setView (QGraphicsView *v) |
Protected Attributes | |
QGraphicsView * | view |
bool | timerRunning |
QPen | pen |
QBrush | oldBrush |
node * | oldNode |
QGraphicsSimpleTextItem * | textItem |
Nodes werden dabei durch Rechtecke repräsentiert, die in render() erzeugt bzw. in draw() zur QGraphicsScene hinzugefügt werden.
Definition at line 11 of file beamtreescene.h.
BeamTreeScene::BeamTreeScene | ( | QObject * | parent = 0 |
) |
void BeamTreeScene::render | ( | node * | dir | ) |
Erzeugt die Rechtecke, die das node-Objekt dir, sowie dessen Kinder repräsentieren.
Definition at line 10 of file beamtreescene.cpp.
References node::addParentOffset(), node::calculateRect(), node::getChildren(), node::getDepth(), node::isDir(), node::isVertical(), and pen.
Referenced by MainWindow::chooseFolder().
void BeamTreeScene::draw | ( | ) |
void BeamTreeScene::draw | ( | float | scale | ) |
Fügt die mittels render() erzeugten Rechtecke zur QGraphicsScene hinzu.
Definition at line 56 of file beamtreescene.cpp.
References node::isDir(), and node::isVertical().
void BeamTreeScene::reset | ( | ) |
void BeamTreeScene::hilight | ( | node * | n | ) |
Definition at line 87 of file beamtreescene.cpp.
References node::getPath(), oldBrush, oldNode, resetColor(), textItem, and timerRunning.
Referenced by MainWindow::setRoot().
void BeamTreeScene::setView | ( | QGraphicsView * | v | ) | [inline] |
Definition at line 28 of file beamtreescene.h.
References view.
Referenced by MainWindow::createCentralWidget().
void BeamTreeScene::setScale | ( | int | scale | ) | [slot] |
void BeamTreeScene::resetColor | ( | ) | [slot] |
Definition at line 100 of file beamtreescene.cpp.
References oldBrush, oldNode, textItem, and timerRunning.
Referenced by hilight().
QGraphicsView* BeamTreeScene::view [protected] |
bool BeamTreeScene::timerRunning [protected] |
QPen BeamTreeScene::pen [protected] |
QBrush BeamTreeScene::oldBrush [protected] |
node* BeamTreeScene::oldNode [protected] |
QGraphicsSimpleTextItem* BeamTreeScene::textItem [protected] |