|
Krita Source Code Documentation
|
The LocaleHandler class. More...
#include <LocaleHandler.h>
Inheritance diagram for LocaleHandler:Classes | |
| struct | Private |
Signals | |
| void | bcp47TagChanged () |
| void | favoritesModelChanged () |
| void | languageChanged () |
| void | languagesModelChanged () |
| void | scriptChanged () |
| void | searchStringChanged () |
Public Member Functions | |
| QString | bcp47Tag () const |
| QAbstractItemModel * | favoritesModel () const |
| QString | language () const |
| QAbstractItemModel * | languagesModel () const |
| LocaleHandler (QObject *parent=nullptr) | |
| bool | localeValid () const |
| QString | script () const |
| Q_INVOKABLE QVariantList | scriptModel () const |
| QString | searchString () const |
| void | setBcp47Tag (const QString &newBcp47Tag) |
| void | setLanguage (const QString &newLanguage) |
| void | setScript (const QString &newScript) |
| void | setSearchString (const QString &newSearchString) |
| Q_INVOKABLE bool | validBcp47Tag (const QString &tag) const |
| ~LocaleHandler () | |
Properties | |
| QString | bcp47Tag |
| QAbstractItemModel * | favoritesModel |
| QString | language |
| QAbstractItemModel * | languagesModel |
| bool | localeValid |
| QString | script |
| QString | searchString |
Private Attributes | |
| const QScopedPointer< Private > | d |
The LocaleHandler class.
This object splits up a BCP47 locale into language and script sections, and allows editing each.
It also keeps track of models for script and language.
Definition at line 21 of file LocaleHandler.h.
| LocaleHandler::LocaleHandler | ( | QObject * | parent = nullptr | ) |
Definition at line 60 of file LocaleHandler.cpp.
| LocaleHandler::~LocaleHandler | ( | ) |
Definition at line 67 of file LocaleHandler.cpp.
| QString LocaleHandler::bcp47Tag | ( | ) | const |
Definition at line 72 of file LocaleHandler.cpp.
References d.
|
signal |
| QAbstractItemModel * LocaleHandler::favoritesModel | ( | ) | const |
|
signal |
| QString LocaleHandler::language | ( | ) | const |
Definition at line 104 of file LocaleHandler.cpp.
References d, KoWritingSystemUtils::Bcp47Locale::scriptTag, and KoWritingSystemUtils::Bcp47Locale::toString().
|
signal |
| QAbstractItemModel * LocaleHandler::languagesModel | ( | ) | const |
Definition at line 147 of file LocaleHandler.cpp.
References d.
|
signal |
| bool LocaleHandler::localeValid | ( | ) | const |
Definition at line 170 of file LocaleHandler.cpp.
References d.
| QString LocaleHandler::script | ( | ) | const |
Definition at line 90 of file LocaleHandler.cpp.
References d.
|
signal |
| QVariantList LocaleHandler::scriptModel | ( | ) | const |
Definition at line 131 of file LocaleHandler.cpp.
References script, and KoWritingSystemUtils::scriptTagForQLocaleScript().
| QString LocaleHandler::searchString | ( | ) | const |
Definition at line 157 of file LocaleHandler.cpp.
References d.
|
signal |
| void LocaleHandler::setBcp47Tag | ( | const QString & | newBcp47Tag | ) |
Definition at line 77 of file LocaleHandler.cpp.
References bcp47TagChanged(), d, language, languageChanged(), KoWritingSystemUtils::parseBcp47Locale(), and scriptChanged().
| void LocaleHandler::setLanguage | ( | const QString & | newLanguage | ) |
Definition at line 111 of file LocaleHandler.cpp.
References bcp47TagChanged(), d, KoWritingSystemUtils::Bcp47Locale::isValid(), languageChanged(), KoWritingSystemUtils::parseBcp47Locale(), KoWritingSystemUtils::Bcp47Locale::scriptTag, and KoWritingSystemUtils::Bcp47Locale::toString().
| void LocaleHandler::setScript | ( | const QString & | newScript | ) |
Definition at line 95 of file LocaleHandler.cpp.
References bcp47TagChanged(), d, and scriptChanged().
| void LocaleHandler::setSearchString | ( | const QString & | newSearchString | ) |
Definition at line 162 of file LocaleHandler.cpp.
References d, and searchStringChanged().
| bool LocaleHandler::validBcp47Tag | ( | const QString & | tag | ) | const |
Definition at line 175 of file LocaleHandler.cpp.
References KoWritingSystemUtils::Bcp47Locale::isValid(), and KoWritingSystemUtils::parseBcp47Locale().
|
private |
Definition at line 78 of file LocaleHandler.h.
|
readwrite |
Definition at line 25 of file LocaleHandler.h.
|
read |
Definition at line 31 of file LocaleHandler.h.
|
readwrite |
Definition at line 27 of file LocaleHandler.h.
|
read |
Definition at line 29 of file LocaleHandler.h.
|
read |
Definition at line 33 of file LocaleHandler.h.
|
readwrite |
Definition at line 26 of file LocaleHandler.h.
|
readwrite |
Definition at line 30 of file LocaleHandler.h.