// This is the SIP interface definition for TQVariant. // // Copyright (c) 2007 // Riverbank Computing Limited // // This file is part of PyTQt. // // This copy of PyTQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2, or (at your option) any later // version. // // PyTQt 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 // PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ExportedDoc TQVariant (TQt v2.1+) TQVariant const char *val Not implemented. TQVariant const TQBitArray &val Not yet implemented. (TQt v3+) TQVariant const TQValueList<TQVariant> &val Not yet implemented. TQVariant const TQMap<TQString,TQVariant> &val Not yet implemented. TQBitArray &asBitArray Not yet implemented. (TQt v3+) bool &asBool Not implemented. double &asDouble Not implemented. int &asInt Not implemented. TQValueList<TQVariant> &asList Not implemented. TQMap<TQString,TQVariant> &asMap Not implemented. uint &asUInt Not implemented. TQValueListConstIterator<TQVariant>listBegin const Not implemented. TQValueListConstIterator<TQVariant>listEnd const Not implemented. TQMapConstIterator<TQString,TQVariant>mapBegin const Not implemented. TQMapConstIterator<TQString,TQVariant>mapEnd const Not implemented. TQMapConstIterator<TQString,TQVariant>mapFind const const TQString &key Not implemented. TQValueListConstIterator<TQString>stringListBegin const Not implemented. TQValueListConstIterator<TQString>stringListEnd const Not implemented. const TQBitArray toBitArray const Not yet implemented. (TQt v3+) const TQValueList<TQVariant>toList const Not yet implemented. const TQMap<TQString,TQVariant>toMap const Not yet implemented. %End %If (TQt_2_1_0 -) class TQVariant { %TypeHeaderCode #include %End public: enum Type { Invalid, Map, List, String, StringList, Font, Pixmap, Brush, Rect, Size, Color, Palette, ColorGroup, IconSet, Point, Image, Int, UInt, Bool, Double, CString, PointArray, Region, Bitmap, Cursor, %If (TQt_2_2_0 -) SizePolicy, %End %If (TQt_3_0_0 -) Date, Time, DateTime, ByteArray, BitArray, KeySequence, %End %If (TQt_3_1_0 -) Pen, %End %If (TQt_3_2_0 -) LongLong, ULongLong, %End }; TQVariant(); TQVariant(const TQVariant &); TQVariant(TQDataStream &); TQVariant(const TQString &); TQVariant(const TQCString &); // TQVariant(const char *); TQVariant(const TQStringList &); TQVariant(const TQFont &); TQVariant(const TQPixmap &); TQVariant(const TQImage &); TQVariant(const TQBrush &); TQVariant(const TQPoint &); TQVariant(const TQRect &); TQVariant(const TQSize &); TQVariant(const TQColor &); TQVariant(const TQPalette &); TQVariant(const TQColorGroup &); TQVariant(const TQIconSet &); TQVariant(const TQPointArray &); TQVariant(const TQRegion &); TQVariant(const TQBitmap &); TQVariant(const TQCursor &); %If (TQt_3_0_0 -) TQVariant(const TQDate &); TQVariant(const TQTime &); TQVariant(const TQDateTime &); TQVariant(const TQByteArray &); // TQVariant(const TQBitArray &); %End // TQVariant(const TQValueList &); // TQVariant(const TQMap &); TQVariant(int /Constrained/); // TQVariant(uint); %If (TQt_3_2_0 -) // TQVariant(Q_LLONG); // TQVariant(Q_ULLONG); %End TQVariant(bool,int); TQVariant(double); %If (TQt_2_2_0 -) TQVariant(TQSizePolicy); %End %If (TQt_3_0_0 -) // This must appear after the TQString, int and double ctors because // each of those can be converted automatically to a TQKeySequence and // we want those to take precedence. TQVariant(const TQKeySequence &); %End %If (TQt_3_1_0 -) TQVariant(const TQPen &); %End Type type() const; const char* typeName() const; bool canCast(Type) const; %If (TQt_3_0_0 -) bool cast(Type); %End bool isValid() const; %If (TQt_3_1_0 -) bool isNull() const; %End void clear(); const TQString toString() const; const TQCString toCString() const; const TQStringList toStringList() const; const TQFont toFont() const; const TQPixmap toPixmap() const; const TQImage toImage() const; const TQBrush toBrush() const; const TQPoint toPoint() const; const TQRect toRect() const; const TQSize toSize() const; const TQColor toColor() const; const TQPalette toPalette() const; const TQColorGroup toColorGroup() const; const TQIconSet toIconSet() const; const TQPointArray toPointArray() const; const TQBitmap toBitmap() const; const TQRegion toRegion() const; const TQCursor toCursor() const; %If (TQt_3_0_0 -) const TQDate toDate() const; const TQTime toTime() const; const TQDateTime toDateTime() const; const TQByteArray toByteArray() const; // const TQBitArray toBitArray() const; const TQKeySequence toKeySequence() const; %End %If (TQt_3_1_0 -) const TQPen toPen() const; %End int toInt() const; uint toUInt() const; %If (TQt_3_2_0 -) // Q_LLONG toLongLong(bool * = 0) const; // Q_ULLONG toULongLong( bool * = 0) const; %End bool toBool() const; double toDouble() const; // const TQValueList toList() const; // const TQMap toMap() const; %If (TQt_2_2_0 -) TQSizePolicy toSizePolicy() const; %End // TQValueListConstIterator listBegin() const; // TQValueListConstIterator listEnd() const; // TQValueListConstIterator stringListBegin() const; // TQValueListConstIterator stringListEnd() const; // TQMapConstIterator mapBegin() const; // TQMapConstIterator mapEnd() const; // TQMapConstIterator mapFind(const TQString &) const; TQString & asString(); TQCString & asCString(); TQStringList & asStringList(); TQFont & asFont(); TQPixmap & asPixmap(); TQImage & asImage(); TQBrush & asBrush(); TQPoint & asPoint(); TQRect & asRect(); TQSize & asSize(); TQColor & asColor(); TQPalette & asPalette(); TQColorGroup & asColorGroup(); TQIconSet & asIconSet(); TQPointArray & asPointArray(); TQBitmap & asBitmap(); TQRegion & asRegion(); TQCursor & asCursor(); %If (TQt_3_0_0 -) TQDate & asDate(); TQTime & asTime(); TQDateTime & asDateTime(); TQByteArray & asByteArray(); // TQBitArray & asBitArray(); TQKeySequence & asKeySequence(); %End %If (TQt_3_1_0 -) TQPen & asPen(); %End // int & asInt(); // uint & asUInt(); %If (TQt_3_2_0 -) // Q_LLONG & asLongLong(); // Q_ULLONG & asULongLong(); %End // bool & asBool(); // double & asDouble(); // TQValueList & asList(); // TQMap & asMap(); %If (TQt_2_2_0 -) TQSizePolicy & asSizePolicy(); %End void load(TQDataStream &); void save(TQDataStream &) const; static const char *typeToName(Type); static Type nameToType(const char *); }; %End