1 #ifndef FRECHETVIEWAPPLICATION_H 2 #define FRECHETVIEWAPPLICATION_H 4 #include <QApplication> 5 #include <QFileSystemWatcher> 17 namespace frechet {
namespace app {
21 using namespace reach;
24 using namespace input;
125 void init(QString file);
137 int commandLineInterface(QString inputFile,
Algorithm algo,
bool topo,
138 double accuracy,
double epsilon)
throw(std::exception);
165 void fileOpened(QString file);
170 void algorithmChanged(
int algo);
179 void open(
bool firstTime=
false);
184 void open(QString filePath);
189 return frechetViewApp;
195 windowClosed(window);
196 QApplication::quit();
204 if (currentId) saveFileSettings(settings,currentId);
225 void resetAlgorithms();
228 void showAboutDialog();
230 void createDesktopEntry();
232 void editInputFile();
235 void startStopDecidePolygon();
237 void startStopOptimiseCurve();
239 void startStopApproximateCurve();
241 void startStopOptimisePolygon();
243 void startStopApproximatePolygon();
246 void startKBruteForce();
248 void cancelBackgroundJob();
258 void saveFileSettings(QSettings& settings,
size_t histId);
264 void restoreFileSettings(QSettings& settings,
size_t histId);
269 bool showFirstTimeHint();
275 bool setupCurves(
bool topo=
false);
279 void startStopDecidePolygon(
double epsilon);
282 void startStopOptimiseCurve(
double approx);
285 void startStopOptimisePolygon(
double approx);
288 void installLinuxDesktopIcons(QSettings&);
290 void installLinuxDesktopEntries(QSettings&);
292 QString linuxDesktopFile();
294 bool populateBookmarks();
301 void cli_setup(QString inputFile,
Algorithm algo);
307 int cli_decideKFrechet(
double epsilon);
310 static void copyContents(QByteArray contents, QString path);
312 static void copyFile(QString src, QString dest);
317 #endif // FRECHETVIEWAPPLICATION_H static FrechetViewApplication * instance()
WorkerJobHandle * backgroundJob()
poly::Algorithm::ptr getPolyAlgorithm()
size_t currentId
reference to current File
InputReader reader
reads files from disk
QString execPath
path to executable file
global definitions for all algorithms.
The single application window.
double epsMax
maximum value for epsilon
boost::shared_ptr< Algorithm > ptr
(smart) pointer to an Algorithm object
void saveSettings(QSettings &settings)
store settings to application preferences
Algorithm currentAlgorithm() const
poly::Algorithm::ptr polyAlgorithm
the algorithm for simple polygons and curves (if available)
Algorithm
we have three Fréchet Distance algorithms
QFileSystemWatcher * fileWatch
base class for algorithm for simple polygons.
keeps track of recently used files.
FSPath::ptr fspath
the feasible path (if available)
FileHistory history
Open Recent file history.
k::kAlgorithm::ptr kAlgorithm
the k-Frechet algorithm (if available)
MainWindow * window
the main window
boost::shared_ptr< FSPath > ptr
smart pointer to an FSPath object
bool currentAlgorithm(Algorithm alg) const
test current algorithm
QPolygonF Curve
a polygonal curve in the plane; with double floating point precision. This type is heavily used throu...
static FrechetViewApplication * frechetViewApp
singleton instance
TriState
GPU support (for headless mode only)
void windowClosed(QMainWindow *)
called when the main window is closed by the user
FreeSpace::ptr getFreeSpace()
boost::shared_ptr< Grid > ptr
smart pointer to a Grid object
Thread safe access to a WorkerJob.
the application singleton
kAlgorithm::ptr getKAlgorithm()
void quit()
quit the application, closing all resources and windows
FreeSpace::ptr freeSpace
the free-space diagram
DataPath path
pointer to input data within an xml file
boost::shared_ptr< kAlgorithm > ptr
smart pointer to an kAlgorithm object
boost::shared_ptr< FreeSpace > ptr
smart pointer to FreeSpace object
Algorithm _currentAlgorithm
selects current Algorithm