NDEVR
API Documentation
QCustomTranslator

Allows QT to call into the native application translator when needed to translate UI auto-generated items. More...

Public Member Functions

bool isEmpty () const override
 Returns whether the translator is empty (has no translations).
virtual QString translate (const char *context, const char *sourceText, const char *disambiguation=nullptr, int n=-1) const override
 Translates the given source text using the NDEVR translation system.

Static Public Member Functions

static QCustomTranslatorMainTranslator ()
 Returns the singleton main translator instance used by the application.

Detailed Description

Allows QT to call into the native application translator when needed to translate UI auto-generated items.


Definition at line 43 of file QCustomTranslator.h.

Member Function Documentation

◆ isEmpty()

bool QCustomTranslator::isEmpty ( ) const
inlineoverride

Returns whether the translator is empty (has no translations).

Returns
Always returns false since this translator delegates to the NDEVR system.

Definition at line 73 of file QCustomTranslator.h.

◆ MainTranslator()

QCustomTranslator * QCustomTranslator::MainTranslator ( )
inlinestatic

Returns the singleton main translator instance used by the application.

Returns
A pointer to the global QCustomTranslator instance.

Definition at line 50 of file QCustomTranslator.h.

◆ translate()

virtual QString QCustomTranslator::translate ( const char * context,
const char * sourceText,
const char * disambiguation = nullptr,
int n = -1 ) const
inlineoverridevirtual

Translates the given source text using the NDEVR translation system.

Parameters
[in]contextThe translation context (typically the class name).
[in]sourceTextThe source text to translate.
[in]disambiguationOptional disambiguation string (unused).
[in]nOptional plural form count (unused).
Returns
The translated string as a QString.

Definition at line 63 of file QCustomTranslator.h.

References Translator::DefaultReadableLabel().


The documentation for this class was generated from the following file: