A cursor that draws a tree on a QWidget. More...
#include <drawingcursor.hh>
Public Member Functions | |
DrawingCursor (VisualNode *root, const VisualNode::NodeAllocator &na, BestNode *curBest0, QPainter &painter0, const QRect &clippingRect0, bool showCopies) | |
Constructor. | |
Static Public Attributes | |
static const QColor | red |
The color for failed nodes. | |
static const QColor | green |
The color for solved nodes. | |
static const QColor | blue |
The color for choice nodes. | |
static const QColor | orange |
The color for the best solution. | |
static const QColor | white |
White color. | |
static const QColor | lightRed |
The color for expanded failed nodes. | |
static const QColor | lightGreen |
The color for expanded solved nodes. | |
static const QColor | lightBlue |
The color for expanded choice nodes. | |
Cursor interface | |
void | moveUpwards (void) |
Move cursor to parent. | |
bool | mayMoveDownwards (void) |
Test if cursor may move to child. | |
void | moveDownwards (void) |
Move cursor to child. | |
void | moveSidewards (void) |
Move cursor to sibling. | |
void | processCurrentNode (void) |
Draw the node. |
A cursor that draws a tree on a QWidget.
Gecode::Gist::DrawingCursor::DrawingCursor | ( | VisualNode * | root, |
const VisualNode::NodeAllocator & | na, | ||
BestNode * | curBest0, | ||
QPainter & | painter0, | ||
const QRect & | clippingRect0, | ||
bool | showCopies | ||
) |
Constructor.
Definition at line 70 of file drawingcursor.cpp.
void Gecode::Gist::DrawingCursor::moveUpwards | ( | void | ) | [inline] |
Move cursor to parent.
Reimplemented from Gecode::Gist::NodeCursor< VisualNode >.
Definition at line 41 of file drawingcursor.hpp.
bool Gecode::Gist::DrawingCursor::mayMoveDownwards | ( | void | ) | [inline] |
Test if cursor may move to child.
Reimplemented from Gecode::Gist::NodeCursor< VisualNode >.
Definition at line 61 of file drawingcursor.hpp.
void Gecode::Gist::DrawingCursor::moveDownwards | ( | void | ) | [inline] |
Move cursor to child.
Reimplemented from Gecode::Gist::NodeCursor< VisualNode >.
Definition at line 69 of file drawingcursor.hpp.
void Gecode::Gist::DrawingCursor::moveSidewards | ( | void | ) | [inline] |
Move cursor to sibling.
Reimplemented from Gecode::Gist::NodeCursor< VisualNode >.
Definition at line 76 of file drawingcursor.hpp.
void Gecode::Gist::DrawingCursor::processCurrentNode | ( | void | ) |
Draw the node.
Definition at line 84 of file drawingcursor.cpp.
const QColor Gecode::Gist::DrawingCursor::red [static] |
The color for failed nodes.
Red color for failed nodes.
Definition at line 65 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::green [static] |
The color for solved nodes.
Green color for solved nodes.
Definition at line 67 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::blue [static] |
The color for choice nodes.
Blue color for choice nodes.
Definition at line 69 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::orange [static] |
The color for the best solution.
Orange color for best solutions.
Definition at line 71 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::white [static] |
White color.
Definition at line 73 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::lightRed [static] |
The color for expanded failed nodes.
Red color for expanded failed nodes.
Definition at line 76 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::lightGreen [static] |
The color for expanded solved nodes.
Green color for expanded solved nodes.
Definition at line 78 of file drawingcursor.hh.
const QColor Gecode::Gist::DrawingCursor::lightBlue [static] |
The color for expanded choice nodes.
Blue color for expanded choice nodes.
Definition at line 80 of file drawingcursor.hh.