Updraft
1.0
Open source glider flight visualisation tool.
|
Top level object of updraft project. More...
#include <updraft.h>
Public Member Functions | |
Updraft (int argc, char **argv) | |
~Updraft () | |
int | exec () |
Executes the application. | |
void | hideSplash () |
Hides the splash screen when the application is done loading. | |
QDir | getDataDirectory () |
Gets the data directory. | |
QDir | getResourcesDirectory () |
Gets the resources directory. | |
QDir | getTranslationDirectory () |
Gets the directory where the translations are located. | |
Util::Ellipsoid * | getUsedEllipsoid () |
Public Attributes | |
QDir | currentDataDirectory |
SettingInterface * | dataDirectory |
MainWindow * | mainWindow |
FileTypeManager * | fileTypeManager |
PluginManager * | pluginManager |
SceneManager * | sceneManager |
SettingsManager * | settingsManager |
TranslationManager * | translationManager |
StateSaver * | stateSaver |
QList< Util::Ellipsoid * > | ellipsoids |
SettingInterface * | usedEllipsoid |
Private Slots | |
void | dataDirectoryChanged () |
Private Member Functions | |
void | coreSettings () |
bool | checkDataDirectory () |
Checks and possibly creates the data directory. | |
void | createEllipsoids () |
Initializes the ellipsoids used for the measurements inside the application. | |
bool | copyDirectory (QDir srcDir, QDir dstDir, int *progress=NULL, QProgressDialog *dialog=NULL) |
An auxilliary method for directory copying. | |
bool | moveDataDirectory (QDir oldDir, QDir newDir, QProgressDialog *dialog) |
Moves the data directory from one location to another. | |
Private Attributes | |
SplashScreen | splash |
bool | dataDirectoryChangeInProgress |
Top level object of updraft project.
Updraft::Core::Updraft::Updraft | ( | int | argc, |
char ** | argv | ||
) |
bool Updraft::Core::Updraft::checkDataDirectory | ( | ) | [private] |
Checks and possibly creates the data directory.
bool Updraft::Core::Updraft::copyDirectory | ( | QDir | srcDir, |
QDir | dstDir, | ||
int * | progress = NULL , |
||
QProgressDialog * | dialog = NULL |
||
) | [private] |
An auxilliary method for directory copying.
If the destination directory exists, the method fails.
srcDir | The source directory of the copying. |
dstDir | The destination directory. |
progress | Pointer to an integer variable that should be increased every time a file is copied. Can be NULL to disable the progressbar feature. |
dialog | Pointer to the progress dialog that displays the progress stored in the progress parameter. It can be NULL, in which case no progress dialog is shown. |
void Updraft::Core::Updraft::coreSettings | ( | ) | [private] |
void Updraft::Core::Updraft::createEllipsoids | ( | ) | [private] |
Initializes the ellipsoids used for the measurements inside the application.
void Updraft::Core::Updraft::dataDirectoryChanged | ( | ) | [private, slot] |
int Updraft::Core::Updraft::exec | ( | ) |
Executes the application.
Pull the lever.
Shows main window, and enters event loop.
Gets the data directory.
This directory is saved in settings and its default location is next to the settings file.
Gets the resources directory.
The resources directory is a directory with permanent data that should not be overwritten. It is stored next to the executable file.
Gets the directory where the translations are located.
void Updraft::Core::Updraft::hideSplash | ( | ) |
Hides the splash screen when the application is done loading.
bool Updraft::Core::Updraft::moveDataDirectory | ( | QDir | oldDir, |
QDir | newDir, | ||
QProgressDialog * | dialog | ||
) | [private] |
Moves the data directory from one location to another.
This method first tries to rename the directory and if that fails (e.g. because the source and destination directory would be on different disk partitions), it tries to do a copy using the copyDirectory() method. If the copying succeeds, the data directory setting is updated and the old data directory is deleted.
oldDir | The source data directory that should be copied. |
newDir | The QDir object with the name of the new data directory. It should not exist, otherwise, the movement fails. |
dialog | Poiter to a progress dialog that will be shown, should the copying take too long. |
bool Updraft::Core::Updraft::dataDirectoryChangeInProgress [private] |
SplashScreen Updraft::Core::Updraft::splash [private] |