comparison include/gui/locale.h @ 369:47c9f8502269

*: clang-format all the things I've edited the formatting a bit. Now pointer asterisks (and reference ampersands) are on the variable instead of the type, as well as having newlines for function braces (but nothing else)
author Paper <paper@tflc.us>
date Fri, 25 Jul 2025 10:16:02 -0400
parents b1f625b0227c
children
comparison
equal deleted inserted replaced
368:6d37a998cf91 369:47c9f8502269
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 namespace Locale { 10 namespace Locale {
11 11
12 std::string GetLocaleFullName(const QLocale& locale); 12 std::string GetLocaleFullName(const QLocale &locale);
13 13
14 class Locale { 14 class Locale {
15 public: 15 public:
16 Locale(); 16 Locale();
17 Locale(const std::string& name); 17 Locale(const std::string &name);
18 QLocale GetLocale() const; 18 QLocale GetLocale() const;
19 std::vector<QLocale> GetAvailableLocales() const; 19 std::vector<QLocale> GetAvailableLocales() const;
20 void RefreshAvailableLocales(); // why would this ever be called? 20 void RefreshAvailableLocales(); // why would this ever be called?
21 bool IsLocaleAvailable(const QLocale& locale) const; 21 bool IsLocaleAvailable(const QLocale &locale) const;
22 bool SetActiveLocale(const QLocale& locale); 22 bool SetActiveLocale(const QLocale &locale);
23 23
24 private: 24 private:
25 bool SwitchTranslator(QTranslator& translator, const QString& name); 25 bool SwitchTranslator(QTranslator &translator, const QString &name);
26 26
27 QTranslator _translator; 27 QTranslator _translator;
28 QTranslator _translator_qt; 28 QTranslator _translator_qt;
29 QLocale _locale; 29 QLocale _locale;
30 std::vector<QLocale> _available_translations = {}; 30 std::vector<QLocale> _available_translations = {};