summaryrefslogtreecommitdiff
path: root/LanguagesManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'LanguagesManager.h')
-rw-r--r--LanguagesManager.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/LanguagesManager.h b/LanguagesManager.h
index 8ec893d..e7c715e 100644
--- a/LanguagesManager.h
+++ b/LanguagesManager.h
@@ -15,6 +15,7 @@
#include <QByteArray>
#include <QCoreApplication>
#include <QDir>
+#include <unordered_set>
#include "Environment.h"
#include "OptionEngine.h"
@@ -30,7 +31,7 @@ class LanguagesManager : public QObject
//public:
// QString getMainShortName();
public:
- const QString autodetectedLanguage() const;
+ const std::string autodetectedLanguage() const;
static LanguagesManager *languagesManager;
/// \brief Create the manager and load the defaults variables
LanguagesManager();
@@ -39,26 +40,26 @@ class LanguagesManager : public QObject
private:
/** \brief To set the current language
\param newLanguage Should be short name code found into informations.xml of language file */
- void setCurrentLanguage(const QString &newLanguage);
+ void setCurrentLanguage(const std::string &newLanguage);
/// \brief Structure of language
struct LanguagesAvailable
{
- QString path;
- QString fullName;
- QString mainShortName;
- QStringList shortName;
+ std::string path;
+ std::string fullName;
+ std::string mainShortName;
+ std::unordered_set<std::string> shortName;
};
/// \brief To store the language path
- QStringList languagePath;
+ std::vector<std::string> languagePath;
/// \brief To store the language detected
- QList<LanguagesAvailable> LanguagesAvailableList;
+ std::vector<LanguagesAvailable> LanguagesAvailableList;
/// \brief check if short name is found into language
- QString getMainShortName(const QString &shortName) const;
+ std::string getMainShortName(const std::string &shortName) const;
/// \brief list of installed translator
- QList<QTranslator *> installedTranslator;
- QString currentLanguage;
+ std::vector<QTranslator *> installedTranslator;
+ std::string currentLanguage;
/// \brief load the language selected
- QString getTheRightLanguage() const;
+ std::string getTheRightLanguage() const;
private slots:
/// \brief load the language in languagePath
void allPluginIsLoaded();
@@ -67,10 +68,10 @@ class LanguagesManager : public QObject
#ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE
void onePluginWillBeRemoved(const PluginsAvailable &plugin);
#endif
- void newOptionValue(const QString &group);
+ void newOptionValue(const std::string &group);
signals:
//send the language is loaded or the new language is loaded
- void newLanguageLoaded(const QString &mainShortName) const;
+ void newLanguageLoaded(const std::string &mainShortName) const;
void previouslyPluginAdded(PluginsAvailable) const;
};