53 #ifdef QT_BOOTSTRAPPED 54 # ifndef QT_NO_GEOM_VARIANT 55 # define QT_NO_GEOM_VARIANT 63 #ifndef QT_NO_GEOM_VARIANT 72 #define NS(x) QT_PREPEND_NAMESPACE(x) 235 #define QT_ADD_STATIC_METATYPE(STR, TP) \ 236 { STR, sizeof(STR) - 1, TP } 341 #ifndef QT_NO_DATASTREAM 352 #ifndef QT_NO_DATASTREAM
360 #ifndef QT_NO_DATASTREAM 371 #ifndef QT_NO_DATASTREAM 377 int idx =
type(typeName);
380 registerStreamOperators(idx, saveOp, loadOp);
398 #endif // QT_NO_DATASTREAM 408 enum { GuiTypeCount = LastGuiType - FirstGuiType };
410 if (type >= 0 && type <= LastCoreType) {
412 }
else if (type >= FirstGuiType && type <= LastGuiType) {
413 return types[type - FirstGuiType + LastCoreType + 1].typeName;
414 }
else if (type >= FirstCoreExtType && type <= LastCoreExtType) {
415 return types[type - FirstCoreExtType + GuiTypeCount + LastCoreType + 2].typeName;
416 }
else if (type >=
User) {
421 :
static_cast<const char *
>(0);
437 || strcmp(typeName,
types[i].typeName))) {
440 return types[i].type;
456 for (
int v = 0; v < ct->
count(); ++v) {
460 if (customInfo.
alias >= 0)
461 return customInfo.
alias;
478 Constructor constructor)
481 if (!ct || !typeName || !destructor || !constructor)
491 normalizedTypeName.size());
496 normalizedTypeName.size());
501 inf.
destr = destructor;
518 if (!ct || !typeName)
528 normalizedTypeName.size());
537 normalizedTypeName.size());
564 if (!ct || !typeName)
573 for (
int v = 0; v < ct->
count(); ++v) {
592 if (type >= 0 && type <
User) {
609 int length =
qstrlen(typeName);
616 #ifndef QT_NO_QOBJECT 620 normalizedTypeName.size());
623 normalizedTypeName.size());
631 #ifndef QT_NO_DATASTREAM 648 if (!data || !isRegistered(type))
658 stream << qlonglong(*static_cast<const long *>(
data));
661 stream << *static_cast<const int *>(
data);
664 stream << *static_cast<const short *>(
data);
668 stream << *static_cast<const signed char *>(
data);
671 stream << qulonglong(*static_cast<const ulong *>(
data));
674 stream << *static_cast<const uint *>(
data);
677 stream << *static_cast<const qlonglong *>(
data);
680 stream << *static_cast<const qulonglong *>(
data);
683 stream << *static_cast<const ushort *>(
data);
686 stream << *static_cast<const uchar *>(
data);
689 stream << qint8(*static_cast<const bool *>(
data));
692 stream << *static_cast<const float *>(
data);
695 stream << *static_cast<const double *>(
data);
698 stream << *static_cast<const NS(QChar) *>(
data);
700 #ifndef QT_BOOTSTRAPPED 702 stream << *static_cast<const NS(QVariantMap)*>(
data);
705 stream << *static_cast<const NS(QVariantHash)*>(
data);
708 stream << *static_cast<const NS(QVariantList)*>(
data);
711 stream << *static_cast<const NS(QVariant)*>(
data);
715 stream << *static_cast<const NS(QByteArray)*>(
data);
718 stream << *static_cast<const NS(QString)*>(
data);
721 stream << *static_cast<const NS(QStringList)*>(
data);
723 #ifndef QT_BOOTSTRAPPED 725 stream << *static_cast<const NS(QBitArray)*>(
data);
729 stream << *static_cast<const NS(QDate)*>(
data);
732 stream << *static_cast<const NS(QTime)*>(
data);
735 stream << *static_cast<const NS(QDateTime)*>(
data);
737 #ifndef QT_BOOTSTRAPPED 739 stream << *static_cast<const NS(QUrl)*>(
data);
743 stream << *static_cast<const NS(QLocale)*>(
data);
745 #ifndef QT_NO_GEOM_VARIANT 747 stream << *static_cast<const NS(QRect)*>(
data);
750 stream << *static_cast<const NS(QRectF)*>(
data);
753 stream << *static_cast<const NS(QSize)*>(
data);
756 stream << *static_cast<const NS(QSizeF)*>(
data);
759 stream << *static_cast<const NS(QLine)*>(
data);
762 stream << *static_cast<const NS(QLineF)*>(
data);
765 stream << *static_cast<const NS(QPoint)*>(
data);
768 stream << *static_cast<const NS(QPointF)*>(
data);
773 stream << *static_cast<const NS(QRegExp)*>(
data);
776 #ifndef QT_BOOTSTRAPPED 778 stream << *static_cast<const NS(QEasingCurve)*>(
data);
782 case QMetaType::QColorGroup:
847 if (!data || !isRegistered(type))
859 *
static_cast<long *
>(
data) =
long(l);
862 stream >> *
static_cast<int *
>(
data);
865 stream >> *
static_cast<short *
>(
data);
869 stream >> *
static_cast<signed char *
>(
data);
877 stream >> *
static_cast<uint *
>(
data);
894 *
static_cast<bool *
>(
data) = b;
897 stream >> *
static_cast<float *
>(
data);
900 stream >> *
static_cast<double *
>(
data);
905 #ifndef QT_BOOTSTRAPPED 928 #ifndef QT_BOOTSTRAPPED 942 #ifndef QT_BOOTSTRAPPED 950 #ifndef QT_NO_GEOM_VARIANT 981 #ifndef QT_BOOTSTRAPPED 987 case QMetaType::QColorGroup:
1034 #endif // QT_NO_DATASTREAM 1049 return new void *(*
static_cast<void*
const *
>(copy));
1051 return new long(*static_cast<const long*>(copy));
1053 return new int(*static_cast<const int*>(copy));
1055 return new short(*static_cast<const short*>(copy));
1057 return new char(*static_cast<const char*>(copy));
1059 return new ulong(*static_cast<const ulong*>(copy));
1061 return new uint(*static_cast<const uint*>(copy));
1063 return new qlonglong(*static_cast<const qlonglong*>(copy));
1065 return new qulonglong(*static_cast<const qulonglong*>(copy));
1067 return new ushort(*static_cast<const ushort*>(copy));
1069 return new uchar(*static_cast<const uchar*>(copy));
1071 return new bool(*static_cast<const bool*>(copy));
1073 return new float(*static_cast<const float*>(copy));
1075 return new double(*static_cast<const double*>(copy));
1078 #ifndef QT_BOOTSTRAPPED 1094 #ifndef QT_BOOTSTRAPPED 1104 #ifndef QT_BOOTSTRAPPED 1106 return new NS(
QUrl)(*
static_cast<const NS(
QUrl)*
>(copy));
1110 #ifndef QT_NO_GEOM_VARIANT 1128 #ifndef QT_NO_REGEXP 1132 #ifndef QT_BOOTSTRAPPED 1175 #ifndef QT_BOOTSTRAPPED 1191 #ifndef QT_BOOTSTRAPPED 1201 #ifndef QT_BOOTSTRAPPED 1207 #ifndef QT_NO_GEOM_VARIANT 1225 #ifndef QT_NO_REGEXP 1229 #ifndef QT_BOOTSTRAPPED 1241 if (type >= FirstGuiType && type <= LastGuiType) {
1248 if (type < User || !ct || ct->count() <= type -
User)
1271 delete static_cast<void**
>(
data);
1274 delete static_cast<long*
>(
data);
1277 delete static_cast<int*
>(
data);
1280 delete static_cast<short*
>(
data);
1283 delete static_cast<char*
>(
data);
1304 delete static_cast<bool*
>(
data);
1307 delete static_cast<float*
>(
data);
1310 delete static_cast<double*
>(
data);
1315 #ifndef QT_BOOTSTRAPPED 1338 #ifndef QT_BOOTSTRAPPED 1352 #ifndef QT_BOOTSTRAPPED 1360 #ifndef QT_NO_GEOM_VARIANT 1386 #ifndef QT_NO_REGEXP 1391 #ifndef QT_BOOTSTRAPPED 1400 Destructor
destr = 0;
1401 if (type >= FirstGuiType && type <= LastGuiType) {
1409 if (type < User || !ct || ct->count() <= type -
User)
The QVariant class acts like a union for the most common Qt data types.
const QStringList & customTypes
#define QT_END_NAMESPACE
This macro expands to.
The QEasingCurve class provides easing curves for controlling animation.
The QLine class provides a two-dimensional vector using integer precision.
The QRegExp class provides pattern matching using regular expressions.
int count(const T &t) const
Returns the number of occurrences of value in the vector.
The QByteArray class provides an array of bytes.
The QPointF class defines a point in the plane using floating point precision.
The QDate class provides date functions.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
The QSizeF class defines the size of a two-dimensional object using floating point precision...
The QChar class provides a 16-bit Unicode character.
The QLineF class provides a two-dimensional vector using floating point precision.
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
The QStringList class provides a list of strings.
void append(const T &t)
Inserts value at the end of the vector.
static const char * data(const QByteArray &arr)
The QReadLocker class is a convenience class that simplifies locking and unlocking read-write locks f...
QMetaType::Destructor destr
The QWriteLocker class is a convenience class that simplifies locking and unlocking read-write locks ...
const T & at(int i) const
Returns the item at index position i in the vector.
The QBitArray class provides an array of bits.
const char * constData() const
Returns a pointer to the data stored in the byte array.
uint qstrlen(const char *str)
The QDateTime class provides date and time functions.
The QReadWriteLock class provides read-write locking.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
int size() const
Returns the number of bytes in this byte array.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QDataStream class provides serialization of binary data to a QIODevice.
QMetaType::LoadOperator loadOp
QMetaType::SaveOperator saveOp
int size() const
Returns the number of items in the vector.
void clear()
Clears the contents of the byte array and makes it empty.
QMetaType::Constructor constr