![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/ctkPluginLocalization.h>
Public Member Functions | |
ctkPluginLocalization () | |
ctkPluginLocalization (const ctkPluginLocalization &pl) | |
QLocale | getLocale () const |
QString | getLocalized (const QString &context, const QString &str) const |
ctkPluginLocalization & | operator= (const ctkPluginLocalization &other) |
~ctkPluginLocalization () | |
Friends | |
class | ctkPlugin |
Translate text into different languages.
Use this class to dynamically translate human-readable text in your plugin. You can get an instance of this class corresponding to a specific locale via the method ctkPlugin::getPluginLocalization()
.
Definition at line 47 of file ctkPluginLocalization.h.
ctkPluginLocalization::ctkPluginLocalization | ( | ) |
Creates a default ctkPluginLocalization instance, using the default locale.
Note that getLocalized() will always return a null QString for a default constructed ctkPluginLocalization object. Use ctkPlugin::getPluginLocalization()
to create a valid instance.
ctkPluginLocalization::ctkPluginLocalization | ( | const ctkPluginLocalization & | pl | ) |
ctkPluginLocalization::~ctkPluginLocalization | ( | ) |
QLocale ctkPluginLocalization::getLocale | ( | ) | const |
Get the locale for which this ctkPluginLocalization
object was constructed.
QString ctkPluginLocalization::getLocalized | ( | const QString & | context, |
const QString & | str | ||
) | const |
Translate str
to a specific locale, using the specified context
.
ctkPluginLocalization& ctkPluginLocalization::operator= | ( | const ctkPluginLocalization & | other | ) |
|
friend |
Definition at line 86 of file ctkPluginLocalization.h.