The QLatin1Constant class holds a Latin 1 string constant More...
#include <QLatin1Constant>
const char * | latin1 () const |
bool | operator!= ( const QLatin1Constant & other ) const |
bool | operator== ( const QLatin1Constant & other ) const |
Q_DECLARE_LATIN1_CONSTANT | |
Q_DEFINE_LATIN1_CONSTANT |
The QLatin1Constant class holds a Latin 1 string constant
Returns the value of this literal as a C style string (null terminated).
Returns false if this QLatin1Constant is the same as other (either same object or same string literal), and true otherwise.
Returns true if this QLatin1Constant is the same as other (either same object or same string literal), and false otherwise.
This macro, along with the related Q_DEFINE_LATIN1_CONSTANT macro, allows you to describe a "Latin 1 string constant".
The resulting constant can be passed to functions accepting a QLatin1String, a QString, or a QVariant.
The first parameter is the name of the variable to declare. The second parameter is the value of the constant, as a string literal.
For example:
// in a header file Q_DECLARE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT");
The declaration should be paired with a matching Q_DEFINE_LATIN1_CONSTANT with the same arguments to actually define the constant.
See also Q_DEFINE_LATIN1_CONSTANT.
This macro, along with the related Q_DECLARE_LATIN1_CONSTANT macro, allows you to describe a "Latin 1 string constant".
The resulting constant can be passed to functions accepting a QLatin1String, a QString, or a QVariant.
The first parameter is the name of the variable to define. The second parameter is the value of the constant, as a string literal.
For example:
// in a header file Q_DECLARE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT"); // in source file Q_DEFINE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT");
You can use this macro without the matching DECLARE macro if you are using the constant only in a single compilation unit.
See also Q_DECLARE_LATIN1_CONSTANT.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.