-#ifndef __SYSTEM_H__
-#define __SYSTEM_H__
-
-#include <iostream>
-#include <QtCore>
-#include "debug.h"
-
-#define SYSTEM System::instance()
-
-/**
- * Class for some system methods such as file system operations.
- * Implemented as singleton. Use init to Initialize the class
- * before you use it. (LAME! It should detect this condition transparently!)
- *
- * @author James Hammons
- * @author Andrew Mustun
- */
-class System
-{
- protected:
- System();
-
- public:
- static System * instance();
- void init(const QString & appName, const QString & appVersion,
- const QString & appDirName, const QString & appDir = "");
- void initLanguageList();
- bool checkInit();
- bool createHomePath(const QString & p);
- QString getHomeDir();
- QString getCurrentDir();
- QString getAppDir();
- QStringList getFontList();
- QStringList getPatternList();
- QStringList getScriptList();
- QStringList getMachineList();
- QString getDocPath();
- QString getAppName();
- QString getAppVersion();
- QStringList getFileList(const QString & subDirectory, const QString & fileExtension);
- QStringList getDirectoryList(const QString& subDirectory);
- QStringList getLanguageList();
-
- static QString languageToSymbol(const QString & lang);
- static QString symbolToLanguage(const QString & symb);
- static QString getEncoding(const QString & str);
-
- void loadTranslation(const QString & lang, const QString & langCmd);
- static bool test();
-
- /** Returns ISO code for given locale. Needed for win32 to convert
- from system encodings. */
- static QString localeToISO(const QString & locale);
-
- protected:
- static System * uniqueInstance;
-
- QString appName;
- QString appVersion;
- QString appDirName;
- QString appDir;
-
- //! List of available translations
- QStringList languageList;
-
- bool initialized;
-};
-
-#endif // __SYSTEM_H__