Commit 6affcbf6 authored by Mike Kremer's avatar Mike Kremer

Added helpDirStr() to global options that returns the directory which holds...

Added helpDirStr() to global options that returns the directory which holds the help files. Adapted help widget accordingly.
Some minor changes in the building notes (documentation).

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5857 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7a314c38
......@@ -237,6 +237,14 @@ void Core::setupOptions() {
tempDir.cd("Fonts");
OpenFlipper::Options::fontsDir(tempDir.absolutePath());
// Set the Path to the Help
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Help");
OpenFlipper::Options::helpDir(tempDir.absolutePath());
QStringList optionFiles;
// ==============================================================
......
......@@ -73,6 +73,9 @@ static QIcon* OpenFlipperIcon_ = 0;
/// Stores the Path to the Fonts
static QDir fontsDir_;
/// Stores the Path to the Help
static QDir helpDir_;
/// Stores all available option files in the Order in which they should be used
static QStringList optionFiles_;
......@@ -273,7 +276,8 @@ QDir pluginDir() { return pluginDir_; }
QDir shaderDir() { return shaderDir_; }
QDir textureDir() { return textureDir_; }
QDir iconDir() { return iconDir_; }
QDir fontsDir() { return fontsDir_; }
QDir fontsDir() { return fontsDir_; }
QDir helpDir() { return helpDir_; }
QDir currentDir() { return currentDir_; }
QDir currentScriptDir() { return currentScriptDir_; }
QDir currentTextureDir(){ return currentTextureDir_; }
......@@ -285,6 +289,7 @@ QString shaderDirStr() { return shaderDir_.absolutePath(); }
QString textureDirStr() { return textureDir_.absolutePath(); }
QString iconDirStr() { return iconDir_.absolutePath(); }
QString fontsDirStr() { return fontsDir_.absolutePath(); }
QString helpDirStr() { return helpDir_.absolutePath(); }
QString currentDirStr() { return currentDir_.absolutePath(); }
QString currentScriptDirStr() { return currentScriptDir_.absolutePath(); }
QString currentTextureDirStr() { return currentTextureDir_.absolutePath(); }
......@@ -297,6 +302,7 @@ void shaderDir(QDir _dir) { shaderDir_ = _dir; }
void textureDir(QDir _dir) { textureDir_ = _dir; }
void iconDir(QDir _dir) { iconDir_ = _dir; }
void fontsDir(QDir _dir) { fontsDir_ = _dir;}
void helpDir(QDir _dir) { helpDir_ = _dir;}
void configDir(QDir _dir) { configDir_ = _dir; }
void currentDir(QDir _dir) { currentDir_ = _dir; }
void currentScriptDir(QDir _dir) { currentScriptDir_ = _dir; }
......@@ -370,6 +376,15 @@ bool fontsDir(QString _dir) {
return false;
}
bool helpDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
helpDir_ = tmp;
return true;
}
return false;
}
bool configDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
......
......@@ -108,6 +108,10 @@ QIcon& OpenFlipperIcon();
DLLEXPORT
QString fontsDirStr();
/// Returns the Path to Help
DLLEXPORT
QString helpDirStr();
/// Sets the base Path of the application
DLLEXPORT
void applicationDir(QDir _dir);
......@@ -132,6 +136,10 @@ void iconDir(QDir _dir);
DLLEXPORT
void fontsDir(QDir _dir);
/// Sets the Path to the Help
DLLEXPORT
void helpDir(QDir _dir);
/// Sets the base Path of the application
DLLEXPORT
bool applicationDir(QString _dir);
......@@ -156,6 +164,10 @@ bool iconDir(QString _dir);
DLLEXPORT
void fontsDir(QDir _dir);
/// Sets the Path to the Help
DLLEXPORT
void helpDir(QDir _dir);
//===========================================================================
/** @name Option files / paths
......
......@@ -25,11 +25,9 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
homeSite_ = _homeSite;
QString filename = QString(OpenFlipper::Options::applicationDirStr());
filename += "/Help/Help.qhc";
QString stylesheet = QString(OpenFlipper::Options::applicationDirStr());
stylesheet += "/Help/acg_style.css";
QString filename = QString(OpenFlipper::Options::helpDirStr());
filename += OpenFlipper::Options::dirSeparator();
filename += "Help.qhc";
QString iconPath = QString(OpenFlipper::Options::iconDirStr());
#ifdef WIN32
......
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