This class is defined in the \fBQt ActiveQt Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API.
QAxBase is an abstract class that cannot be used directly, and is instantiated through the subclasses QAxObject and QAxWidget. This class provides the API to access the COM object directly through its IUnknown implementation. If the COM object implements the IDispatch interface, the properties and methods of that object become available as TQt properties and slots.
Properties exposed by the object's IDispatch implementation can be read and written through the property system provided by the TQt Object Model (both subclasses are TQObjects, so you can use setProperty() and property() as with TQObject). Properties with multiple parameters are not supported.
Write-functions for properties and other methods exposed by the object's IDispatch implementation can be called directly using dynamicCall(), or indirectly as slots connected to a signal.
Supported COM datatypes are listed in the first column of following table. The second column is the TQt type that can be used with the TQObject property functions. The third column is the TQt type that is used in the prototype of generated signals and slots for in-parameters, and the last column is the TQt type that is used in the prototype of signals and slots for out-parameters. <center>.nf
Note that the QValueList the object should fill has to be provided as an element in the parameter list of QVariants.
.PP
If you need to access properties or pass parameters of unsupported datatypes you must access the COM object directly through its IDispatch implementation or other interfaces. Those interfaces can be retrieved through queryInterface().
To get the definition of the COM interfaces you will have to use the header files provided with the component you want to use. Some compilers can also import type libraries using the #import compiler directive. See the component documentation to find out which type libraries you have to import, and how to use them.
.PP
If you need to react to events that pass parameters of unsupported datatypes you can use the generic signal that delivers the event data as provided by the COM event.
Creates a QAxBase object that wraps the COM object \fIiface\fR. If \fIiface\fR is 0 (the default), use setControl() to instantiate a COM object.
.SH "QAxBase::~QAxBase ()\fC [virtual]\fR"
Shuts down the COM object and destroys the QAxBase object.
.PP
See also clear().
.SH "QVariant QAxBase::asVariant () const"
Returns a QVariant that wraps the COM object. The variant can then be used as a parameter in e.g. dynamicCall().
.SH "void QAxBase::clear ()\fC [virtual]\fR"
Disconnects and destroys the COM object.
.PP
If you reimplement this function you must also reimplement the destructor to call clear(), and call this implementation at the end of your clear() function.
Disables the class info generation for this ActiveX container. If you don't require any class information about the ActiveX control use this function to speed up the meta object generation.
Note that this function must be called immediately after construction of the object (without passing an object identifier), and before calling QAxWidget->setControl().
.SH "void QAxBase::disableEventSink ()"
Disables the event sink implementation for this ActiveX container. If you don't intend to listen to the ActiveX control's events use this function to speed up the meta object generation.
.PP
Some ActiveX controls might be unstable when connected to an event sink. To get OLE events you must use standard COM methods to register your own event sink. Use queryInterface() to get access to the raw COM object.
.PP
Note that this function should be called immediately after construction of the object (without passing an object identifier), and before calling QAxWidget->setControl().
Disables the meta object generation for this ActiveX container. This also disables the event sink and class info generation. If you don't intend to use the TQt meta object implementation call this function to speed up the meta object generation.
Some ActiveX controls might be unstable when used with OLE automation. Use standard COM methods to use those controls through the COM interfaces provided by queryInterface().
.PP
Note that this function must be called immediately after construction of the object (without passing an object identifier), and before calling QAxWidget->setControl().
Calls the COM object's method \fIfunction\fR, passing the parameters \fIvar1\fR, \fIvar1\fR, \fIvar2\fR, \fIvar3\fR, \fIvar4\fR, \fIvar5\fR, \fIvar6\fR, \fIvar7\fR and \fIvar8\fR, and returns the value returned by the method, or an invalid QVariant if the method does not return a value or when the function call failed.
If \fIfunction\fR is a method of the object the string must be provided as the full prototype, for example as it would be written in a TQObject::connect() call.
All parameters are passed as strings; it depends on the control whether they are interpreted correctly, and is slower than using the prototype with correctly typed parameters.
.PP
If \fIfunction\fR is a property the string has to be the name of the property. The property setter is called when \fIvar1\fR is a valid QVariant, otherwise the getter is called.
It is only possible to call functions through dynamicCall() that have parameters or return values of datatypes supported by QVariant. See the QAxBase class documentation for a list of supported and unsupported datatypes. If you want to call functions that have unsupported datatypes in the parameter list, use queryInterface() to retrieve the appropriate COM interface, and use the function directly.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Calls the COM object's method \fIfunction\fR, passing the parameters in \fIvars\fR, and returns the value returned by the method. If the method does not return a value or when the function call failed this function returns an invalid QVariant object.
.PP
The QVariant objects in \fIvars\fR are updated when the method has out-parameters.
This signal is emitted when the COM object throws an exception while called using the OLE automation interface IDispatch. \fIcode\fR, \fIsource\fR, \fIdesc\fR and \fIhelp\fR provide information about the exception as provided by the COM server and can be used to provide useful feedback to the end user. \fIhelp\fR includes the help file, and the help context ID in brackets, e.g. "filename [id]".
This virtual function is called by setControl() and creates the requested COM object. \fIptr\fR is set to the object's IUnknown implementation. The function returns TRUE if the object initialization succeeded; otherwise the function returns FALSE.
.PP
The default implementation interprets the string returned by control(), and calls initializeRemote(), initializeLicensed() or initializeActive() if the string matches the respective patterns. If no pattern is matched, or if remote or licensed initialization fails, CoCreateInstance is used directly to create the object.
.PP
See the control property documentation for details about supported patterns.
.PP
The interface returned in \fIptr\fR must be referenced exactly once when this function returns. The interface provided by e.g. CoCreateInstance is already referenced, and there is no need to reference it again.
Returns an active instance running on the current machine, and returns the IUnknown interface to the running object in \fIptr\fR. This function returns TRUE if successful, otherwise returns FALSE.
.PP
This function is called by initialize() if the control string contains the substring "}&".
Creates an instance of a licensed control, and returns the IUnknown interface to the object in \fIptr\fR. This functions returns TRUE if successful, otherwise returns FALSE.
.PP
This function is called by initialize() if the control string contains the substring "}:". The license key needs to follow this substring.
Creates the instance on a remote server, and returns the IUnknown interface to the object in \fIptr\fR. This function returns TRUE if successful, otherwise returns FALSE.
.PP
This function is called by initialize() if the control string contains the substring "/{". The information about the remote machine needs to be provided in front of the substring.
.PP
See also initialize().
.SH "bool QAxBase::isNull () const"
Returns TRUE if there is no COM object loaded by this wrapper; otherwise return FALSE.
.PP
See also control.
.SH "PropertyBag QAxBase::propertyBag () const"
Returns a name:value map of all the properties exposed by the COM object.
.PP
This is more efficient than getting multiple properties individually if the COM object supports property bags.
.PP
\fBWarning:\fR It is not guaranteed that the property bag implementation of the COM object returns all properties, or that the properties returned are the same as those available through the IDispatch interface.
Requests the interface \fIuuid\fR from the COM object and sets the value of \fIiface\fR to the provided interface, or to 0 if the requested interface could not be provided.
.PP
Returns the result of the QueryInterface implementation of the COM object.
Returns a pointer to a QAxObject wrapping the COM object provided by the method or property \fIname\fR, passing passing the parameters \fIvar1\fR, \fIvar1\fR, \fIvar2\fR, \fIvar3\fR, \fIvar4\fR, \fIvar5\fR, \fIvar6\fR, \fIvar7\fR and \fIvar8\fR.
.PP
If \fIname\fR is provided by a method the string must include the full function prototype.
.PP
If \fIname\fR is a property the string must be the name of the property, and \fIvar1\fR, ... \fIvar8\fR are ignored.
.PP
The returned QAxObject is a child of this object (which is either of type QAxObject or QAxWidget), and is deleted when this object is deleted. It is however safe to delete the returned object yourself, and you should do so when you iterate over lists of subobjects.
.PP
COM enabled applications usually have an object model publishing certain elements of the application as dispatch interfaces. Use this method to navigate the hierarchy of the object model, e.g.
Sets the name of the COM object wrapped by this QAxBase object. See the "control" property for details.
.SH "void QAxBase::setPropertyBag ( const PropertyBag & bag )"
Sets the properties of the COM object to the corresponding values in \fIbag\fR.
.PP
\fBWarning:\fR You should only set property bags that have been returned by the propertyBag function, as it cannot be guaranteed that the property bag implementation of the COM object supports the same properties that are available through the IDispatch interface.
This generic signal gets emitted when the COM object issues the event \fIname\fR. \fIargc\fR is the number of parameters provided by the event (DISPPARAMS.cArgs), and \fIargv\fR is the pointer to the parameter values (DISPPARAMS.rgvarg). Note that the order of parameter values is turned around, ie. the last element of the array is the first parameter in the function.
The second fastest way is to use the registered control's class name (with or without version number), e.g.
.PP
.nf
.br
ctrl->setControl( "MSCal.Calendar" );
.br
.fi
The slowest, but easiest way to use is to use the control's full name, e.g.
.PP
.nf
.br
ctrl->setControl( "Calendar Control 9.0" );
.br
.fi
.PP
If the component's UUID is used the following patterns can be used to initialize the control on a remote machine, to initialize a licensed control or to connect to a running object:
.TP
To initialize the control on a different machine use the following pattern:
The control's read function always returns the control's UUID, if provided including the license key, and the name of the server, but not including the username, the domain or the password.
.PP
Set this property's value with setControl() and get this property's value with control().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qaxbase.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in