Updraft  1.0
Open source glider flight visualisation tool.
updraft.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_CORE_UPDRAFT_H_
00002 #define UPDRAFT_SRC_CORE_UPDRAFT_H_
00003 
00004 #include <QApplication>
00005 
00006 #include "splashscreen.h"
00007 
00009 #define updraft (static_cast<Updraft*>(Updraft::instance()))
00010 
00011 class QDir;
00012 
00013 namespace Updraft {
00014 
00015 class SettingInterface;
00016 
00017 namespace Util {
00018   class Ellipsoid;
00019 }
00020 
00021 namespace Core {
00022 
00023 class MainWindow;
00024 class FileTypeManager;
00025 class PluginManager;
00026 class SceneManager;
00027 class SettingsManager;
00028 class TranslationManager;
00029 class StateSaver;
00030 
00032 class Updraft : public QApplication {
00033   Q_OBJECT
00034 
00035  public:
00036   Updraft(int argc, char** argv);
00037   ~Updraft();
00038 
00041   int exec();
00042 
00044   void hideSplash();
00045 
00049   QDir getDataDirectory();
00050 
00055   QDir getResourcesDirectory();
00056 
00059   QDir getTranslationDirectory();
00060 
00061   QDir currentDataDirectory;
00062   SettingInterface* dataDirectory;
00063 
00064   MainWindow* mainWindow;
00065   FileTypeManager* fileTypeManager;
00066   PluginManager* pluginManager;
00067   SceneManager* sceneManager;
00068   SettingsManager* settingsManager;
00069   TranslationManager* translationManager;
00070   StateSaver* stateSaver;
00071 
00072   // Returns the currently set ellipsoid for measurements.
00073   Util::Ellipsoid* getUsedEllipsoid();
00074 
00075   // List of ellipsoid models used in Updraft.
00076   QList<Util::Ellipsoid*> ellipsoids;
00077 
00078   SettingInterface* usedEllipsoid;
00079 
00080  private slots:
00081   void dataDirectoryChanged();
00082 
00083  private:
00084   void coreSettings();
00085 
00088   bool checkDataDirectory();
00089 
00092   void createEllipsoids();
00093 
00094   SplashScreen splash;
00095 
00096   bool dataDirectoryChangeInProgress;
00097 
00109   bool copyDirectory(
00110     QDir srcDir,
00111     QDir dstDir,
00112     int* progress = NULL,
00113     QProgressDialog* dialog = NULL);
00114 
00127   bool moveDataDirectory(QDir oldDir, QDir newDir, QProgressDialog* dialog);
00128 };
00129 
00130 }  // End namespace Core
00131 }  // End namespace Updraft
00132 
00133 #endif  // UPDRAFT_SRC_CORE_UPDRAFT_H_
00134 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines