The QTranslatorMessage class contains a translator message and its properties. More...
#include <qtranslator.h>
This class is of no interest to most applications, just for translation tools, e.g. 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 theis triple or quadruple, the relevant translation if there is any, and the status of the message.
See also QTranslator.
NoPrefix
- no prefix
Hash
- only ( h )
HashContext
- only ( h, c )
HashContextSourceText
- only ( h, c, s )
HashContextSourceTextComment
- the whole extended key, ( h, c, s, m )
See also write() and commonPrefix().
Constructs a translator message with extended key ( 0, "", "", "" ) and QString::null as translation.
Constructs a translator message read from a stream. The resulting message may have any combination of content.
See also save().
Constructs a copy of translator message m.
Constructs an translator message with extended key ( h, context, sourceText, comment ), where h is computed from sourceText and comment, and possibly with a translation.
Returns the comment for this message (e.g., "File > Save").
Returns the widest lookup prefix that is common to this translator message and message m.
For example, if the extended key is for this message is ( 42, "FunnyDialog",
"Yes", "Funny?" ) and that for m is ( 42, "FunnyDialog", "No", "Funny?" ),
returns HashContext.
See also write().
Returns the context for this message (e.g., "FunnyDialog").
Returns the hash value used internally to represent the lookup key. This value is zero only if this translator message was constructed from a stream containing invalid data.
The hashing function is unspecified, but it will remain unchanged in future versions of Qt.
Returns TRUE if the extended key of this object is different from that of m, otherwise FALSE.
Returns TRUE if the extended key of this object is lexicographically before than that of m, otherwise FALSE.
Returns TRUE if the extended key of this object is lexicographically before that of m or if they are equal, otherwise FALSE.
Assigns m to this translator message and returns a reference to this translator message.
Returns TRUE if the extended key of this object is equal to that of m, otherwise FALSE.
Returns TRUE if the extended key of this object is lexicographically after that of m, otherwise FALSE.
Returns TRUE if the extended key of this object is lexicographically after that of m or if they are equal, otherwise FALSE.
Sets the translation of the source text.
See also translation().
Returns the source text of this message (e.g., "&Save").
Returns the translation of the source text (e.g., "&Sauvegarder").
See also setTranslation().
Writes this translator message to a stream. If strip is FALSE (the
default), all the information in the message is written. If strip is TRUE,
only the part of the extended key specified by prefix is written with the
translation (HashContextSourceTextComment
by default).
See also commonPrefix().
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright İ 2000 Trolltech | Trademarks | Qt version 2.2.1
|