Torc
0.1
|
A factory class to register translatable strings for use with external interfaces/applications. More...
#include <torclanguage.h>
Public Member Functions | |
TorcStringFactory () | |
virtual | ~TorcStringFactory ()=default |
TorcStringFactory * | NextFactory (void) const |
virtual void | GetStrings (QVariantMap &Strings)=0 |
Static Public Member Functions | |
static QVariantMap | GetTorcStrings (void) |
Return a map of string constants and their translations. More... | |
static TorcStringFactory * | GetTorcStringFactory (void) |
Protected Attributes | |
TorcStringFactory * | nextTorcStringFactory |
Static Protected Attributes | |
static TorcStringFactory * | gTorcStringFactory = nullptr |
A factory class to register translatable strings for use with external interfaces/applications.
A translatable string is registered with a string constant that should uniquely identify it. The list of registered constants and their current translations can be retrieved with GetTorcStrings.
Objects that wish to register strings should sub-class TorcStringFactory and implement GetStrings.
The string list is made available to web interfaces via the dynamically generated torcconfiguration.js file and is exported directly to all QML contexts.
Definition at line 66 of file torclanguage.h.
TorcStringFactory::TorcStringFactory | ( | ) |
Definition at line 522 of file torclanguage.cpp.
|
virtualdefault |
|
pure virtual |
Implemented in TorcNetworkedContextObject, TorcHTTPServerObject, TorcPowerObject, TorcCentralObject, and TorcUserObject.
|
static |
Definition at line 528 of file torclanguage.cpp.
|
static |
Return a map of string constants and their translations.
Definition at line 540 of file torclanguage.cpp.
TorcStringFactory * TorcStringFactory::NextFactory | ( | void | ) | const |
Definition at line 533 of file torclanguage.cpp.
|
staticprotected |
Definition at line 79 of file torclanguage.h.
|
protected |
Definition at line 80 of file torclanguage.h.