QAxScript Class Reference |
Constant | Value | Description |
---|---|---|
QAxScript::FunctionNames | 0 | Only function names are returned. |
QAxScript::FunctionSignatures | 1 | Returns the functions with signatures. |
Constructs a QAxScript object called name and registers it with the QAxScriptManager manager. This is usually done by the QAxScriptManager class when loading a script.
A script should always have a name. A manager is necessary to allow the script code to reference objects in the application. The manager takes ownership of the object.
Destroys the object, releasing all allocated resources.
Calls function, passing the parameters var1, var1, var2, var3, var4, var5, var6, var7 and var8 as arguments and returns the value returned by the function, or an invalid QVariant if the function does not return a value or when the function call failed.
See QAxScriptManager::call() for more information about how to call script functions.
This is an overloaded member function, provided for convenience.
Calls function passing arguments as parameters, and returns the result. Returns when the script's execution has finished.
See QAxScriptManager::call() for more information about how to call script functions.
This signal is emitted when a script engine has started executing code.
This signal is emitted when an execution error occurred while running a script.
code, description, sourcePosition and sourceText contain information about the execution error.
This signal is emitted when a script engine has finished executing code.
This is an overloaded member function, provided for convenience.
result contains the script's result. This will be an invalid QVariant if the script has no return value.
This is an overloaded member function, provided for convenience.
code, source, description and help contain exception information when the script terminated.
Returns a list of all the functions in this script if the respective script engine supports introspection; otherwise returns an empty list. The functions are either provided with full prototypes or only as names, depending on the value of flags.
See also QAxScriptEngine::hasIntrospection().
Loads the script source code written in language language into the script engine. Returns true if code was successfully entered into the script engine; otherwise returns false.
If language is empty (the default) it will be determined heuristically. If code contains the string End Sub it will be interpreted as VBScript, otherwise as JScript. Additional scripting languages can be registered using QAxScript::registerEngine().
This function can only be called once for each QAxScript object, which is done automatically when using QAxScriptManager::load().
Returns the script's code, or the null-string if no code has been loaded yet.
See also load().
Returns a pointer to the script engine.
You can use the object returned to connect signals to the script functions, or to access the script engine directly.
Returns the name of the script.
This signal is emitted when a script engine changes state. state can be any value in the QAxScriptEngineState enumeration.
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 4.1 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com