Gecode::Gist::DrawingCursor Class Reference

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.

## Detailed Description

A cursor that draws a tree on a QWidget.

Definition at line 44 of file drawingcursor.hh.

## Constructor & Destructor Documentation

## DrawingCursor()

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.

## Member Function Documentation

## moveUpwards()

void Gecode::Gist::DrawingCursor::moveUpwards | ( | void |  | ) |

inline

Move cursor to parent.

Definition at line 37 of file drawingcursor.hpp.

## mayMoveDownwards()

bool Gecode::Gist::DrawingCursor::mayMoveDownwards | ( | void |  | ) |

inline

Test if cursor may move to child.

Definition at line 57 of file drawingcursor.hpp.

## moveDownwards()

void Gecode::Gist::DrawingCursor::moveDownwards | ( | void |  | ) |

inline

Move cursor to child.

Definition at line 65 of file drawingcursor.hpp.

## moveSidewards()

void Gecode::Gist::DrawingCursor::moveSidewards | ( | void |  | ) |

inline

Move cursor to sibling.

Definition at line 72 of file drawingcursor.hpp.

## processCurrentNode()

void Gecode::Gist::DrawingCursor::processCurrentNode | ( | void |  | ) |

Draw the node.

Definition at line 79 of file drawingcursor.cpp.

## Member Data Documentation

## red

const QColor Gecode::Gist::DrawingCursor::red

static

The color for failed nodes.

Red color for failed nodes.

Definition at line 61 of file drawingcursor.hh.

## green

const QColor Gecode::Gist::DrawingCursor::green

static

The color for solved nodes.

Green color for solved nodes.

Definition at line 63 of file drawingcursor.hh.

## blue

const QColor Gecode::Gist::DrawingCursor::blue

static

The color for choice nodes.

Blue color for choice nodes.

Definition at line 65 of file drawingcursor.hh.

## orange

const QColor Gecode::Gist::DrawingCursor::orange

static

The color for the best solution.

Orange color for best solutions.

Definition at line 67 of file drawingcursor.hh.

## white

const QColor Gecode::Gist::DrawingCursor::white

static

White color.

Definition at line 69 of file drawingcursor.hh.

## lightRed

const QColor Gecode::Gist::DrawingCursor::lightRed

static

The color for expanded failed nodes.

Red color for expanded failed nodes.

Definition at line 72 of file drawingcursor.hh.

## lightGreen

const QColor Gecode::Gist::DrawingCursor::lightGreen

static

The color for expanded solved nodes.

Green color for expanded solved nodes.

Definition at line 74 of file drawingcursor.hh.

## lightBlue

const QColor Gecode::Gist::DrawingCursor::lightBlue

static

The color for expanded choice nodes.

Blue color for expanded choice nodes.

Definition at line 76 of file drawingcursor.hh.

The documentation for this class was generated from the following files:

- gecode/gist/drawingcursor.hh
- gecode/gist/drawingcursor.cpp
- gecode/gist/drawingcursor.hpp