Tipos públicos |
enum | Prefix {
NoPrefix,
Hash,
HashContext,
HashContextSourceText,
HashContextSourceTextComment,
NoPrefix,
Hash,
HashContext,
HashContextSourceText,
HashContextSourceTextComment
} |
enum | Prefix {
NoPrefix,
Hash,
HashContext,
HashContextSourceText,
HashContextSourceTextComment,
NoPrefix,
Hash,
HashContext,
HashContextSourceText,
HashContextSourceTextComment
} |
Métodos públicos |
| QTranslatorMessage () |
| QTranslatorMessage (const char *context, const char *sourceText, const char *comment, const QString &translation=QString::null) |
| QTranslatorMessage (QDataStream &) |
| QTranslatorMessage (const QTranslatorMessage &m) |
QTranslatorMessage & | operator= (const QTranslatorMessage &m) |
uint | hash () const |
const char * | context () const |
const char * | sourceText () const |
const char * | comment () const |
void | setTranslation (const QString &translation) |
QString | translation () const |
void | write (QDataStream &s, bool strip=FALSE, Prefix prefix=HashContextSourceTextComment) const |
Prefix | commonPrefix (const QTranslatorMessage &) const |
bool | operator== (const QTranslatorMessage &m) const |
bool | operator!= (const QTranslatorMessage &m) const |
bool | operator< (const QTranslatorMessage &m) const |
bool | operator<= (const QTranslatorMessage &m) const |
bool | operator> (const QTranslatorMessage &m) const |
bool | operator>= (const QTranslatorMessage &m) const |
| QTranslatorMessage () |
| QTranslatorMessage (const char *context, const char *sourceText, const char *comment, const QString &translation=QString::null) |
| QTranslatorMessage (QDataStream &) |
| QTranslatorMessage (const QTranslatorMessage &m) |
QTranslatorMessage & | operator= (const QTranslatorMessage &m) |
uint | hash () const |
const char * | context () const |
const char * | sourceText () const |
const char * | comment () const |
void | setTranslation (const QString &translation) |
QString | translation () const |
void | write (QDataStream &s, bool strip=FALSE, Prefix prefix=HashContextSourceTextComment) const |
Prefix | commonPrefix (const QTranslatorMessage &) const |
bool | operator== (const QTranslatorMessage &m) const |
bool | operator!= (const QTranslatorMessage &m) const |
bool | operator< (const QTranslatorMessage &m) const |
bool | operator<= (const QTranslatorMessage &m) const |
bool | operator> (const QTranslatorMessage &m) const |
bool | operator>= (const QTranslatorMessage &m) const |
The QTranslatorMessage class contains a translator message and its properties.
This class is of no interest to most applications. It is useful for translation tools such as Qt Linguist. It is provided simply to make the API complete and regular.
For a QTranslator object, a lookup key is a triple (context, {source text}, comment) that uniquely identifies a message. An extended key is a quadruple (hash, context, {source text}, comment), where hash is computed from the source text and the comment. Unless you plan to read and write messages yourself, you need not worry about the hash value.
QTranslatorMessage stores this triple or quadruple and the relevant translation if there is any.
- Ver también:
- QTranslator
Let (h, c, s, m) be the extended key. The possible prefixes are
NoPrefix no prefix Hash only (h) HashContext only (h, c) HashContextSourceText only (h, c, s) HashContextSourceTextComment the whole extended key, (h, c, s, m)
- Ver también:
- write() commonPrefix()
- Valores de enumeraciones:
NoPrefix |
|
Hash |
|
HashContext |
|
HashContextSourceText |
|
HashContextSourceTextComment |
|
NoPrefix |
|
Hash |
|
HashContext |
|
HashContextSourceText |
|
HashContextSourceTextComment |
|
Returns the widest lookup prefix that is common to this translator message and to message m.
For example, if the extended key is for this message is (71, "PrintDialog", "Yes", "Print?") and that for m is (71, "PrintDialog", "No", "Print?"), this function returns HashContext
.
- Ver también:
- write()
La documentación para esta clase fue generada a partir de los siguientes ficheros: