⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qvariant.3qt

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.TP\fCSize\fR - a QSize.TP\fCColor\fR - a QColor.TP\fCPalette\fR - a QPalette.TP\fCColorGroup\fR - a QColorGroup.TP\fCIconSet\fR - a QIconSet.TP\fCPoint\fR - a QPoint.TP\fCImage\fR - a QImage.TP\fCInt\fR - an int.TP\fCUInt\fR - an unsigned int.TP\fCBool\fR - a bool.TP\fCDouble\fR - a doublea.TP\fCCString\fR - a QCString.TP\fCPointArray\fR - a QPointArray.TP\fCRegion\fR - a QRegion.TP\fCBitmap\fR - a QBitmap.TP\fCCursor\fR - a QCursor.TP\fCSizePolicy\fR - a QSizePolicy.IP.PPNote that Qt's definition of bool depends on the compiler. qglobal.h has the system-dependent definition of bool..SH MEMBER FUNCTION DOCUMENTATION.SH "QVariant::QVariant ()"Constructs an invalid variant..SH "QVariant::QVariant ( QDataStream & s )"Reads the variant from the data stream..SH "QVariant::QVariant ( QSizePolicy val )"Constructs a new variant with a size policy value..SH "QVariant::QVariant ( bool val, int )"Constructs a new variant with a boolean value. The integer argument is a dummy, necessary for compatibility with certain compiler that even its mother cannot love..SH "QVariant::QVariant ( const QBitmap & val )"Constructs a new variant with a bitmap value..SH "QVariant::QVariant ( const QBrush & val )"Constructs a new variant with a brush value..SH "QVariant::QVariant ( const QColor & val )"Constructs a new variant with a color value..SH "QVariant::QVariant ( const QColorGroup & val )"Constructs a new variant with a color group value..SH "QVariant::QVariant ( const QCString & val )"Constructs a new variant with a c-string value..PPIf you want to modify the QCString you pass to this constructor after this call, we recommend passing a deep copy (see QCString::copy())..SH "QVariant::QVariant ( const QCursor & val )"Constructs a new variant with a cursor value..SH "QVariant::QVariant ( const QFont & val )"Constructs a new variant with a font value..SH "QVariant::QVariant ( const QIconSet & val )"Constructs a new variant with an icon set value..SH "QVariant::QVariant ( const QImage & val )"Constructs a new variant with an image value..PPSince QImage is explicitly shared you may need to pass a deep copy to the variant using QImage::copy()..SH "QVariant::QVariant ( const QMap<QString,QVariant> & val )"Constructs a new variant with a map of QVariants..SH "QVariant::QVariant ( const QPalette & val )"Constructs a new variant with a color palette value..SH "QVariant::QVariant ( const QPixmap & val )"Constructs a new variant with a pixmap value..SH "QVariant::QVariant ( const QPoint & val )"Constructs a new variant with a point value..SH "QVariant::QVariant ( const QPointArray & val )"Constructs a new variant with an point array value..PPSince QPointArray is explicitly shared you may need to pass a deep copy to the variant using QPointArray::copy()..SH "QVariant::QVariant ( const QRect & val )"Constructs a new variant with a rect value..SH "QVariant::QVariant ( const QRegion & val )"Constructs a new variant with a region..SH "QVariant::QVariant ( const QSize & val )"Constructs a new variant with a size value..SH "QVariant::QVariant ( const QString & val )"Constructs a new variant with a string value..SH "QVariant::QVariant ( const QStringList & val )"Constructs a new variant with a string list value..SH "QVariant::QVariant ( const QValueList<QVariant> & val )"Constructs a new variant with a list value..SH "QVariant::QVariant ( const QVariant & p )"Constructs a copy of the variant passed as argument to this constructor. Usually this is a deep copy, but if the stored data type is explicit shared then a shallow copy is made..SH "QVariant::QVariant ( const char * val )"Constructs a new variant with a c-string value, if \fIval\fR is non-null. The variant creates a deep copy of \fIval.\fR.PPIf \fIval\fR is null, the resulting variant has type Invalid..SH "QVariant::QVariant ( double val )"Constructs a new variant with a floating point value..SH "QVariant::QVariant ( int val )"Constructs a new variant with an integer value..SH "QVariant::QVariant ( uint val )"Constructs a new variant with an unsigned integer value..SH "QVariant::~QVariant ()"Destructs the QVariant and the contained object..PPNote that subclasses that re-implement clear() should reimplement the destructor to call clear(). This destructor calls clear(), but since it is the destructor, QVariant::clear() is called rather than any subclass..SH "QBitmap& QVariant::asBitmap ()"Tries to convert the variant to hold a bitmap value. If that is not possible then the variant is set to a null bitmap..PPReturns a reference to the stored bitmap..PPSee also toBitmap()..SH "bool& QVariant::asBool ()"Returns the variant's value as bool reference..SH "QBrush& QVariant::asBrush ()"Tries to convert the variant to hold a brush value. If that is not possible then the variant is set to a default black brush..PPReturns a reference to the stored brush..PPSee also toBrush()..SH "QCString& QVariant::asCString ()"Tries to convert the variant to hold a string value. If that is not possible then the variant is set to an empty string..PPReturns a reference to the stored string..PPSee also toCString()..SH "QColor& QVariant::asColor ()"Tries to convert the variant to hold a QColor value. If that is not possible then the variant is set to an invalid color..PPReturns a reference to the stored color..PPSee also toColor() and QColor::isValid()..SH "QColorGroup& QVariant::asColorGroup ()"Tries to convert the variant to hold a QColorGroup value. If that is not possible then the variant is set to a color group with all colors set to black..PPReturns a reference to the stored color group..PPSee also toColorGroup()..SH "QCursor& QVariant::asCursor ()"Tries to convert the variant to hold a QCursor value. If that is not possible then the variant is set to a default arrow cursor..PPReturns a reference to the stored cursor..PPSee also toCursor()..SH "double& QVariant::asDouble ()"Returns the variant's value as double reference..SH "QFont& QVariant::asFont ()"Tries to convert the variant to hold a QFont. If that is not possible then the variant is set to a default font..PPReturns a reference to the stored font..PPSee also toFont()..SH "QIconSet& QVariant::asIconSet ()"Tries to convert the variant to hold a QIconSet value. If that is not possible then the variant is set to an empty iconset..PPReturns a reference to the stored iconset..PPSee also toIconSet()..SH "QImage& QVariant::asImage ()"Tries to convert the variant to hold an image value. If that is not possible then the variant is set to a null image..PPReturns a reference to the stored image..PPSee also toImage()..SH "int& QVariant::asInt ()"Returns the variant's value as int reference..SH "QValueList<QVariant>& QVariant::asList ()"Returns the variant's value as variant list reference..SH "QMap<QString, QVariant>& QVariant::asMap ()"Returns the variant's value as variant map reference..SH "QPalette& QVariant::asPalette ()"Tries to convert the variant to hold a QPalette value. If that is not possible then the variant is set to a palette with black colors only..PPReturns a reference to the stored palette..PPSee also toString()..SH "QPixmap& QVariant::asPixmap ()"Tries to convert the variant to hold a pixmap value. If that is not possible then the variant is set to a null pixmap..PPReturns a reference to the stored pixmap..PPSee also toPixmap()..SH "QPoint& QVariant::asPoint ()"Tries to convert the variant to hold a point value. If that is not possible then the variant is set to a null point..PPReturns a reference to the stored point..PPSee also toPoint()..SH "QPointArray& QVariant::asPointArray ()"Tries to convert the variant to hold a QPointArray value. If that is not possible then the variant is set to an empty point array..PPReturns a reference to the stored point array..PPSee also toPointArray()..SH "QRect& QVariant::asRect ()"Tries to convert the variant to hold a rectangle value. If that is not possible then the variant is set to an empty rectangle..PPReturns a reference to the stored rectangle..PPSee also toRect()..SH "QRegion& QVariant::asRegion ()"Tries to convert the variant to hold a QRegion value. If that is not possible then the variant is set to a null region..PPReturns a reference to the stored region..PPSee also toRegion()..SH "QSize& QVariant::asSize ()"Tries to convert the variant to hold a QSize value. If that is not possible then the variant is set to an invalid size..PPReturns a reference to the stored size..PPSee also toSize() and QSize::isValid()..SH "QSizePolicy& QVariant::asSizePolicy ()"Tries to convert the variant to hold a QSizePolicy value. If that fails, the variant is set to an arbitrary size policy..SH "QString& QVariant::asString ()"Tries to convert the variant to hold a string value. If that is not possible then the variant is set to an empty string..PPReturns a reference to the stored string..PPSee also toString()..SH "QStringList& QVariant::asStringList ()"Tries to convert the variant to hold a QStringList value. If that is not possible then the variant is set to an empty string list..PPReturns a reference to the stored string list..PPSee also toStringList()..SH "uint& QVariant::asUInt ()"Returns the variant's value as unsigned int reference..SH "bool QVariant::canCast ( Type t ) const"Returns TRUE if the current type of the variant can be cast to the requested type. Such casting is done automatically when calling the toInt(), toBool(), ... or asInt(), asBool(), ... methods..PPThe following casts are done automatically:.TPBool -> Double, Int, UInt.TPDouble -> Int, Bool, UInt.TPInt -> Double, Bool, UInt.TPUInt -> Double, Bool, Int.TPString -> CString.TPCString -> String.TPList -> StringList (if the list contains strings or something that can be cast to a string)..TPStringList -> List.SH "void QVariant::clear ()"Convert this variant to type Invalid and free up any resources used..SH "bool QVariant::isValid () const"Returns TRUE if the storage type of this variant is not QVariant::Invalid..SH "QValueListConstIterator<QVariant> QVariant::listBegin () const"Returns an iterator to the first item in the list, if the variant's type is appropriate, or else a null iterator..SH "QValueListConstIterator<QVariant> QVariant::listEnd () const"Returns the end iterator for the list, if the variant's type is appropriate, or else a null iterator..SH "void QVariant::load ( QDataStream & s )"Internal function for loading a variant. Use the stream operators instead..SH "QMapConstIterator<QString, QVariant> QVariant::mapBegin () const"Returns an iterator to the first item in the map, if the variant's type is appropriate, or else a null iterator..SH "QMapConstIterator<QString, QVariant> QVariant::mapEnd () const"Returns the end iterator for the map, if the variant's type is appropriate, or else a null iterator..SH "QMapConstIterator<QString, QVariant> QVariant::mapFind ( const QString & key ) const"Returns an iterator to the item in the map with \fIkey\fR as key, if the variant's type is appropriate and \fIkey\fR is a valid key, or else a null iterator..SH "QVariant::Type QVariant::nameToType( const char * name ) \fC[static]\fR"Converts the string representation of the storage type to its enum representation..PPIf the string representation cannot be converted to any enum representation, the variant is set to \fCInvalid.\fR.SH "bool QVariant::operator!= ( const QVariant & v ) const"Compares this QVariant with \fIv\fR and returns TRUE if they are not equal, FALSE otherwise..SH "QVariant& QVariant::operator= ( const QVariant & variant )"Assigns the value of some \fIother\fR variant to this variant..PPThis is a deep copy of the variant, but note that if the variant holds an explicitly shared type such as QImage, it is a shallow copy of the (e.g.) QImage..SH "bool QVariant::operator== ( const QVariant & v ) const"Compares this QVariant with \fIv\fR and returns TRUE if they are equal, FALSE otherwise..SH "void QVariant::save ( QDataStream & s ) const"Internal function for saving a variant. Use the stream operators instead..SH "QValueListConstIterator<QString> QVariant::stringListBegin () const"Returns an iterator to the first string in the list, if the variant's type is StringList, or else a null iterator..SH "QValueListConstIterator<QString> QVariant::stringListEnd () const"Returns the end iterator for the list, if the variant's type is StringList, or else a null iterator..SH "const QBitmap QVariant::toBitmap () const"Returns the variant as a QBitmap if the variant has type() Bitmap, or a null QBitmap otherwise..PPSee also asBitmap()..SH "bool QVariant::toBool () const"Returns the variant as a bool if the variant has type() Bool, or FALSE otherwise. The only exceptions to this rule are the types Int, UInt, Double. In this case TRUE is returned if the numerical value is not zero or FALSE otherwise..PPSee also asBool()..SH "const QBrush QVariant::toBrush () const"Returns the variant as a QBrush if the variant has type() Brush, or a default brush (with all black colors) otherwise..PPSee also asBrush()..SH "const QCString QVariant::toCString () const"Returns the variant as a QCString if the variant has type() CString, or a 0 otherwise..PPSee also asCString()..SH "const QColor QVariant::toColor () const"Returns the variant as a QColor if the variant has type() Color, or an invalid color otherwise..PPSee also asColor()..SH "const QColorGroup QVariant::toColorGroup () const"Returns the variant as a QColorGroup if the variant has type() ColorGroup, or a completely black color group otherwise..PPSee also asColorGroup()..SH "const QCursor QVariant::toCursor () const"Returns the variant as a QCursor if the variant has type() Cursor, or the default arrow cursor otherwise..PPSee also asCursor()..SH "double QVariant::toDouble () const"Returns the variant as a double if the variant has type() Double, Int, UInt or Bool, or 0.0 otherwise..PPSee also asDouble()..SH "const QFont QVariant::toFont () const"Returns the variant as a QFont if the variant has type() Font, or the default font otherwise..PPSee also asFont()..SH "const QIconSet QVariant::toIconSet () const"Returns the variant as a QIconSet if the variant has type() IconSet, or an icon set of null pixmaps otherwise..PPSee also asIconSet()..SH "const QImage QVariant::toImage () const"Returns the variant as a QImage if the variant has type() Image, or a null image otherwise..PPSee also asImage()..SH "int QVariant::toInt () const"Returns the variant as an int if the variant has type() Int, UInt, Double or Bool, or 0 otherwise..PPSee also asInt()..SH "const QValueList<QVariant> QVariant::toList () const"Returns the variant as a QValueList<QVariant> if the variant has type() List or StringList, or an empty list otherwise..PPSee also asList()..SH "const QMap<QString, QVariant> QVariant::toMap () const"Returns the variant as a QMap<QString,QVariant> if the variant has type() Map, or an empty map otherwise..PPSee also asMap()..SH "const QPalette QVariant::toPalette () const"Returns the variant as a QPalette if the variant has type() Palette, or a completely black palette otherwise..PPSee also asPalette()..SH "const QPixmap QVariant::toPixmap () const"Returns the variant as a QPixmap if the variant has type() Pixmap, or a null pixmap otherwise..PPSee also asPixmap()..SH "const QPoint QVariant::toPoint () const"Returns the variant as a QPoint if the variant has type() Point, or a the point (0,0) otherwise..PPSee also asPoint()..SH "const QPointArray QVariant::toPointArray () const"Returns the variant as a QPointArray if the variant has type() PointArray, or an empty QPointArray otherwise..PPSee also asPointArray()..SH "const QRect QVariant::toRect () const"Returns the variant as a QRect if the variant has type() Rect, or an empty rectangle otherwise..PPSee also asRect()..SH "const QRegion QVariant::toRegion () const"Returns the variant as a QRegion if the variant has type() Region, or an empty QRegion otherwise..PPSee also asRegion()..SH "const QSize QVariant::toSize () const"Returns the variant as a QSize if the variant has type() Size, or an invalid size otherwise..PPSee also asSize()..SH "QSizePolicy QVariant::toSizePolicy () const"Returns the variant as a QSizePolicy if the variant has type() SizePolicy, or an undefined but legal size policy else..SH "const QString QVariant::toString () const"Returns the variant as a QString if the variant has type() String or CString, or QString::null otherwise..PPSee also asString()..SH "const QStringList QVariant::toStringList () const"Returns the variant as a QStringList if the variant has type() StringList or List of a type that can be converted to QString, or an empty list otherwise..PPSee also asStringList()..SH "uint QVariant::toUInt () const"Returns the variant as an unsigned int if the variant has type() UInt, Int, Double or Bool, or 0 otherwise..PPSee also asUInt()..SH "Type QVariant::type () const"Returns the storage type of the value stored in the variant. Usually it's best to test with canCast() wether the variant can deliver the data type you are interested in..SH "const char* QVariant::typeName () const"Returns the name of the type stored in the variant. The returned strings describe the C++ datatype used to store the data, for example "QFont", "QString" or "QValueList<QVariant>". An Invalid variant returns 0..SH "const char* QVariant::typeToName ( Type typ ) \fC[static]\fR"Converts the enum representation of the storage type to itsstring representation..SH "SEE ALSO".BR http://doc.trolltech.com/qvariant.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -