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  · 

QAxScriptEngine Class

The QAxScriptEngine class provides a wrapper around a script engine. More...

 #include <QAxScriptEngine>

Inherits: QAxObject.

Public Types

typedef PropertyBag
enum State { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }

Properties

  • 1 property inherited from QObject

Public Functions

QAxBase(IUnknown * iface = 0)
QAxScriptEngine(const QString & language, QAxScript * script)
virtual ~QAxBase()
~QAxScriptEngine()
void addItem(const QString & name)
QVariant asVariant() const
virtual void clear()
QString control() const
void disableClassInfo()
void disableEventSink()
void disableMetaObject()
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 hasIntrospection() const
bool isNull() const
bool isValid() 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)
QString scriptLanguage() const
bool setControl(const QString &)
void setPropertyBag(const PropertyBag & bag)
virtual void setPropertyWritable(const char * prop, bool ok)
void setState(State st)
State state() const
QStringList verbs() const
  • 1 public function inherited from QAxObject
  • 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 bool initialize(IUnknown ** ptr)
  • 1 protected function inherited from QAxObject
  • 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 QAxScriptEngine class provides a wrapper around a script engine.

Every instance of the QAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. The QAxScript and QAxScriptManager classes provide convenient functions to handle and call script code.

Direct access to the script engine is provided through queryInterface().

Warning: This class is not available with the bcc5.5 and MingW compilers.

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

Member Type Documentation

enum QAxScriptEngine::State

The State enumeration defines the different states a script engine can be in.

ConstantValueDescription
QAxScriptEngine::Uninitialized0The script has been created, but not yet initialized
QAxScriptEngine::Initialized5The script has been initialized, but is not running
QAxScriptEngine::Started1The script can execute code, but does not yet handle events
QAxScriptEngine::Connected2The script can execute code and is connected so that it can handle events
QAxScriptEngine::Disconnected3The script is loaded, but is not connected to event sources
QAxScriptEngine::Closed4The script has been closed.

Member Function Documentation

QAxScriptEngine::QAxScriptEngine(const QString & language, QAxScript * script)

Constructs a QAxScriptEngine object interpreting script code in language provided by the code in script. This is usually done by the QAxScript class when loading a script.

Instances of QAxScriptEngine should always have both a language and a script.

QAxScriptEngine::~QAxScriptEngine()

Destroys the QAxScriptEngine object, releasing all allocated resources.

void QAxScriptEngine::addItem(const QString & name)

Registers an item with the script engine. Script code can refer to this item using name.

bool QAxScriptEngine::hasIntrospection() const

Returns true if the script engine supports introspection; otherwise returns false.

bool QAxScriptEngine::initialize(IUnknown ** ptr) [virtual protected]

Reimplemented from QAxBase::initialize().

bool QAxScriptEngine::isValid() const

Returns true if the script engine has been initialized correctly; otherwise returns false.

long QAxScriptEngine::queryInterface(const QUuid & uuid, void ** iface) const

Requests the interface uuid from the script engine object and sets the value of iface to the provided interface, or to 0 if the requested interface could not be provided.

Returns the result of the QueryInterface implementation of the COM object.

QString QAxScriptEngine::scriptLanguage() const

Returns the scripting language, for example "VBScript", or "JScript".

void QAxScriptEngine::setState(State st)

Sets the state of the script engine to st. Calling this function is usually not necessary.

See also state().

State QAxScriptEngine::state() const

Returns the state of the script engine.

See also setState().

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