|
Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The QMetaType class manages named types in the meta-object system. More...


Public Member Functions | |
| QMetaType () | |
| QMetaType (QMetaType copy) | |
| virtual void | CreateProxy () |
| new void | Dispose () |
Static Public Member Functions | |
| static bool | IsRegistered (int type) |
| More... | |
| static int | RegisterTypedef (string typeName, int aliasId) |
| static int | type (string typeName) |
| More... | |
| static string | TypeName (int type) |
| More... | |
| static void | UnregisterType (string typeName) |
| More... | |
Protected Member Functions | |
| QMetaType (System.Type dummy) | |
Protected Attributes | |
| SmokeInvocation | interceptor |
Properties | |
| virtual System.IntPtr | SmokeObject [get, set] |
The QMetaType class manages named types in the meta-object system.
The class is used as a helper to marshall types in QVariant and in queued signals and slots connections. It associates a type name to a type so that it can be created and destructed dynamically at run-time. Declare new types with Q_DECLARE_METATYPE() to make them available to QVariant and other template-based functions. Call qRegisterMetaType() to make type available to non-template based functions, such as the queued signal and slot connections.
Any class or struct that has a public default constructor, a public copy constructor, and a public destructor can be registered.
The following code allocates and destructs an instance of MyClass:
int id = QMetaType::type("MyClass");
if (id != 0) {
void *myClassPtr = QMetaType::construct(id);
...
QMetaType::destroy(id, myClassPtr);
myClassPtr = 0;
}
If we want the stream operators operator<<() and operator>>() to work on QVariant objects that store custom types, the custom type must provide operator<<() and operator>>() operators.
See also Q_DECLARE_METATYPE(), QVariant::setValue(), QVariant::value(), and QVariant::fromValue().
These are the built-in types supported by QMetaType:
Additional types can be registered using Q_DECLARE_METATYPE().
See also type() and typeName().
| Enumerator | |
|---|---|
| Bool |
Bool |
| Char |
Char |
| Double |
Double |
| FirstCoreExtType | |
| FirstGuiType | |
| Float |
Float |
| Int |
Int |
| LastCoreExtType | |
| LastCoreType | |
| LastGuiType | |
| Long |
Long |
| LongLong |
LongLong |
| QBitArray | |
| QBitmap |
QBitmap |
| QBrush |
QBrush |
| QByteArray | |
| QChar | |
| QColor |
QColor |
| QCursor |
QCursor |
| QDate | |
| QDateTime | |
| QEasingCurve | |
| QFont |
QFont |
| QIcon |
QIcon |
| QImage |
QImage |
| QKeySequence |
QKeySequence |
| QLine | |
| QLineF | |
| QLocale | |
| QMatrix |
QMatrix |
| QMatrix4x4 |
QMatrix4x4 |
| QObjectStar |
QObject * |
| QPalette |
QPalette |
| QPen |
QPen |
| QPixmap |
QPixmap |
| QPoint | |
| QPointF | |
| QPolygon |
QPolygon |
| QQuaternion |
QQuaternion |
| QReal | |
| QRect | |
| QRectF | |
| QRegExp | |
| QRegion |
QRegion |
| QSize | |
| QSizeF | |
| QSizePolicy |
QSizePolicy |
| QString |
QString |
| QStringList |
QStringList |
| QTextFormat |
QTextFormat |
| QTextLength |
QTextLength |
| QTime | |
| QTransform |
QTransform |
| QUrl | |
| QVariant | |
| QVariantHash |
QVariantHash |
| QVariantList |
QVariantList |
| QVariantMap |
QVariantMap |
| QVector2D |
QVector2D |
| QVector3D |
QVector3D |
| QVector4D |
QVector4D |
| QWidgetStar |
QWidget * |
| Short |
Short |
| UChar |
Unsigned char |
| UInt |
Unsigned int |
| ULong |
Unsigned long |
| ULongLong |
ULongLong |
| UShort |
Unsigned short |
| User |
Base value for user types |
| Void |
Void |
| VoidStar |
Void * |
|
protected |
| QtCore.QMetaType.QMetaType | ( | ) |

| QtCore.QMetaType.QMetaType | ( | QMetaType | copy | ) |

|
virtual |

| new void QtCore.QMetaType.Dispose | ( | ) |
|
static |
Returns true if the datatype with ID type is registered; otherwise returns false.
See also type(), typeName(), and Type.
|
static |
|
static |
Returns a handle to the type called typeName, or 0 if there is no such type.
See also isRegistered(), typeName(), and Type.
|
static |
Returns the type name associated with the given type, or 0 if no matching type was found. The returned pointer must not be deleted.
See also type(), isRegistered(), and Type.
|
static |
|
protected |
|
getset |