This class is of no interest to most applications. It is useful for translation tools such as TQt Linguist. It is provided simply to make the API complete and regular.
For a QTranslator object, a lookup key is a triple (\fIcontext\fR, \fIsource text\fR, \fIcomment\fR) that uniquely identifies a message. An extended key is a quadruple (\fIhash\fR, \fIcontext\fR, \fIsource text\fR, \fIcomment\fR), where \fIhash\fR 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.
.PP
QTranslatorMessage stores this triple or quadruple and the relevant translation if there is any.
.PP
See also QTranslator, Environment Classes, and Internationalization with Qt.
.SS "Member Type Documentation"
.SH "QTranslatorMessage::Prefix"
Let (\fIh\fR, \fIc\fR, \fIs\fR, \fIm\fR) be the extended key. The possible prefixes are
.TP
\fCQTranslatorMessage::NoPrefix\fR - no prefix
.TP
\fCQTranslatorMessage::Hash\fR - only (\fIh\fR)
.TP
\fCQTranslatorMessage::HashContext\fR - only (\fIh\fR, \fIc\fR)
.TP
\fCQTranslatorMessage::HashContextSourceText\fR - only (\fIh\fR, \fIc\fR, \fIs\fR)
.TP
\fCQTranslatorMessage::HashContextSourceTextComment\fR - the whole extended key, (\fIh\fR, \fIc\fR, \fIs\fR, \fIm\fR)
Constructs an translator message with the extended key (\fIh\fR, \fIcontext\fR, \fIsourceText\fR, \fIcomment\fR), where \fIh\fR is computed from \fIsourceText\fR and \fIcomment\fR, and possibly with a \fItranslation\fR.
Returns the comment for this message (e.g. "File|Save").
.PP
\fBWarning:\fR This may return 0 if the QTranslator object is stripped (compressed).
.SH "Prefix QTranslatorMessage::commonPrefix ( const QTranslatorMessage & m ) const"
Returns the widest lookup prefix that is common to this translator message and to message \fIm\fR.
.PP
For example, if the extended key is for this message is (71," PrintDialog", "Yes", "Print?") and that for \fIm\fR is (71," PrintDialog", "No", "Print?"), this function returns HashContext.
Returns the context for this message (e.g. "MyDialog").
.PP
\fBWarning:\fR This may return 0 if the QTranslator object is stripped (compressed).
.SH "uint QTranslatorMessage::hash () const"
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.
.PP
The hashing function is unspecified, but it will remain unchanged in future versions of Qt.
.SH "bool QTranslatorMessage::operator!= ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is different from that of \fIm\fR; otherwise returns FALSE.
.SH "bool QTranslatorMessage::operator< ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is lexicographically before than that of \fIm\fR; otherwise returns FALSE.
.SH "bool QTranslatorMessage::operator<= ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is lexicographically before that of \fIm\fR or if they are equal; otherwise returns FALSE.
.SH "QTranslatorMessage & QTranslatorMessage::operator= ( const QTranslatorMessage & m )"
Assigns message \fIm\fR to this translator message and returns a reference to this translator message.
.SH "bool QTranslatorMessage::operator== ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is equal to that of \fIm\fR; otherwise returns FALSE.
.SH "bool QTranslatorMessage::operator> ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is lexicographically after that of \fIm\fR; otherwise returns FALSE.
.SH "bool QTranslatorMessage::operator>= ( const QTranslatorMessage & m ) const"
Returns TRUE if the extended key of this object is lexicographically after that of \fIm\fR or if they are equal; otherwise returns FALSE.
Writes this translator message to the \fIstream\fR. If \fIstrip\fR is FALSE (the default), all the information in the message is written. If \fIstrip\fR is TRUE, only the part of the extended key specified by \fIprefix\fR is written with the translation (HashContextSourceTextComment by default).