Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef PATHTRANSLATOR_H
00029 #define PATHTRANSLATOR_H
00030
00031
00032 #include "QGpCoreToolsDLLExport.h"
00033 #include "Translations.h"
00034
00035 namespace QGpCoreTools {
00036
00037 class QGPCORETOOLS_EXPORT PathTranslator : private QMap<QString, QString>
00038 {
00039 TRANSLATIONS("PathTranslator")
00040 public:
00041 PathTranslator() {}
00042 ~PathTranslator() {}
00043
00044 QString translate(const QString& originalFile, const QString& title, const QString& fileType);
00045 void addPath(QString obsoletePath, QString newPath);
00046 private:
00047 static bool fileExists(QFileInfo& fi);
00048 QString platformIndependantPath(QString path);
00049 QString askPath (const QFileInfo& file, const QString& title, const QString& fileType, const QString& directory=QString::null);
00050 static QString dirName(QString path);
00051 static bool isRoot(QString path);
00052 };
00053
00054 }
00055
00056 #endif // PATHTRANSLATOR_H