#include <QCursor>
#include <QString>
#include <QVector>
#include <QXmlStreamReader>
Go to the source code of this file.
QString QLocaleToString |
( |
const QLocale & |
locale | ) |
|
Definition at line 59 of file QtToString.cpp.
61 return QString (
"%1/%2")
62 .arg (QLocale::languageToString (locale.language()))
63 .arg (QLocale::countryToString(locale.country()));
QString QPointFToString |
( |
const QPointF & |
pos | ) |
|
Definition at line 17 of file QtToString.cpp.
19 QString str = QString (
"(%1, %2)")
QString QRectFToString |
( |
const QRectF & |
rectF | ) |
|
Definition at line 26 of file QtToString.cpp.
28 QString str = QString (
"(%1x%2+%3+%4)")
QString QtCursorToString |
( |
Qt::CursorShape |
cursorShape | ) |
|
Definition at line 37 of file QtToString.cpp.
39 if (cursorShapesLookupTable.count () == 0) {
42 cursorShapesLookupTable [Qt::ArrowCursor] =
"Qt::ArrowCursor";
43 cursorShapesLookupTable [Qt::BitmapCursor] =
"Qt::BitmapCursor";
44 cursorShapesLookupTable [Qt::CrossCursor] =
"Qt::CrossCursor";
45 cursorShapesLookupTable [Qt::WaitCursor] =
"Qt::WaitCursor";
48 if (cursorShapesLookupTable.contains (cursorShape)) {
50 return cursorShapesLookupTable [cursorShape];
54 return "Qt::<unknown>";
QString QTransformToString |
( |
const QTransform & |
transform | ) |
|
Definition at line 66 of file QtToString.cpp.
68 const int FIELD_WIDTH = 12;
70 QString str = QString (
"%1 %2 %3 %4\n"
74 .arg (transform.m11 (), FIELD_WIDTH)
75 .arg (transform.m12 (), FIELD_WIDTH)
76 .arg (transform.m13 (), FIELD_WIDTH)
78 .arg (transform.m21 (), FIELD_WIDTH)
79 .arg (transform.m22 (), FIELD_WIDTH)
80 .arg (transform.m23 (), FIELD_WIDTH)
82 .arg (transform.m31 (), FIELD_WIDTH)
83 .arg (transform.m32 (), FIELD_WIDTH)
84 .arg (transform.m33 (), FIELD_WIDTH);
const QString INDENTATION_PAST_TIMESTAMP
QString QXmlStreamReaderTokenTypeToString |
( |
QXmlStreamReader::TokenType |
tokenType | ) |
|
Definition at line 89 of file QtToString.cpp.
91 if (xmlTokenTypeLookupTable.count () == 0) {
94 xmlTokenTypeLookupTable [QXmlStreamReader::Characters] =
"Characters";
95 xmlTokenTypeLookupTable [QXmlStreamReader::Comment] =
"Comment";
96 xmlTokenTypeLookupTable [QXmlStreamReader::DTD] =
"DTD";
97 xmlTokenTypeLookupTable [QXmlStreamReader::EndDocument] =
"EndDocument";
98 xmlTokenTypeLookupTable [QXmlStreamReader::EndElement] =
"EndElement";
99 xmlTokenTypeLookupTable [QXmlStreamReader::EntityReference] =
"EntityReference";
100 xmlTokenTypeLookupTable [QXmlStreamReader::Invalid] =
"Invalid";
101 xmlTokenTypeLookupTable [QXmlStreamReader::NoToken] =
"NoToken";
102 xmlTokenTypeLookupTable [QXmlStreamReader::ProcessingInstruction] =
"ProcessingInstruction";
103 xmlTokenTypeLookupTable [QXmlStreamReader::StartDocument] =
"StartDocument";
104 xmlTokenTypeLookupTable [QXmlStreamReader::StartElement] =
"StartElement";
107 if (xmlTokenTypeLookupTable.contains (tokenType)) {
109 return xmlTokenTypeLookupTable [tokenType];
QString roleAsString |
( |
int |
role | ) |
|
Definition at line 118 of file QtToString.cpp.
120 if (rolesAsStringsLookupTable.count () == 0) {
123 rolesAsStringsLookupTable [Qt::AccessibleDescriptionRole] =
"AccessibleDescriptionRole";
124 rolesAsStringsLookupTable [Qt::AccessibleTextRole] =
"AccessibleTextRole";
125 rolesAsStringsLookupTable [Qt::BackgroundRole] =
"BackgroundRole";
126 rolesAsStringsLookupTable [Qt::BackgroundColorRole] =
"BackgroundColorRole";
127 rolesAsStringsLookupTable [Qt::CheckStateRole] =
"CheckStateRole";
128 rolesAsStringsLookupTable [Qt::DecorationRole] =
"DecorationRole";
129 rolesAsStringsLookupTable [Qt::DisplayRole] =
"DisplayRole";
130 rolesAsStringsLookupTable [Qt::EditRole] =
"EditRole";
131 rolesAsStringsLookupTable [Qt::FontRole] =
"FontRole";
132 rolesAsStringsLookupTable [Qt::ForegroundRole] =
"ForegroundRole";
133 rolesAsStringsLookupTable [Qt::InitialSortOrderRole] =
"InitialSortOrderRole";
134 rolesAsStringsLookupTable [Qt::SizeHintRole] =
"SizeHintRole";
135 rolesAsStringsLookupTable [Qt::StatusTipRole] =
"StatusTipRole";
136 rolesAsStringsLookupTable [Qt::TextAlignmentRole] =
"TextAlignmentRole";
137 rolesAsStringsLookupTable [Qt::TextColorRole] =
"TextColorRole";
138 rolesAsStringsLookupTable [Qt::ToolTipRole] =
"ToolTipRole";
139 rolesAsStringsLookupTable [Qt::UserRole] =
"UserRole";
140 rolesAsStringsLookupTable [Qt::WhatsThisRole] =
"WhatsThisRole";
143 if (rolesAsStringsLookupTable.contains (role)) {
145 return rolesAsStringsLookupTable [role];
149 return QString (
"%1?").arg (role);
QString rolesAsString |
( |
const QVector< int > & |
roles | ) |
|
Definition at line 154 of file QtToString.cpp.
158 for (
int i = 0; i < roles.count (); i++) {
QString roleAsString(int role)