mainwindow.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Copyright:
* Guido Tack, 2006
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef GECODE_GIST_MAINWINDOW_HH
#define GECODE_GIST_MAINWINDOW_HH
#include <gecode/gist.hh>
#include <gecode/gist/qtgist.hh>
namespace Gecode { namespace Gist {
class AboutGist : public QDialog {
public:
AboutGist(QWidget* parent = 0);
};
class GECODE_GIST_EXPORT GistMainWindow : public QMainWindow {
Q_OBJECT
private:
Options opt;
bool isSearching;
Support::Timer searchTimer;
QLabel* depthLabel;
QLabel* solvedLabel;
QLabel* failedLabel;
QLabel* choicesLabel;
QLabel* openLabel;
QMenu* solutionInspectorsMenu;
QMenu* doubleClickInspectorsMenu;
QMenu* moveInspectorsMenu;
QMenu* comparatorsMenu;
QMenu* bookmarksMenu;
QMenu* inspectNodeMenu;
QMenu* inspectNodeBeforeFPMenu;
QAction* prefAction;
protected:
Gist* c;
QMenuBar* menuBar;
AboutGist aboutGist;
protected Q_SLOTS:
void statusChanged(const Statistics& stats, bool finished);
void about(void);
void preferences(bool setup=false);
void populateInspectorSelection(void);
void populateInspectors(void);
void populateBookmarks(void);
public:
GistMainWindow(Space* root, bool bab, const Options& opt);
protected:
void closeEvent(QCloseEvent* event);
};
}}
#endif
// STATISTICS: gist-any
Gecode::Gist::AboutGist
Display information about Gist.
Definition mainwindow.hh:43
Gecode::Gist::AboutGist::AboutGist
AboutGist(QWidget *parent=0)
Constructor.
Definition mainwindow.cpp:43
Gecode::Gist::GistMainWindow::aboutGist
AboutGist aboutGist
About dialog.
Definition mainwindow.hh:95
Gecode::Gist::GistMainWindow::menuBar
QMenuBar * menuBar
A menu bar.
Definition mainwindow.hh:93
Gecode::Gist::GistMainWindow::GistMainWindow
GistMainWindow(Space *root, bool bab, const Options &opt)
Constructor.
Definition mainwindow.cpp:77
Gecode::Gist::GistMainWindow::about
void about(void)
Open the about dialog.
Definition mainwindow.cpp:276
Gecode::Gist::GistMainWindow::populateBookmarks
void populateBookmarks(void)
Populate the bookmarks menus from the actions found in Gist.
Definition mainwindow.cpp:313
Gecode::Gist::GistMainWindow::populateInspectors
void populateInspectors(void)
Populate the inspector menus from the actions found in Gist.
Definition mainwindow.cpp:321
Gecode::Gist::GistMainWindow::preferences
void preferences(bool setup=false)
Open the preferences dialog.
Definition mainwindow.cpp:281
Gecode::Gist::GistMainWindow::closeEvent
void closeEvent(QCloseEvent *event)
Close Gist.
Definition mainwindow.cpp:226
Gecode::Gist::GistMainWindow::populateInspectorSelection
void populateInspectorSelection(void)
Populate the inspector menus from the actions found in Gist.
Definition mainwindow.cpp:300
Gecode::Gist::GistMainWindow::statusChanged
void statusChanged(const Statistics &stats, bool finished)
The status has changed (e.g., new solutions have been found).
Definition mainwindow.cpp:234
Gecode::Gist::GistMainWindow::c
Gist * c
The contained Gist object.
Definition mainwindow.hh:91
Gecode::Gist::Gist
Gecode Interactive Search Tool
Definition qtgist.hh:81
Gecode::Gist::Options
Options for Gist
Definition gist.hh:234
Gecode::Gist::Statistics
Statistics about the search tree
Definition spacenode.hh:59
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::Support::Timer
Timer
Definition timer.hpp:51
gist.hh
GECODE_GIST_EXPORT
#define GECODE_GIST_EXPORT
Definition gist.hh:65
Gecode::Gist::bab
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
Gecode::Gist
The Gecode Interactive Search Tool.
Gecode
Gecode toplevel namespace
qtgist.hh