From a2f36ec4d14ddf1bcee98e52a0f3a924804d06fb Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Wed, 17 Mar 2021 10:42:50 +0100 Subject: Inserts setting for current language. --- src/kristall.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/kristall.hpp') diff --git a/src/kristall.hpp b/src/kristall.hpp index 49219cf..eac5bdd 100644 --- a/src/kristall.hpp +++ b/src/kristall.hpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "identitycollection.hpp" #include "ssltrust.hpp" @@ -164,9 +166,15 @@ namespace kristall QDir styles; }; - struct Globals + struct Localization { + QLocale locale; + QTranslator qt; + QTranslator kristall; + }; + struct Globals + { ProtocolSetup protocols; QSettings * settings; @@ -182,6 +190,8 @@ namespace kristall Trust trust; Dirs dirs; + + Localization localization; }; //! returns the instance of the globals structure @@ -222,6 +232,12 @@ namespace kristall //! Saves the current session including all windows, tabs and positions. void saveSession(); + + //! Changes the currently used locale + void setLocale(QLocale const & locale); + + //! Saves the currently used locale + void saveLocale(); } #endif // KRISTALL_HPP -- cgit v1.2.3