Definition at line 100 of file qvariant.h.
#include <qvariant.h>
Classes |
|
| struct | Handler |
| struct | Private |
| struct | PrivateShared |
Public Types |
|
| enum | Type
{ Invalid = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5, Double = 6, Char = 7, Map = 8, List = 9, String = 10, StringList = 11, ByteArray = 12, BitArray = 13, Date = 14, Time = 15, DateTime = 16, Url = 17, Locale = 18, Rect = 19, RectF = 20, Size = 21, SizeF = 22, Line = 23, LineF = 24, Point = 25, PointF = 26, RegExp = 27, Hash = 28, EasingCurve = 29, LastCoreType = EasingCurve, Font = 64, Pixmap = 65, Brush = 66, Color = 67, Palette = 68, Icon = 69, Image = 70, Polygon = 71, Region = 72, Bitmap = 73, Cursor = 74, SizePolicy = 75, KeySequence = 76, Pen = 77, TextLength = 78, TextFormat = 79, Matrix = 80, Transform = 81, Matrix4x4 = 82, Vector2D = 83, Vector3D = 84, Vector4D = 85, Quaternion = 86, LastGuiType = Quaternion, UserType = 127, LastType = 0xffffffff } |
| typedef void(* | f_construct )(Private *, const void *) |
| typedef void(* | f_clear )(Private *) |
| typedef bool(* | f_null )(const Private *) |
| typedef void(* | f_load )(Private *, QDataStream &) |
| typedef void(* | f_save )(const Private *, QDataStream &) |
| typedef bool(* | f_compare )(const Private *, const Private *) |
| typedef bool(* | f_convert )(const QVariant::Private *d, Type t, void *, bool *) |
| typedef bool(* | f_canConvert )(const QVariant::Private *d, Type t) |
| typedef void(* | f_debugStream )(QDebug, const QVariant &) |
| typedef Private | DataPtr |
Public Member Functions |
|
| QVariant () | |
| ~QVariant () | |
| QVariant (Type type) | |
| QVariant (int typeOrUserType, const void *copy) | |
| QVariant (int typeOrUserType, const void *copy, uint flags) | |
| QVariant (const QVariant &other) | |
| QVariant (QDataStream &s) | |
| QVariant (int i) | |
| QVariant (uint ui) | |
| QVariant (qlonglong ll) | |
| QVariant (qulonglong ull) | |
| QVariant (bool b) | |
| QVariant (double d) | |
| QVariant (float f) | |
| QT_ASCII_CAST_WARN_CONSTRUCTOR | QVariant (const char *str) |
| QVariant (const QByteArray &bytearray) | |
| QVariant (const QBitArray &bitarray) | |
| QVariant (const QString &string) | |
| QVariant (const QLatin1String &string) | |
| QVariant (const QStringList &stringlist) | |
| QVariant (const QChar &qchar) | |
| QVariant (const QDate &date) | |
| QVariant (const QTime &time) | |
| QVariant (const QDateTime &datetime) | |
| QVariant (const QList< QVariant > &list) | |
| QVariant (const QMap< QString, QVariant > &map) | |
| QVariant (const QHash< QString, QVariant > &hash) | |
| QVariant (const QSize &size) | |
| QVariant (const QSizeF &size) | |
| QVariant (const QPoint &pt) | |
| QVariant (const QPointF &pt) | |
| QVariant (const QLine &line) | |
| QVariant (const QLineF &line) | |
| QVariant (const QRect &rect) | |
| QVariant (const QRectF &rect) | |
| QVariant (const QUrl &url) | |
| QVariant (const QLocale &locale) | |
| QVariant (const QRegExp ®Exp) | |
| QVariant (const QEasingCurve &easing) | |
| QVariant (Qt::GlobalColor color) | |
| QVariant & | operator= (const QVariant &other) |
| Type | type () const |
| int | userType () const |
| const char * | typeName () const |
| bool | canConvert (Type t) const |
| bool | convert (Type t) |
| bool | isValid () const |
| bool | isNull () const |
| void | clear () |
| void | detach () |
| bool | isDetached () const |
| int | toInt (bool *ok=0) const |
| uint | toUInt (bool *ok=0) const |
| qlonglong | toLongLong (bool *ok=0) const |
| qulonglong | toULongLong (bool *ok=0) const |
| bool | toBool () const |
| double | toDouble (bool *ok=0) const |
| float | toFloat (bool *ok=0) const |
| qreal | toReal (bool *ok=0) const |
| QByteArray | toByteArray () const |
| QBitArray | toBitArray () const |
| QString | toString () const |
| QStringList | toStringList () const |
| QChar | toChar () const |
| QDate | toDate () const |
| QTime | toTime () const |
| QDateTime | toDateTime () const |
| QList< QVariant > | toList () const |
| QMap< QString, QVariant > | toMap () const |
| QHash< QString, QVariant > | toHash () const |
| QPoint | toPoint () const |
| QPointF | toPointF () const |
| QRect | toRect () const |
| QSize | toSize () const |
| QSizeF | toSizeF () const |
| QLine | toLine () const |
| QLineF | toLineF () const |
| QRectF | toRectF () const |
| QUrl | toUrl () const |
| QLocale | toLocale () const |
| QRegExp | toRegExp () const |
| QEasingCurve | toEasingCurve () const |
| void | load (QDataStream &ds) |
| void | save (QDataStream &ds) const |
| void * | data () |
| const void * | constData () const |
| const void * | data () const |
| template<typename T > | |
| void | setValue (const T &value) |
| template<typename T > | |
| T | value () const |
| template<typename T > | |
| bool | canConvert () const |
| bool | operator== (const QVariant &v) const |
| bool | operator!= (const QVariant &v) const |
| DataPtr & | data_ptr () |
Static Public Member Functions |
|
| static const char * | typeToName (Type type) |
| static Type | nameToType (const char *name) |
| template<typename T > | |
| static QVariant | fromValue (const T &value) |
Protected Member Functions |
|
| void | create (int type, const void *copy) |
| bool | cmp (const QVariant &other) const |
Protected Attributes |
|
| Private | d |
Static Protected Attributes |
|
| static const Handler * | handler |
Friends |
|
| bool | qvariant_cast_helper (const QVariant &, QVariant::Type, void *) |
| int | qRegisterGuiVariant () |
| int | qUnregisterGuiVariant () |
| bool | operator== (const QVariant &, const QVariantComparisonHelper &) |
| Q_CORE_EXPORT QDebug | operator<< (QDebug, const QVariant &) |
| typedef void(* f_construct)(Private *, const void *) |
Definition at line 382 of file qvariant.h.
Definition at line 383 of file qvariant.h.
Definition at line 384 of file qvariant.h.
| typedef void(* f_load)(Private *, QDataStream &) |
Definition at line 386 of file qvariant.h.
| typedef void(* f_save)(const Private *, QDataStream &) |
Definition at line 387 of file qvariant.h.
Definition at line 389 of file qvariant.h.
| typedef bool(* f_convert)(const QVariant::Private *d, Type t, void *, bool *) |
Definition at line 390 of file qvariant.h.
| typedef bool(* f_canConvert)(const QVariant::Private *d, Type t) |
Definition at line 391 of file qvariant.h.
| typedef void(* f_debugStream)(QDebug, const QVariant &) |
Definition at line 392 of file qvariant.h.
Definition at line 443 of file qvariant.h.
| enum Type |
Definition at line 103 of file qvariant.h.
{
Invalid = 0,
Bool = 1,
Int = 2,
UInt = 3,
LongLong = 4,
ULongLong = 5,
Double = 6,
Char = 7,
Map = 8,
List = 9,
String = 10,
StringList = 11,
ByteArray = 12,
BitArray = 13,
Date = 14,
Time = 15,
DateTime = 16,
Url = 17,
Locale = 18,
Rect = 19,
RectF = 20,
Size = 21,
SizeF = 22,
Line = 23,
LineF = 24,
Point = 25,
PointF = 26,
RegExp = 27,
Hash = 28,
EasingCurve = 29,
LastCoreType = EasingCurve,
// value 62 is internally reserved
#ifdef QT3_SUPPORT
ColorGroup = 63,
#endif
Font = 64,
Pixmap = 65,
Brush = 66,
Color = 67,
Palette = 68,
Icon = 69,
Image = 70,
Polygon = 71,
Region = 72,
Bitmap = 73,
Cursor = 74,
SizePolicy = 75,
KeySequence = 76,
Pen = 77,
TextLength = 78,
TextFormat = 79,
Matrix = 80,
Transform = 81,
Matrix4x4 = 82,
Vector2D = 83,
Vector3D = 84,
Vector4D = 85,
Quaternion = 86,
LastGuiType = Quaternion,
UserType = 127,
#ifdef QT3_SUPPORT
IconSet = Icon,
CString = ByteArray,
PointArray = Polygon,
#endif
LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type
};
| QVariant | ( | ) | [inline] |
Definition at line 488 of file qvariant.h.
{}
| ~QVariant | ( | ) |
| QVariant | ( | int | typeOrUserType, |
| const void * | copy | ||
| ) |
| QVariant | ( | int | typeOrUserType, |
| const void * | copy, | ||
| uint | flags | ||
| ) |
| QVariant | ( | QDataStream & | s | ) |
| QVariant | ( | int | i | ) |
| QVariant | ( | uint | ui | ) |
| QVariant | ( | qulonglong | ull | ) |
| QVariant | ( | bool | b | ) |
| QVariant | ( | double | d | ) |
| QVariant | ( | float | f | ) | [inline] |
Definition at line 192 of file qvariant.h.
| QT_ASCII_CAST_WARN_CONSTRUCTOR QVariant | ( | const char * | str | ) |
| QVariant | ( | const QByteArray & | bytearray | ) |
| QVariant | ( | const QLatin1String & | string | ) |
| QVariant | ( | const QStringList & | stringlist | ) |
| QVariant | ( | const QEasingCurve & | easing | ) |
| QVariant | ( | Qt::GlobalColor | color | ) |
| Type type | ( | ) | const |
| int userType | ( | ) | const |
| const char* typeName | ( | ) | const |
| bool canConvert | ( | Type | t | ) | const |
| bool convert | ( | Type | t | ) |
| bool isValid | ( | ) | const [inline] |
| bool isNull | ( | ) | const |
| void clear | ( | ) |
| void detach | ( | ) |
| bool isDetached | ( | ) | const [inline] |
Definition at line 543 of file qvariant.h.
| int toInt | ( | bool * | ok = 0 |
) | const |
| uint toUInt | ( | bool * | ok = 0 |
) | const |
| qlonglong toLongLong | ( | bool * | ok = 0 |
) | const |
| qulonglong toULongLong | ( | bool * | ok = 0 |
) | const |
| bool toBool | ( | ) | const |
| double toDouble | ( | bool * | ok = 0 |
) | const |
| float toFloat | ( | bool * | ok = 0 |
) | const |
| qreal toReal | ( | bool * | ok = 0 |
) | const |
| QByteArray toByteArray | ( | ) | const |
| QBitArray toBitArray | ( | ) | const |
| QString toString | ( | ) | const |
| QStringList toStringList | ( | ) | const |
| QChar toChar | ( | ) | const |
| QDate toDate | ( | ) | const |
| QTime toTime | ( | ) | const |
| QDateTime toDateTime | ( | ) | const |
| QPoint toPoint | ( | ) | const |
| QPointF toPointF | ( | ) | const |
| QRect toRect | ( | ) | const |
| QSize toSize | ( | ) | const |
| QSizeF toSizeF | ( | ) | const |
| QLine toLine | ( | ) | const |
| QLineF toLineF | ( | ) | const |
| QRectF toRectF | ( | ) | const |
| QUrl toUrl | ( | ) | const |
| QLocale toLocale | ( | ) | const |
| QRegExp toRegExp | ( | ) | const |
| QEasingCurve toEasingCurve | ( | ) | const |
| void load | ( | QDataStream & | ds | ) |
| void save | ( | QDataStream & | ds | ) | const |
| static const char* typeToName | ( | Type | type | ) | [static] |
| static Type nameToType | ( | const char * | name | ) | [static] |
| void* data | ( | ) |
| const void* constData | ( | ) | const |
| const void* data | ( | ) | const [inline] |
| void setValue | ( | const T & | value | ) | [inline] |
Definition at line 532 of file qvariant.h.
{ qVariantSetValue(*this, avalue); }
| T value | ( | ) | const [inline] |
Definition at line 335 of file qvariant.h.
{ return qVariantValue<T>(*this); }
| static QVariant fromValue | ( | const T & | value | ) | [inline, static] |
Definition at line 339 of file qvariant.h.
{ return qVariantFromValue(value); }
| bool canConvert | ( | ) | const [inline] |
Definition at line 343 of file qvariant.h.
{ return qVariantCanConvert<T>(*this); }
| bool operator== | ( | const QVariant & | v | ) | const [inline] |
Definition at line 408 of file qvariant.h.
{ return cmp(v); }
| bool operator!= | ( | const QVariant & | v | ) | const [inline] |
Definition at line 410 of file qvariant.h.
{ return !cmp(v); }
| void create | ( | int | type, |
| const void * | copy | ||
| ) | [protected] |
| bool cmp | ( | const QVariant & | other | ) | const [protected] |
| DataPtr& data_ptr | ( | ) | [inline] |
| bool qvariant_cast_helper | ( | const QVariant & | v, |
| QVariant::Type | tp, | ||
| void * | ptr | ||
| ) | [friend] |
Definition at line 451 of file qvariant.h.
{ return QVariant::handler->convert(&v.d, tp, ptr, 0); }
| int qRegisterGuiVariant | ( | ) | [friend] |
| int qUnregisterGuiVariant | ( | ) | [friend] |
| bool operator== | ( | const QVariant & | v1, |
| const QVariantComparisonHelper & | v2 | ||
| ) | [friend] |
Definition at line 565 of file qvariant.h.
{
return v1.cmp(*v2.v);
}
Definition at line 421 of file qvariant.h.
Definition at line 423 of file qvariant.h.