
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. More... | |
Public Member Functions inherited from Gecode::Gist::NodeCursor< VisualNode > | |
| VisualNode * | node (void) |
| Return current node. More... | |
| NodeCursor (VisualNode *theNode, const typename VisualNode::NodeAllocator &na) | |
| Construct cursor, initially set to theNode. More... | |
| unsigned int | alternative (void) |
| Return current alternative. More... | |
| void | alternative (unsigned int a) |
| Set current alternative. More... | |
| bool | mayMoveUpwards (void) |
| Test if the cursor may move to the parent node. More... | |
| void | moveUpwards (void) |
| Move cursor to the parent node. More... | |
| bool | mayMoveDownwards (void) |
| Test if cursor may move to the first child node. More... | |
| void | moveDownwards (void) |
| Move cursor to the first child node. More... | |
| bool | mayMoveSidewards (void) |
| Test if cursor may move to the first sibling. More... | |
| void | moveSidewards (void) |
| Move cursor to the first sibling. More... | |
Static Public Attributes | |
| static const QColor | red |
| The color for failed nodes. More... | |
| static const QColor | green |
| The color for solved nodes. More... | |
| static const QColor | blue |
| The color for choice nodes. More... | |
| static const QColor | orange |
| The color for the best solution. More... | |
| static const QColor | white |
| White color. More... | |
| static const QColor | lightRed |
| The color for expanded failed nodes. More... | |
| static const QColor | lightGreen |
| The color for expanded solved nodes. More... | |
| static const QColor | lightBlue |
| The color for expanded choice nodes. More... | |
Cursor interface | |
| void | moveUpwards (void) |
| Move cursor to parent. More... | |
| bool | mayMoveDownwards (void) |
| Test if cursor may move to child. More... | |
| void | moveDownwards (void) |
| Move cursor to child. More... | |
| void | moveSidewards (void) |
| Move cursor to sibling. More... | |
| void | processCurrentNode (void) |
| Draw the node. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Gecode::Gist::NodeCursor< VisualNode > | |
| void | node (VisualNode *n) |
| Set current node to n. More... | |
| VisualNode * | startNode (void) |
| Return start node. More... | |
Protected Attributes inherited from Gecode::Gist::NodeCursor< VisualNode > | |
| const VisualNode::NodeAllocator & | na |
| The node allocator. More... | |
A cursor that draws a tree on a QWidget.
Definition at line 48 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 70 of file drawingcursor.cpp.
|
inline |
Move cursor to parent.
Definition at line 41 of file drawingcursor.hpp.
|
inline |
Test if cursor may move to child.
Definition at line 61 of file drawingcursor.hpp.
|
inline |
Move cursor to child.
Definition at line 69 of file drawingcursor.hpp.
|
inline |
Move cursor to sibling.
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.
|
static |
The color for failed nodes.
Red color for failed nodes.
Definition at line 65 of file drawingcursor.hh.
|
static |
The color for solved nodes.
Green color for solved nodes.
Definition at line 67 of file drawingcursor.hh.
|
static |
The color for choice nodes.
Blue color for choice nodes.
Definition at line 69 of file drawingcursor.hh.
|
static |
The color for the best solution.
Orange color for best solutions.
Definition at line 71 of file drawingcursor.hh.
|
static |
White color.
Definition at line 73 of file drawingcursor.hh.
|
static |
The color for expanded failed nodes.
Red color for expanded failed nodes.
Definition at line 76 of file drawingcursor.hh.
|
static |
The color for expanded solved nodes.
Green color for expanded solved nodes.
Definition at line 78 of file drawingcursor.hh.
|
static |
The color for expanded choice nodes.
Blue color for expanded choice nodes.
Definition at line 80 of file drawingcursor.hh.