34#ifndef GECODE_GIST_QTGIST_HH
35#define GECODE_GIST_QTGIST_HH
45#if !defined(GIST_STATIC_LIBS) && \
46 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
48#ifdef GECODE_BUILD_GIST
49#define GECODE_GIST_EXPORT __declspec( dllexport )
51#define GECODE_GIST_EXPORT __declspec( dllimport )
56#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
57#define GECODE_GIST_EXPORT __attribute__ ((visibility("default")))
59#define GECODE_GIST_EXPORT
65#ifndef GECODE_BUILD_GIST
66#define GECODE_LIBRARY_NAME "Gist"
70namespace Gecode {
namespace Gist {
91 QAction* nullSolutionInspector;
93 QMenu* solutionInspectorMenu;
95 QAction* nullDoubleClickInspector;
97 QMenu* doubleClickInspectorMenu;
99 QAction* nullMoveInspector;
101 QMenu* moveInspectorMenu;
103 QAction* nullComparator;
105 QMenu* comparatorMenu;
107 QAction* nullBookmark;
109 QMenu* bookmarksMenu;
111 QMenu* inspectNodeMenu;
113 QMenu* inspectNodeBeforeFPMenu;
261 void on_canvas_contextMenu(QContextMenuEvent*);
265 void selectDoubleClickInspector(QAction*);
267 void selectSolutionInspector(QAction*);
269 void selectMoveInspector(QAction*);
271 void selectComparator(QAction*);
273 void selectBookmark(QAction*);
275 void addBookmark(
const QString&
id);
277 void removeBookmark(
int idx);
279 void populateInspectors(
void);
281 void populateBookmarksMenu(
void);
283 void showStats(
void);
285 void inspectWithAction(QAction* a);
287 void inspectBeforeFPWithAction(QAction* a);
Abstract base class for comparators.
int getAd(void)
Return adaptive recomputation distance.
QAction * toggleStop
Bookmark current node.
QAction * hideFailed
Hide failed subtrees under current node.
void setRefresh(int i)
Set refresh rate.
QAction * navUp
Navigate to parent node.
void setShowCopies(bool b)
Set preference whether to show copies in the tree.
bool getMoveDuringSearch(void)
Return preference whether to move cursor during search.
QAction * compareNodeBeforeFP
Compare current node to other node before fixpoint.
void addDoubleClickInspector(Inspector *i0)
Add double click inspector i0.
QAction * inspectPath
Inspect all nodes on selected path.
QAction * exportPDF
Export PDF of current subtree.
void resizeEvent(QResizeEvent *)
Handle resize event.
QAction * bookmarkNode
Bookmark current node.
QAction * print
Print tree.
void addComparator(Comparator *c0)
Add comparator c0.
QAction * stop
Stop search.
QAction * unstopAll
Bookmark current node.
QAction * zoomToFit
Zoom tree to fit window.
bool getAutoHideFailed(void)
Return preference whether to automatically hide failed subtrees.
QActionGroup * inspectBeforeFPGroup
Group of all actions for direct inspector selection.
QAction * navRight
Navigate to right sibling.
void setAutoHideFailed(bool b)
Set preference whether to automatically hide failed subtrees.
void setAutoZoom(bool b)
Set preference whether to automatically zoom to fit.
QAction * navNextSol
Navigate to next solution (to the left)
QAction * searchNext
Search next solution in current subtree.
QAction * setPath
Set path from current node to the root.
QAction * labelBranches
Label branches under current node.
bool getShowCopies(void)
Return preference whether to show copies in the tree.
QAction * navLeft
Navigate to left sibling.
void setSmoothScrollAndZoom(bool b)
Set preference whether to use smooth scrolling and zooming.
void addMoveInspector(Inspector *i0)
Add move inspector i0.
QActionGroup * solutionInspectorGroup
Group of all actions for solution inspectors.
QAction * navDown
Navigate to leftmost child node.
QActionGroup * moveInspectorGroup
Group of all actions for move inspectors.
void setMoveDuringSearch(bool b)
Set preference whether to move cursor during search.
bool getSmoothScrollAndZoom(void)
Return preference whether to use smooth scrolling and zooming.
void addSolutionInspector(Inspector *i0)
Add solution inspector i0.
bool getAutoZoom(void)
Return preference whether to automatically zoom to fit.
QAction * navPrevSol
Navigate to previous solution (to the right)
QAction * center
Center on current node.
void setRefreshPause(int i)
Set refresh pause in msec.
QAction * compareNode
Compare current node to other node.
QAction * reset
Reset Gist.
void statusChanged(const Statistics &, bool)
Signals that the tree has changed.
QAction * toggleHidden
Toggle whether current node is hidden.
void solution(const Space *)
Signals that a solution has been found.
bool finish(void)
Stop search and wait until finished.
QAction * searchAll
Search all solutions in current subtree.
QAction * navRoot
Navigate to root node.
QActionGroup * inspectGroup
Group of all actions for direct inspector selection.
QAction * labelPath
Label branches on path to root.
QAction * showNodeStats
Open node statistics inspector.
Gist(Space *root, bool bab, QWidget *parent, const Options &opt)
Constructor.
QActionGroup * doubleClickInspectorGroup
Group of all actions for double click inspectors.
QAction * exportWholeTreePDF
Export PDF of whole tree.
QActionGroup * comparatorGroup
Group of all actions for comparators.
QAction * inspect
Inspect current node.
void setRecompDistances(int c_d, int a_d)
Set recomputation parameters c_d and a_d.
void searchFinished(void)
Signals that Gist is ready to be closed.
void addInspector(Inspector *i, QAction *&nas, QAction *&nad, QAction *&nam)
Add inspector i0.
QAction * unhideAll
Unhide all hidden subtrees under current node.
QActionGroup * bookmarksGroup
Group of all actions for bookmarks.
QAction * inspectBeforeFP
Inspect current node before fixpoint.
int getCd(void)
Return recomputation distance.
Abstract base class for inspectors.
Display information about nodes.
Statistics about the search tree
A canvas that displays the search tree.
Node class that supports visual layout
#define GECODE_GIST_EXPORT
int bab(Space *root, const Gist::Options &opt=Gist::Options::def)
Create a new stand-alone Gist for branch-and-bound search of root.
Gecode toplevel namespace