1 #ifndef APPLICATIONLANGUAGESWITCHER_H
2 #define APPLICATIONLANGUAGESWITCHER_H
6 #include "core/common/ESingleton.h"
59 friend class ESingleton<ApplicationLanguageSwitcher>;
63 QScopedPointer<DataClass> d;
68 #define SET_DEFAULT_TEMPORARY_LANGUAGE_WHILE_IN_SCOPE \
69 ApplicationLanguageSwitcher::GetInstance().SetDefaultTemporaryLanguage(); \
70 OnLeavingScope scope( [](){ return ApplicationLanguageSwitcher::GetInstance().ResetTemporaryLanguageToGlobal(); } );
72 #endif // APPLICATIONLANGUAGESWITCHER_H
Definition: ApplicationLanguageManager.h:9
std::function< bool()> OnLeavingScopeFunction
Definition: ApplicationLanguageSwitcher.h:17
OnLeavingScope & operator=(const OnLeavingScope &)=delete
The ApplicationLanguageSwitcher class - this class is used for temporary language changes...
Definition: ApplicationLanguageSwitcher.h:36
~OnLeavingScope()
Definition: ApplicationLanguageSwitcher.h:23
OnLeavingScope(const OnLeavingScopeFunction &f)
Definition: ApplicationLanguageSwitcher.h:22
bool ResetTemporaryLanguageToGlobal()
ResetTemporaryLanguageToGlobal - method resets previously set temporary language to global language...
Definition: ApplicationLanguageSwitcher.cpp:42
bool SetDefaultTemporaryLanguage()
SetDefaultTemporaryLanguage - this method is used to temporary change current language to default lan...
Definition: ApplicationLanguageSwitcher.cpp:32
Definition: ApplicationLanguageSwitcher.cpp:7
The OnLeavingScope class - class which purpose is call assigned function, when class instance leaves ...
Definition: ApplicationLanguageSwitcher.h:14
OnLeavingScope(const OnLeavingScope &)=delete