Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QAxObject Class

The QAxObject class provides a QObject that wraps a COM object. More...

 #include <QAxObject>

Inherits: QObject and QAxBase.

Inherited by: QAxScriptEngine.

Public Types

typedef PropertyBag

Properties

  • 1 property inherited from QObject

Public Functions

QAxBase(IUnknown * iface = 0)
QAxObject(QObject * parent = 0)
QAxObject(const QString & c, QObject * parent = 0)
QAxObject(IUnknown * iface, QObject * parent = 0)
virtual ~QAxBase()
~QAxObject()
QVariant asVariant() const
virtual void clear()
QString control() const
void disableClassInfo()
void disableEventSink()
void disableMetaObject()
bool doVerb(const QString & verb)
QVariant dynamicCall(const char * function, const QVariant & var1 = QVariant(), const QVariant & var2 = QVariant(), const QVariant & var3 = QVariant(), const QVariant & var4 = QVariant(), const QVariant & var5 = QVariant(), const QVariant & var6 = QVariant(), const QVariant & var7 = QVariant(), const QVariant & var8 = QVariant())
QVariant dynamicCall(const char * function, QList<QVariant> & vars)
QString generateDocumentation()
bool isNull() const
PropertyBag propertyBag() const
virtual bool propertyWritable(const char * prop) const
long queryInterface(const QUuid & uuid, void ** iface) const
QAxObject * querySubObject(const char * name, const QVariant & var1 = QVariant(), const QVariant & var2 = QVariant(), const QVariant & var3 = QVariant(), const QVariant & var4 = QVariant(), const QVariant & var5 = QVariant(), const QVariant & var6 = QVariant(), const QVariant & var7 = QVariant(), const QVariant & var8 = QVariant())
QAxObject * querySubObject(const char * name, QList<QVariant> & vars)
bool setControl(const QString &)
void setPropertyBag(const PropertyBag & bag)
virtual void setPropertyWritable(const char * prop, bool ok)
QStringList verbs() const
  • 31 public functions inherited from QObject

Signals

void exception(int code, const QString & source, const QString & desc, const QString & help)
void propertyChanged(const QString & name)
void signal(const QString & name, int argc, void * argv)

Protected Types

class qt_meta_stringdata_QAxBase_t

Protected Functions

virtual const QMetaObject * fallbackMetaObject() const = 0
virtual bool initialize(IUnknown ** ptr)
bool initializeActive(IUnknown ** ptr)
bool initializeFromFile(IUnknown ** ptr)
bool initializeLicensed(IUnknown ** ptr)
bool initializeRemote(IUnknown ** ptr)

Reimplemented Protected Functions

virtual void connectNotify(const QMetaMethod & signal)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QAxObject class provides a QObject that wraps a COM object.

A QAxObject can be instantiated as an empty object, with the name of the COM object it should wrap, or with a pointer to the IUnknown that represents an existing COM object. If the COM object implements the IDispatch interface, the properties, methods and events of that object become available as Qt properties, slots and signals. The base class, QAxBase, provides an API to access the COM object directly through the IUnknown pointer.

QAxObject is a QObject and can be used as such, e.g. it can be organized in an object hierarchy, receive events and connect to signals and slots.

QAxObject also inherits most of its ActiveX-related functionality from QAxBase, notably dynamicCall() and querySubObject().

Warning: You can subclass QAxObject, but you cannot use the Q_OBJECT macro in the subclass (the generated moc-file will not compile), so you cannot add further signals, slots or properties. This limitation is due to the metaobject information generated in runtime. To work around this problem, aggregate the QAxObject as a member of the QObject subclass.

See also QAxBase, QAxWidget, QAxScript, and ActiveQt Framework.

Member Function Documentation

QAxObject::QAxObject(QObject * parent = 0)

Creates an empty COM object and propagates parent to the QObject constructor. To initialize the object, call setControl.

QAxObject::QAxObject(const QString & c, QObject * parent = 0)

Creates a QAxObject that wraps the COM object c. parent is propagated to the QObject constructor.

See also setControl().

QAxObject::QAxObject(IUnknown * iface, QObject * parent = 0)

Creates a QAxObject that wraps the COM object referenced by iface. parent is propagated to the QObject constructor.

QAxObject::~QAxObject()

Releases the COM object and destroys the QAxObject, cleaning up all allocated resources.

void QAxObject::connectNotify(const QMetaMethod & signal) [virtual protected]

Reimplemented from QObject::connectNotify().

bool QAxObject::doVerb(const QString & verb)

Requests the COM object to perform the action verb. The possible verbs are returned by verbs().

The function returns true if the object could perform the action, otherwise returns false.

This function was introduced in Qt 4.1.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web