QScriptContextInfo Class Reference
|
Constant | Value | Description |
---|---|---|
QScriptContextInfo::ScriptFunction | 0 | The function is a Qt Script function, i.e. it was defined through a call to QScriptEngine::evaluate(). |
QScriptContextInfo::QtFunction | 1 | The function is a Qt function (a signal, slot or method). |
QScriptContextInfo::QtPropertyFunction | 2 | The function is a Qt property getter or setter. |
QScriptContextInfo::NativeFunction | 3 | The function is a built-in Qt Script function, or it was defined through a call to QScriptEngine::newFunction(). |
Constructs a new QScriptContextInfo from the given context.
The relevant information is extracted from the context at construction time; i.e. if you continue script execution in the context, the new state of the context will not be reflected in a previously created QScriptContextInfo.
Constructs a new QScriptContextInfo from the other info.
Constructs a null QScriptContextInfo.
See also isNull().
Destroys the QScriptContextInfo.
Returns the column number corresponding to the statement being executed, or -1 if the column number is not available.
The column number is only available if Qt Script code is being executed.
See also lineNumber() and fileName().
Returns the name of the file where the code being executed was defined, if available; otherwise returns an empty string.
For Qt Script code, this function returns the fileName argument that was passed to QScriptEngine::evaluate().
See also lineNumber() and functionName().
Returns the line number where the definition of the called function ends, or -1 if the line number is not available.
The ending line number is only available if the functionType() is ScriptFunction.
See also functionStartLineNumber().
Returns the meta index of the called function, or -1 if the meta index is not available.
The meta index is only available if the functionType() is QtFunction or QtPropertyFunction. For QtFunction, the meta index can be passed to QMetaObject::method() to obtain the corresponding method definition; for QtPropertyFunction, the meta index can be passed to QMetaObject::property() to obtain the corresponding property definition.
See also QScriptContext::thisObject().
Returns the name of the called function, or an empty string if the name is not available.
For script functions of type QtPropertyFunction, this function always returns the name of the property; you can use QScriptContext::argumentCount() to differentiate between reads and writes.
See also fileName() and functionType().
Returns the names of the formal parameters of the called function, or an empty QStringList if the parameter names are not available.
See also QScriptContext::argument().
Returns the line number where the definition of the called function starts, or -1 if the line number is not available.
The starting line number is only available if the functionType() is ScriptFunction.
See also functionEndLineNumber() and fileName().
Returns the type of the called function.
See also functionName() and QScriptContext::callee().
Returns true if this QScriptContextInfo is null, i.e. does not contain any information.
Returns the line number corresponding to the statement being executed, or -1 if the line number is not available.
The line number is only available if Qt Script code is being executed.
See also columnNumber() and fileName().
Returns the ID of the script where the code being executed was defined, or -1 if the ID is not available (i.e. a native function is being executed).
See also QScriptEngineAgent::scriptLoad().
Returns true if this QScriptContextInfo is not equal to the other info, otherwise returns false.
Assigns the other info to this QScriptContextInfo, and returns a reference to this QScriptContextInfo.
Returns true if this QScriptContextInfo is equal to the other info, otherwise returns false.
This is an overloaded member function, provided for convenience.
Writes the given info to the specified stream.
This function was introduced in Qt 4.4.
This is an overloaded member function, provided for convenience.
Reads a QScriptContextInfo from the specified stream into the given info.
This function was introduced in Qt 4.4.
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 qtextended4.4 | |
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