Commit 5fa0beab authored by Jan Möbius's avatar Jan Möbius

Set IconDir in OpenFLipper

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3788 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6defa68d
...@@ -218,6 +218,11 @@ void Core::setupOptions() { ...@@ -218,6 +218,11 @@ void Core::setupOptions() {
tempDir.cd("Icons"); tempDir.cd("Icons");
OpenFlipper::Options::iconDir(tempDir.absolutePath()); OpenFlipper::Options::iconDir(tempDir.absolutePath());
// Set the Path to the Fonts
tempDir = QDir(OpenFlipper::Options::applicationDir());
tempDir.cd("Fonts");
OpenFlipper::Options::fontsDir(tempDir.absolutePath());
QStringList optionFiles; QStringList optionFiles;
// ============================================================== // ==============================================================
......
...@@ -66,6 +66,9 @@ static QDir textureDir_; ...@@ -66,6 +66,9 @@ static QDir textureDir_;
/// Stores the Path to the Icons /// Stores the Path to the Icons
static QDir iconDir_; static QDir iconDir_;
/// Stores the Path to the Fonts
static QDir fontsDir_;
/// Stores all available option files in the Order in which they should be used /// Stores all available option files in the Order in which they should be used
static QStringList optionFiles_; static QStringList optionFiles_;
...@@ -229,6 +232,7 @@ QDir pluginDir() { return pluginDir_; } ...@@ -229,6 +232,7 @@ QDir pluginDir() { return pluginDir_; }
QDir shaderDir() { return shaderDir_; } QDir shaderDir() { return shaderDir_; }
QDir textureDir() { return textureDir_; } QDir textureDir() { return textureDir_; }
QDir iconDir() { return iconDir_; } QDir iconDir() { return iconDir_; }
QDir fontsDir() { return fontsDir_; }
QDir currentDir() { return currentDir_; } QDir currentDir() { return currentDir_; }
QDir currentScriptDir(){ return currentScriptDir_; } QDir currentScriptDir(){ return currentScriptDir_; }
...@@ -238,6 +242,7 @@ QString pluginDirStr() { return pluginDir_.absolutePath(); } ...@@ -238,6 +242,7 @@ QString pluginDirStr() { return pluginDir_.absolutePath(); }
QString shaderDirStr() { return shaderDir_.absolutePath(); } QString shaderDirStr() { return shaderDir_.absolutePath(); }
QString textureDirStr() { return textureDir_.absolutePath(); } QString textureDirStr() { return textureDir_.absolutePath(); }
QString iconDirStr() { return iconDir_.absolutePath(); } QString iconDirStr() { return iconDir_.absolutePath(); }
QString fontsDirStr() { return fontsDir_.absolutePath(); }
QString currentDirStr() { return currentDir_.absolutePath(); } QString currentDirStr() { return currentDir_.absolutePath(); }
QString currentScriptDirStr(){ return currentScriptDir_.absolutePath();} QString currentScriptDirStr(){ return currentScriptDir_.absolutePath();}
...@@ -248,6 +253,7 @@ void pluginDir(QDir _dir) { pluginDir_ = _dir; } ...@@ -248,6 +253,7 @@ void pluginDir(QDir _dir) { pluginDir_ = _dir; }
void shaderDir(QDir _dir) { shaderDir_ = _dir; } void shaderDir(QDir _dir) { shaderDir_ = _dir; }
void textureDir(QDir _dir) { textureDir_ = _dir; } void textureDir(QDir _dir) { textureDir_ = _dir; }
void iconDir(QDir _dir) { iconDir_ = _dir; } void iconDir(QDir _dir) { iconDir_ = _dir; }
void fontsDir(QDir _dir) { fontsDir_ = _dir;}
void configDir(QDir _dir) { configDir_ = _dir; } void configDir(QDir _dir) { configDir_ = _dir; }
void currentDir(QDir _dir) { currentDir_ = _dir; } void currentDir(QDir _dir) { currentDir_ = _dir; }
void currentScriptDir(QDir _dir) { currentScriptDir_ = _dir; } void currentScriptDir(QDir _dir) { currentScriptDir_ = _dir; }
...@@ -293,7 +299,16 @@ bool textureDir(QString _dir) { ...@@ -293,7 +299,16 @@ bool textureDir(QString _dir) {
bool iconDir(QString _dir) { bool iconDir(QString _dir) {
QDir tmp(_dir); QDir tmp(_dir);
if (tmp.exists()) { if (tmp.exists()) {
iconDir_ = tmp; iconDir_ = tmp;
return true;
}
return false;
}
bool fontsDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
fontsDir_ = tmp;
return true; return true;
} }
return false; return false;
......
...@@ -82,6 +82,10 @@ QDir shaderDir(); ...@@ -82,6 +82,10 @@ QDir shaderDir();
DLLEXPORT DLLEXPORT
QDir iconDir(); QDir iconDir();
/// Returns the Path to Fonts
DLLEXPORT
QDir fontsDir();
/// Returns the base Path of the application /// Returns the base Path of the application
DLLEXPORT DLLEXPORT
QString applicationDirStr(); QString applicationDirStr();
...@@ -102,6 +106,10 @@ QString textureDirStr(); ...@@ -102,6 +106,10 @@ QString textureDirStr();
DLLEXPORT DLLEXPORT
QString iconDirStr(); QString iconDirStr();
/// Returns the Path to Fonts
DLLEXPORT
QString fontsDirStr();
/// Sets the base Path of the application /// Sets the base Path of the application
DLLEXPORT DLLEXPORT
void applicationDir(QDir _dir); void applicationDir(QDir _dir);
...@@ -122,6 +130,10 @@ void textureDir(QDir _dir); ...@@ -122,6 +130,10 @@ void textureDir(QDir _dir);
DLLEXPORT DLLEXPORT
void iconDir(QDir _dir); void iconDir(QDir _dir);
/// Sets the Path to the Fonts
DLLEXPORT
void fontsDir(QDir _dir);
/// Sets the base Path of the application /// Sets the base Path of the application
DLLEXPORT DLLEXPORT
bool applicationDir(QString _dir); bool applicationDir(QString _dir);
...@@ -142,6 +154,10 @@ bool textureDir(QString _dir); ...@@ -142,6 +154,10 @@ bool textureDir(QString _dir);
DLLEXPORT DLLEXPORT
bool iconDir(QString _dir); bool iconDir(QString _dir);
/// Sets the Path to the Fonts
DLLEXPORT
void fontsDir(QDir _dir);
//=========================================================================== //===========================================================================
/** @name Option files / paths /** @name Option files / paths
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment