LanguageCode is a 2 letter ISO 639-1 laguage representation. More...
#include <LanguageCode.h>
Public Member Functions | |
LanguageCode () noexcept | |
Construct a null language code. | |
LanguageCode (const char *const code) | |
Construct a language code. More... | |
LanguageCode (const LanguageCode &other)=default | |
Copy construct a language code from other. | |
LanguageCode & | operator= (const LanguageCode &other)=default |
Copy assign other language code to this. | |
LanguageCode (LanguageCode &&other)=default | |
Move construct a language code from other. | |
LanguageCode & | operator= (LanguageCode &&other)=default |
Move assign other language code to this. | |
bool | isNull () const noexcept |
Check if this language code is null. | |
QString | toString () const |
Get a string version of this language code. | |
Static Public Member Functions | |
static LanguageCode | fromString (const QString &code) |
Construct a language code from a string. More... | |
static LanguageCode | fromLanguageCountry (const QString &languageCountry) |
Construct a language code from language_COUNTRY string. More... | |
Friends | |
bool | operator== (const LanguageCode &a, const LanguageCode &b) noexcept |
Check if language code a is equal to b. | |
bool | operator!= (const LanguageCode &a, const LanguageCode &b) noexcept |
Check if language code a is not equal to b. | |
LanguageCode is a 2 letter ISO 639-1 laguage representation.
Definition at line 33 of file LanguageCode.h.
|
explicit |
Construct a language code.
Definition at line 33 of file LanguageCode.cpp.
|
static |
Construct a language code from language_COUNTRY string.
Definition at line 63 of file LanguageCode.cpp.
|
static |
Construct a language code from a string.
Definition at line 52 of file LanguageCode.cpp.