Go to the documentation of this file.
38 #include <QtGui/QPainter>
40 #include <QPrintDialog>
54 namespace Gecode {
namespace Gist {
59 , mutex(QMutex::Recursive)
60 , layoutMutex(QMutex::Recursive)
62 , compareNodes(false), compareNodesBeforeFP(false)
63 , autoHideFailed(true), autoZoom(false)
64 , refresh(500), refreshPause(0), smoothScrollAndZoom(false)
65 , moveDuringSearch(false)
67 , scrollTimeLine(1000), targetX(0), sourceX(0), targetY(0), sourceY(0)
68 , targetW(0), targetH(0), targetScale(0)
69 , layoutDoneTimerId(0) {
70 QMutexLocker locker(&
mutex);
80 int rootIdx =
na->allocate(rootSpace);
81 assert(rootIdx == 0); (void) rootIdx;
89 setAutoFillBackground(
true);
98 Qt::BlockingQueuedConnection);
100 this, SLOT(inspectSolution(
const Space*)));
104 Qt::BlockingQueuedConnection);
112 scaleBar =
new QSlider(Qt::Vertical,
this);
113 scaleBar->setObjectName(
"scaleBar");
117 connect(
scaleBar, SIGNAL(valueChanged(
int)),
127 qRegisterMetaType<Statistics>(
"Statistics");
187 QSize viewport_size =
size();
188 QAbstractScrollArea* sa =
189 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
192 zoomx = viewport_size.width()/2;
194 zoomy = viewport_size.height()/2;
196 int xoff = (sa->horizontalScrollBar()->value()+zoomx)/
scale;
197 int yoff = (sa->verticalScrollBar()->value()+zoomy)/
scale;
202 scale = (
static_cast<double>(scale0)) / 100.0;
210 sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
211 sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
212 sa->horizontalScrollBar()->setPageStep(viewport_size.width());
213 sa->verticalScrollBar()->setPageStep(viewport_size.height());
220 sa->horizontalScrollBar()->setValue(xoff-zoomx);
221 sa->verticalScrollBar()->setValue(yoff-zoomy);
229 QMutexLocker locker(&
mutex);
241 QSize viewport_size =
size();
242 QAbstractScrollArea* sa =
243 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
244 sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
245 sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
246 sa->horizontalScrollBar()->setPageStep(viewport_size.width());
247 sa->verticalScrollBar()->setPageStep(viewport_size.height());
266 QSize viewport_size =
size();
267 QAbstractScrollArea* sa =
268 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
269 sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
270 sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
299 SearcherThread::updateCanvas(
void) {
325 int scale0 =
static_cast<int>(t->
scale*100);
327 QWidget*
p = t->parentWidget();
330 static_cast<double>(
p->width()) / (bb.right - bb.left +
333 static_cast<double>(
p->height()) /
336 scale0 =
static_cast<int>(
std::min(newXScale, newYScale)*100);
341 double scale = (
static_cast<double>(scale0)) / 100.0;
385 std::stack<SearchItem> stck;
389 static_cast<long unsigned int>(depth+stck.size()));
405 if (
si.i ==
si.noOfChildren) {
417 if (
n->getStatus() ==
SOLVED) {
418 assert(
n->hasCopy());
426 if (
n->getStatus() !=
STOP )
432 static_cast<long unsigned int>(depth+stck.size()));
454 QMutexLocker locker(&
mutex);
460 QMutexLocker locker(&
mutex);
466 QMutexLocker locker(&
mutex);
475 QMutexLocker locker(&
mutex);
484 QMutexLocker locker(&
mutex);
494 QMutexLocker locker(&
mutex);
503 QMutexLocker locker(&
mutex);
518 int zoomCurrent =
static_cast<int>(
scale*100);
537 QWidget*
p = parentWidget();
540 static_cast<double>(
p->width()) / (bb.
right - bb.
left +
546 int scale0 =
static_cast<int>(
std::min(newXScale, newYScale)*100);
556 int zoomCurrent =
static_cast<int>(
scale*100);
557 int targetZoom = scale0;
569 QMutexLocker locker(&
mutex);
577 c =
c->getParent(*
na);
582 QAbstractScrollArea* sa =
583 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
585 x -= sa->viewport()->width() / 2;
586 y -= sa->viewport()->height() / 2;
588 sourceX = sa->horizontalScrollBar()->value();
592 sourceY = sa->verticalScrollBar()->value();
597 sa->horizontalScrollBar()->setValue(
targetX);
598 sa->verticalScrollBar()->setValue(
targetY);
612 QAbstractScrollArea* sa =
613 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
614 double p =
static_cast<double>(
i)/100.0;
617 sa->horizontalScrollBar()->setValue(
sourceX+
static_cast<int>(xdiff));
618 sa->verticalScrollBar()->setValue(
sourceY+
static_cast<int>(ydiff));
623 QMutexLocker locker(&
mutex);
630 int failedInspectorType = -1;
631 int failedInspector = -1;
632 bool needCentering =
false;
643 needCentering =
true;
655 failedInspectorType = 0;
668 failedInspectorType = -1;
704 "Something went wrong - probably an incorrect brancher");
714 switch (curSpace->
status()) {
719 curSpace->
commit(*
p->getChoice(),
727 if (inspectorNo==-1) {
730 failedInspectorType = 1;
733 failedInspectorType = -1;
737 failedInspectorType = 1;
738 failedInspector = inspectorNo;
740 failedInspectorType = -1;
747 switch (failedInspectorType) {
749 qFatal(
"Exception in move inspector %d: %s.\n Stopping.",
750 failedInspector, e.
what());
753 qFatal(
"Exception in double click inspector %d: %s.\n Stopping.",
754 failedInspector, e.
what());
757 qFatal(
"Exception: %s.\n Stopping.", e.
what());
775 QMutexLocker locker(&
mutex);
783 QMutexLocker locker(&
mutex);
791 TreeCanvas::inspectSolution(
const Space* s) {
792 int failedInspectorType = -1;
793 int failedInspector = -1;
800 failedInspectorType = 1;
803 failedInspectorType = -1;
807 }
catch (Exception& e) {
808 switch (failedInspectorType) {
810 qFatal(
"Exception in move inspector %d: %s.\n Stopping.",
811 failedInspector, e.what());
814 qFatal(
"Exception in solution inspector %d: %s.\n Stopping.",
815 failedInspector, e.what());
818 qFatal(
"Exception: %s.\n Stopping.", e.what());
832 QMutexLocker locker(&
mutex);
846 int rootIdx =
na->allocate(rootSpace);
847 assert(rootIdx == 0); (void) rootIdx;
865 QMutexLocker locker(&
mutex);
869 QInputDialog::getText(
this,
"Add bookmark",
"Name:",
870 QLineEdit::Normal,
"",&ok);
875 text = QString(
"Node ")+QString().setNum(
bookmarks.size());
890 QMutexLocker locker(&
mutex);
904 QMutexLocker locker(&
mutex);
909 while (nextAlt >= 0) {
920 QMutexLocker locker(&
mutex);
923 setCursor(QCursor(Qt::CrossCursor));
928 QMutexLocker locker(&
mutex);
931 setCursor(QCursor(Qt::CrossCursor));
941 QMutexLocker locker(&
mutex);
954 QMutexLocker locker(&
mutex);
977 QMutexLocker locker(&
mutex);
991 QMutexLocker locker(&
mutex);
995 if (alt + 1 <
p->getNumberOfChildren()) {
1005 QMutexLocker locker(&
mutex);
1012 QMutexLocker locker(&
mutex);
1030 #if QT_VERSION >= 0x040400
1031 QString filename = QFileDialog::getSaveFileName(
this, tr(
"Export tree as pdf"),
"", tr(
"PDF (*.pdf)"));
1032 if (filename !=
"") {
1033 QPrinter printer(QPrinter::ScreenResolution);
1034 QMutexLocker locker(&
mutex);
1037 printer.setFullPage(
true);
1041 printer.setOutputFileName(filename);
1042 QPainter painter(&printer);
1044 painter.setRenderHint(QPainter::Antialiasing);
1046 QRect pageRect = printer.pageRect();
1048 static_cast<double>(pageRect.width()) / (bb.
right - bb.
left +
1051 static_cast<double>(pageRect.height()) /
1054 double printScale =
std::min(newXScale, newYScale);
1055 painter.scale(printScale,printScale);
1060 QRect clip(0,0,0,0);
1073 #if QT_VERSION >= 0x040400
1074 exportNodePDF(
root);
1080 #if QT_VERSION >= 0x040400
1088 if (QPrintDialog(&printer,
this).exec() == QDialog::Accepted) {
1089 QMutexLocker locker(&
mutex);
1092 QRect pageRect = printer.pageRect();
1094 static_cast<double>(pageRect.width()) / (bb.
right - bb.
left +
1097 static_cast<double>(pageRect.height()) /
1100 double printScale =
std::min(newXScale, newYScale)*100;
1103 if (printScale > 400.0)
1105 printScale = printScale / 100.0;
1107 QPainter painter(&printer);
1108 painter.setRenderHint(QPainter::Antialiasing);
1109 painter.scale(printScale,printScale);
1110 painter.translate(
xtrans, 0);
1111 QRect clip(0,0,0,0);
1121 switch (
event->type()) {
1122 case QEvent::ToolTip:
1124 QHelpEvent* he =
static_cast<QHelpEvent*
>(
event);
1129 case QEvent::MouseButtonDblClick:
1130 case QEvent::MouseButtonPress:
1131 case QEvent::MouseButtonRelease:
1132 case QEvent::MouseMove:
1134 QMouseEvent* me =
static_cast<QMouseEvent*
>(
event);
1139 case QEvent::ContextMenu:
1141 QContextMenuEvent* ce =
static_cast<QContextMenuEvent*
>(
event);
1149 QAbstractScrollArea* sa =
1150 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
1151 int xoff = sa->horizontalScrollBar()->value()/
scale;
1152 int yoff = sa->verticalScrollBar()->value()/
scale;
1157 if (w < sa->viewport()->width())
1158 xoff -= (sa->viewport()->width()-w)/2;
1163 static_cast<int>((
y-30)/
scale+yoff));
1169 if (
mutex.tryLock()) {
1170 if (
event->type() == QEvent::ToolTip) {
1173 QHelpEvent* he =
static_cast<QHelpEvent*
>(
event);
1174 QToolTip::showText(he->globalPos(),
1178 QToolTip::hideText();
1183 return QWidget::event(
event);
1195 QPainter painter(
this);
1196 painter.setRenderHint(QPainter::Antialiasing);
1198 QAbstractScrollArea* sa =
1199 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
1200 int xoff = sa->horizontalScrollBar()->value()/
scale;
1201 int yoff = sa->verticalScrollBar()->value()/
scale;
1206 if (w < sa->viewport()->width())
1207 xoff -= (sa->viewport()->width()-w)/2;
1209 QRect origClip =
event->rect();
1210 painter.translate(0, 30);
1212 painter.translate(
xtrans-xoff, -yoff);
1213 QRect clip(
static_cast<int>(origClip.x()/
scale-
xtrans+xoff),
1214 static_cast<int>(origClip.y()/
scale+yoff),
1215 static_cast<int>(origClip.width()/
scale),
1216 static_cast<int>(origClip.height()/
scale));
1233 if (
mutex.tryLock()) {
1234 if(
event->button() == Qt::LeftButton) {
1250 if (
mutex.tryLock()) {
1266 QAbstractScrollArea* sa =
1267 static_cast<QAbstractScrollArea*
>(parentWidget()->parentWidget());
1269 int w = sa->horizontalScrollBar()->maximum()+e->oldSize().width();
1270 int h = sa->verticalScrollBar()->maximum()+e->oldSize().height();
1272 sa->horizontalScrollBar()->setRange(0,w-e->size().width());
1273 sa->verticalScrollBar()->setRange(0,h-e->size().height());
1274 sa->horizontalScrollBar()->setPageStep(e->size().width());
1275 sa->verticalScrollBar()->setPageStep(e->size().height());
1280 if (
event->modifiers() & Qt::ShiftModifier) {
1313 Space* curSpace = NULL;
1316 if (curSpace == NULL)
1321 qFatal(
"Exception in move inspector %d: %s.\n Stopping.",
1334 setCursor(QCursor(Qt::ArrowCursor));
1344 if (
mutex.tryLock()) {
1345 if (
event->button() == Qt::LeftButton) {
1351 Space* curSpace = NULL;
1352 Space* compareSpace = NULL;
1355 if (curSpace == NULL) {
1363 switch (compareSpace->
status()) {
1368 compareSpace->
commit(*
p->getChoice(),
1369 n->getAlternative(*
na));
1377 comparators[
i].first->compare(*curSpace,*compareSpace);
1379 qFatal(
"Exception in comparator %d: %s.\n Stopping.",
1389 setCursor(QCursor(Qt::ArrowCursor));
int refreshPause
Time (in msec) to pause after each refresh.
@ UNDETERMINED
Node that has not been explored yet.
const int maxAutoZoomScale
Maximum scale factor for automatic zoom.
A cursor that frees all memory.
const int minScale
Minimum scale factor.
int targetX
Target x coordinate after smooth scrolling.
Post propagator for SetVar x
VisualNode * findNode(const NodeAllocator &na, int x, int y)
Find a node in this subtree at coordinates x, y.
Post propagator for SetVar SetOpType SetVar y
A stack item for depth first search.
void navRight(void)
Move selection to the right sibling of the selected node.
void dirtyUp(const NodeAllocator &na)
Mark all nodes up the path to the parent as dirty.
void labelPath(void)
Label all branches on path to root node.
bool getMoveDuringSearch(void)
Return preference whether to move cursor during search.
@ SS_SOLVED
Space is solved (no brancher left)
int maxDepth
Maximum depth of the tree.
void resizeEvent(QResizeEvent *event)
Handle resize event.
const int maxScale
Maximum scale factor.
void stopSearch(void)
Stop current search.
bool compareNodes
Whether node comparison action is running.
int right
Right coordinate.
@ STOP
Node representing stop point.
void search(VisualNode *n, bool all, TreeCanvas *ti)
void statusChanged(VisualNode *, const Statistics &, bool)
Status bar update.
void pathUp(const NodeAllocator &na)
Set all nodes from the node to the root to be on the path.
void addDoubleClickInspector(Inspector *i)
Add inspector i.
Abstract base class for comparators.
Node class that supports visual layout
Space * clone(bool share_data=true, bool share_info=true, CloneStatistics &stat=unused_clone) const
Clone space.
void autoZoomChanged(bool)
The auto-zoom state was changed.
const Space * getWorkingSpace(void) const
Return working space (if present).
void navDown(void)
Move selection to the first child of the selected node.
VisualNode * root
The root node of the tree.
void setBookmarked(bool m)
Set bookmark of this node.
virtual const char * what(void) const
Return information.
T * dfs(T *s, const Search::Options &o)
Invoke depth-first search engine for subclass T of space s with options o.
QSlider * scaleBar
The scale bar.
void centerCurrentNode(void)
Center the view on the currently selected node.
void hideFailed(const NodeAllocator &na, bool onlyDirty=false)
Hide all failed subtrees of this node.
unsigned int size(I &i)
Size of all ranges of range iterator i.
NodeStatus getStatus(void) const
Return current status of the node.
bool getSmoothScrollAndZoom(void)
Return preference whether to use smooth scrolling and zooming.
int getPathAlternative(const NodeAllocator &na)
Return the alternative of the child that is on the path (-1 if none)
void navPrevSol(void)
Move selection to previous solution (in DFS order)
bool isBookmarked(void)
Return whether node is bookmarked.
int noOfChildren
The number of children.
Gecode::IntArgs i(4, 1, 2, 3, 4)
@ SS_BRANCH
Space must be branched (at least one brancher left)
void navRoot(void)
Move selection to the root node.
void setPath(void)
Set the current node to be the head of the path.
void emitStatusChanged(void)
Re-emit status change information for current node.
void commit(const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
Commit choice c for alternative a.
const FloatNum min
Smallest allowed float value.
QVector< QPair< Inspector *, bool > > solutionInspectors
The registered solution inspectors, and whether they are active.
double scale
Current scale factor.
Abstract base class for inspectors.
int a_d
The adaptive recomputation distance.
bool isOnPath(void)
Return whether node is on the path.
void exportPDF(void)
Export pdf of the current subtree.
bool finish(void)
Stop search and wait for it to finish.
void setRefreshPause(int i)
Set refresh pause in msec.
void navLeft(void)
Move selection to the left sibling of the selected node.
void purge(const NodeAllocator &na)
Clear working space and copy (if present and this is not the root).
void inspectPath(void)
Call the double click inspector for all nodes on the path from root to head of the path.
int targetW
Target width after layout.
bool isRoot(void) const
Check if this node is the root of a tree.
bool autoHideFailed
Whether to hide failed subtrees automatically.
Space * getSpace(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Return working space. Receiver must delete the space.
bool getAutoHideFailed(void)
Return preference whether to automatically hide failed subtrees.
void setSmoothScrollAndZoom(bool b)
Set preference whether to use smooth scrolling and zooming.
void searchFinished(void)
Signals that Gist is finished.
~TreeCanvas(void)
Destructor.
bool showCopies
Whether to show copies in the tree.
void paintEvent(QPaintEvent *event)
Paint the tree.
Gecode toplevel namespace
VarImp * x
Pointer to variable implementation.
void hideFailed(void)
Hide failed subtrees of selected node.
bool isOpen(void)
Return whether this node still has open children.
bool autoZoom
Whether to zoom automatically.
BestNode * curBest
The currently best solution (for branch-and-bound)
void setRefresh(int i)
Set refresh rate.
SearcherThread searcher
Search engine thread.
void addMoveInspector(Inspector *i)
Add inspector i.
VisualNode * pathHead
The head of the currently selected path.
A cursor that draws a tree on a QWidget.
void navNextSol(bool back=false)
Move selection to next solution (in DFS order)
void navUp(void)
Move selection to the parent of the selected node.
bool moveDuringSearch
Whether to move cursor during search.
void activateComparator(int i, bool active)
Set active comparator.
int getAlternative(const NodeAllocator &na) const
Return alternative number of this node.
int targetScale
Target scale after layout.
void toggleStop(const NodeAllocator &na)
Do not stop at this node.
void setAutoZoom(bool b)
Set preference whether to automatically zoom to fit.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
VisualNode * currentNode
The currently selected node.
void unhideAll(const NodeAllocator &na)
Unhide all nodes in the subtree of this node.
int sourceY
Target y coordinate after smooth scrolling.
QVector< QPair< Inspector *, bool > > doubleClickInspectors
The registered click inspectors, and whether they are active.
void layout(const NodeAllocator &na)
Compute layout for the subtree of this node.
void addSolutionInspector(Inspector *i)
Add inspector i.
void zoomToFit(void)
Zoom the canvas so that the whole tree fits.
Space * snapshot(Space *s, const Options &o, bool share=true)
Clone space s dependening on options o.
int xtrans
Offset on the x axis so that the tree is centered.
void setMarked(bool m)
Set mark of this node.
NodeAllocatorBase< VisualNode > NodeAllocator
int getNumberOfChildNodes(NodeAllocator &na, BestNode *curBest, Statistics &stats, int c_d, int a_d)
Compute and return the number of children.
int targetH
Target height after layout.
void contextMenu(QContextMenuEvent *)
Context menu triggered.
Statistics stats
Statistics about the search tree.
void toggleHidden(const NodeAllocator &na)
Toggle whether this node is hidden.
Static reference to the currently best space.
void toggleStop(void)
Do not stop at selected stop node.
void mouseDoubleClickEvent(QMouseEvent *event)
Handle mouse double click event.
int getChild(int n) const
Return index of child no n.
void startCompareNodes(void)
Wait for click on node to compare with current node.
A cursor that finds the next solution.
A canvas that displays the search tree.
Cursor & getCursor(void)
Return the cursor.
void scaleChanged(int)
The scale factor has changed.
void unhideAll(void)
Unhide all nodes below selected node.
void addComparator(Comparator *c)
Add comparator c.
void scaleTree(int scale0, int zoomx=-1, int zoomy=-1)
Set scale factor to scale0.
QMutex layoutMutex
Mutex for synchronizing layout and drawing.
void setMoveDuringSearch(bool b)
Set preference whether to move cursor during search.
@ BRANCH
Node representing a branch.
virtual void timerEvent(QTimerEvent *e)
Timer invoked for smooth zooming and scrolling.
#define GECODE_NEVER
Assert that this command is never executed.
int getParent(void) const
Return the parent.
void run(void)
Execute visitor.
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
void searchFinished(void)
int layoutDoneTimerId
Timer id for delaying the update.
void inspectBeforeFP(void)
Calls inspectCurrentNode(false)
void setAutoHideFailed(bool b)
Set preference whether to automatically hide failed subtrees.
void searchOne(void)
Find next solution below selected node.
void moveToNode(VisualNode *n, bool)
TreeCanvas(Space *rootSpace, bool bab, QWidget *parent, const Options &opt)
Constructor.
void searchAll(void)
Explore complete subtree of selected node.
BoundingBox getBoundingBox(void)
Return the bounding box.
void solution(const Space *)
bool isHidden(void)
Return if node is hidden.
void wheelEvent(QWheelEvent *event)
Handle mouse wheel events.
void labelBranches(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels in subtree.
bool hasCopy(void)
Return whether the node has a copy.
void unstopAll(const NodeAllocator &na)
Do not stop at any stop node in the subtree of this node.
void scroll(void)
React to scroll events.
const int defScale
Default scale factor.
void removedBookmark(int idx)
Signals that a bookmark has been removed.
Statistics about the search tree
void exportWholeTreePDF(void)
Export pdf of the whole tree.
void startCompareNodesBeforeFP(void)
Wait for click on node to compare with current node before fixpoint.
void addedBookmark(const QString &id)
Signals that a bookmark has been added.
int targetY
Target y coordinate after smooth scrolling.
void labelPath(NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
Create or clear branch labels on path to root.
void activateDoubleClickInspector(int i, bool active)
Set active inspector.
void resizeToOuter(void)
Resize to the outer widget size if auto zoom is enabled.
QVector< QPair< Comparator *, bool > > comparators
The registered comparators, and whether they are active.
void contextMenuEvent(QContextMenuEvent *event)
Handle context menu event.
int i
The currently explored child.
int bab(Space *root, const Gist::Options &opt)
Create a new stand-alone Gist for branch-and-bound search of root.
Run a cursor over a tree, processing nodes in pre-order.
void solution(const Space *)
Signals that a solution has been found.
void setCurrentNode(VisualNode *n, bool finished=true, bool update=true)
Set the selected node to n.
QMutex mutex
Mutex for synchronizing acccess to the tree.
void update(int w, int h, int scale0)
bool event(QEvent *event)
General event handler, used for displaying tool tips.
QTimeLine zoomTimeLine
Timer for smooth zooming.
bool smoothScrollAndZoom
Whether to use smooth scrolling and zooming.
void activateSolutionInspector(int i, bool active)
Set active inspector.
QTimeLine scrollTimeLine
Timer for smooth scrolling.
void update(void)
Update display.
Gecode::FloatVal c(-8, 8)
bool getShowCopies(void)
Return preference whether to show copies in the tree.
@ UNSTOP
Node representing ignored stop point.
void layoutDone(int w, int h, int scale0)
Layout done.
bool stopSearchFlag
Flag signalling the search to stop.
QVector< QPair< Inspector *, bool > > moveInspectors
The registered move inspectors, and whether they are active.
bool finishedFlag
Flag signalling that Gist is ready to be closed.
int n
Number of negative literals for node type.
QVector< VisualNode * > bookmarks
The bookmarks map.
int sourceX
Source x coordinate after smooth scrolling.
void print(void)
Print the tree.
void unPathUp(const NodeAllocator &na)
Set all nodes from the node to the root not to be on the path.
Shape * getShape(void)
Return the shape of this node.
void activateMoveInspector(int i, bool active)
Set active inspector.
@ FAILED
Node representing failure.
void unstopAll(void)
Do not stop at any stop node.
int depth(void) const
Return depth of the shape.
bool compareNodesBeforeFP
Whether node comparison action computes fixpoint.
void setShowCopies(bool b)
Set preference whether to show copies in the tree.
@ SS_FAILED
Space is failed
int p
Number of positive literals for node type.
void toggleHidden(void)
Toggle hidden state of selected node.
VisualNode * eventNode(QEvent *event)
Return the node corresponding to the event position.
void labelBranches(void)
Label all branches in subtree under current node.
const FloatNum max
Largest allowed float value.
bool getAutoZoom(void)
Return preference whether to automatically zoom to fit.
Node::NodeAllocator * na
Allocator for nodes.
SearchItem(VisualNode *n0, int noOfChildren0)
Constructor.
@ SOLVED
Node representing a solution.
void bookmarkNode(void)
Bookmark current node.
void setRecompDistances(int c_d, int a_d)
Set recomputation distances.
void mousePressEvent(QMouseEvent *event)
Handle mouse press event.
Exception: Base-class for exceptions
void inspectCurrentNode(bool fix=true, int inspectorNo=-1)
Call the double click inspector for the currently selected node.
int c_d
The recomputation distance.