Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
mainwindow.hh
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Guido Tack <tack@gecode.org>
5 *
6 * Copyright:
7 * Guido Tack, 2006
8 *
9 * This file is part of Gecode, the generic constraint
10 * development environment:
11 * http://www.gecode.org
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining
14 * a copy of this software and associated documentation files (the
15 * "Software"), to deal in the Software without restriction, including
16 * without limitation the rights to use, copy, modify, merge, publish,
17 * distribute, sublicense, and/or sell copies of the Software, and to
18 * permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be
22 * included in all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 *
32 */
33
34#ifndef GECODE_GIST_MAINWINDOW_HH
35#define GECODE_GIST_MAINWINDOW_HH
36
37#include <gecode/gist.hh>
38#include <gecode/gist/qtgist.hh>
39
40namespace Gecode { namespace Gist {
41
43 class AboutGist : public QDialog {
44 public:
46 AboutGist(QWidget* parent = 0);
47 };
48
54 class GECODE_GIST_EXPORT GistMainWindow : public QMainWindow {
55 Q_OBJECT
56 private:
58 Options opt;
60 bool isSearching;
62 Support::Timer searchTimer;
64 QLabel* depthLabel;
66 QLabel* solvedLabel;
68 QLabel* failedLabel;
70 QLabel* choicesLabel;
72 QLabel* openLabel;
74 QMenu* solutionInspectorsMenu;
76 QMenu* doubleClickInspectorsMenu;
78 QMenu* moveInspectorsMenu;
80 QMenu* comparatorsMenu;
82 QMenu* bookmarksMenu;
84 QMenu* inspectNodeMenu;
86 QMenu* inspectNodeBeforeFPMenu;
88 QAction* prefAction;
89 protected:
93 QMenuBar* menuBar;
96
97 protected Q_SLOTS:
99 void statusChanged(const Statistics& stats, bool finished);
101 void about(void);
103 void preferences(bool setup=false);
107 void populateInspectors(void);
109 void populateBookmarks(void);
110 public:
112 GistMainWindow(Space* root, bool bab, const Options& opt);
113 protected:
115 void closeEvent(QCloseEvent* event);
116 };
117
118}}
119
120#endif
121
122
123// STATISTICS: gist-any
Display information about Gist.
Definition mainwindow.hh:43
AboutGist(QWidget *parent=0)
Constructor.
AboutGist aboutGist
About dialog.
Definition mainwindow.hh:95
QMenuBar * menuBar
A menu bar.
Definition mainwindow.hh:93
GistMainWindow(Space *root, bool bab, const Options &opt)
Constructor.
void about(void)
Open the about dialog.
void populateBookmarks(void)
Populate the bookmarks menus from the actions found in Gist.
void populateInspectors(void)
Populate the inspector menus from the actions found in Gist.
void preferences(bool setup=false)
Open the preferences dialog.
void closeEvent(QCloseEvent *event)
Close Gist.
void populateInspectorSelection(void)
Populate the inspector menus from the actions found in Gist.
void statusChanged(const Statistics &stats, bool finished)
The status has changed (e.g., new solutions have been found)
Gist * c
The contained Gist object.
Definition mainwindow.hh:91
Gecode Interactive Search Tool
Definition qtgist.hh:81
Options for Gist
Definition gist.hh:234
Statistics about the search tree
Definition spacenode.hh:59
Computation spaces.
Definition core.hpp:1744
#define GECODE_GIST_EXPORT
Definition gist.hh:65
int bab(Space *root, const Gist::Options &opt=Gist::Options::def)
Create a new stand-alone Gist for branch-and-bound search of root.
Definition gist.hpp:208
The Gecode Interactive Search Tool.
Gecode toplevel namespace