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. | |
Public Member Functions inherited from Gecode::Gist::NodeCursor< VisualNode > | |
NodeCursor (VisualNode *theNode, const typename VisualNode::NodeAllocator &na) | |
Construct cursor, initially set to theNode. | |
unsigned int | alternative (void) |
Return current alternative. | |
bool | mayMoveUpwards (void) |
Test if the cursor may move to the parent node. | |
void | moveUpwards (void) |
Move cursor to the parent node. | |
bool | mayMoveDownwards (void) |
Test if cursor may move to the first child node. | |
void | moveDownwards (void) |
Move cursor to the first child node. | |
bool | mayMoveSidewards (void) |
Test if cursor may move to the first sibling. | |
void | moveSidewards (void) |
Move cursor to the first sibling. |
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. |
Additional Inherited Members | |
Protected Member Functions inherited from Gecode::Gist::NodeCursor< VisualNode > | |
void | node (VisualNode *n) |
Set current node to n. | |
VisualNode * | startNode (void) |
Return start node. | |
Protected Attributes inherited from Gecode::Gist::NodeCursor< VisualNode > | |
const VisualNode::NodeAllocator & | na |
The node allocator. |
A cursor that draws a tree on a QWidget.
Definition at line 44 of file drawingcursor.hh.
Gecode::Gist::DrawingCursor::DrawingCursor | ( | VisualNode * | root, |
const VisualNode::NodeAllocator & | na, | ||
BestNode * | curBest0, | ||
QPainter & | painter0, | ||
const QRect & | clippingRect0, | ||
bool | showCopies ) |
Constructor.
Definition at line 65 of file drawingcursor.cpp.
|
inline |
Move cursor to parent.
Definition at line 37 of file drawingcursor.hpp.
|
inline |
Test if cursor may move to child.
Definition at line 57 of file drawingcursor.hpp.
|
inline |
Move cursor to child.
Definition at line 65 of file drawingcursor.hpp.
|
inline |
Move cursor to sibling.
Definition at line 72 of file drawingcursor.hpp.
void Gecode::Gist::DrawingCursor::processCurrentNode | ( | void | ) |
Draw the node.
Definition at line 79 of file drawingcursor.cpp.
|
static |
The color for failed nodes.
Red color for failed nodes.
Definition at line 61 of file drawingcursor.hh.
|
static |
The color for solved nodes.
Green color for solved nodes.
Definition at line 63 of file drawingcursor.hh.
|
static |
The color for choice nodes.
Blue color for choice nodes.
Definition at line 65 of file drawingcursor.hh.
|
static |
The color for the best solution.
Orange color for best solutions.
Definition at line 67 of file drawingcursor.hh.
|
static |
White color.
Definition at line 69 of file drawingcursor.hh.
|
static |
The color for expanded failed nodes.
Red color for expanded failed nodes.
Definition at line 72 of file drawingcursor.hh.
|
static |
The color for expanded solved nodes.
Green color for expanded solved nodes.
Definition at line 74 of file drawingcursor.hh.
|
static |
The color for expanded choice nodes.
Blue color for expanded choice nodes.
Definition at line 76 of file drawingcursor.hh.