// qvariant.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtCore Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ModuleCode #include %End class QVariant { %TypeHeaderCode #include %End public: enum Type { Invalid, Bool, Int, UInt, LongLong, ULongLong, Double, Char, Map, List, String, StringList, ByteArray, BitArray, Date, Time, DateTime, Url, Locale, Rect, RectF, Size, SizeF, Line, LineF, Point, PointF, RegExp, Font, Pixmap, Brush, Color, Palette, Icon, Image, Polygon, Region, Bitmap, Cursor, SizePolicy, KeySequence, Pen, TextLength, TextFormat, %If (Qt_4_2_0 -) Matrix, %End %If (Qt_4_3_0 -) Transform, %End UserType, }; QVariant(); QVariant(QVariant::Type type); QVariant(int typeOrUserType, const void *copy); QVariant(const QVariant &other); QVariant(QDataStream &s); QVariant(bool b /Constrained/); QVariant(int i /Constrained/); QVariant(double d /Constrained/); QVariant(qlonglong ll); QVariant(qulonglong ull); QVariant(const QString &string); QVariant(const QByteArray &bytearray); QVariant(const QBitArray &bitarray); 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 &list); QVariant(const QMap &map); 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); %If (Qt_4_2_0 -) QVariant(Qt::GlobalColor color); %End ~QVariant(); QVariant::Type type() const; int userType() const; const char *typeName() const; bool canConvert(QVariant::Type t) const; bool convert(QVariant::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; 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 toList() const; QMap toMap() const; QPoint toPoint() const; QPointF toPointF() const; QSize toSize() const; QSizeF toSizeF() const; QLine toLine() const; QLineF toLineF() const; QRect toRect() const; QRectF toRectF() const; QUrl toUrl() const; QLocale toLocale() const; QRegExp toRegExp() const; void load(QDataStream &ds); void save(QDataStream &ds) const; static const char *typeToName(QVariant::Type type); static QVariant::Type nameToType(const char *name); void *data(); bool operator==(const QVariant &v) const; bool operator!=(const QVariant &v) const; }; typedef QList QVariantList; typedef QMap QVariantMap; QDataStream &operator>>(QDataStream &s, QVariant &p /Constrained/); QDataStream &operator<<(QDataStream &s, const QVariant &p /Constrained/); QDataStream &operator>>(QDataStream &s, QVariant::Type &p /Constrained,In/); QDataStream &operator<<(QDataStream &s, const QVariant::Type p /Constrained/); %If (Qt_4_3_0 -) void qSwap(QVariant &value1, QVariant &value2); %End