The QScriptProgram class encapsulates a Qt Script program. More...
#include <QScriptProgram>
This class was introduced in Qt 4.7.
QScriptProgram () | |
QScriptProgram ( const QString & sourceCode, const QString fileName = QString(), int firstLineNumber = 1 ) | |
QScriptProgram ( const QScriptProgram & other ) | |
~QScriptProgram () | |
QString | fileName () const |
int | firstLineNumber () const |
bool | isNull () const |
QString | sourceCode () const |
bool | operator!= ( const QScriptProgram & other ) const |
QScriptProgram & | operator= ( const QScriptProgram & other ) |
bool | operator== ( const QScriptProgram & other ) const |
The QScriptProgram class encapsulates a Qt Script program.
QScriptProgram retains the compiled representation of the script if possible. Thus, QScriptProgram can be used to evaluate the same script multiple times more efficiently.
QScriptEngine engine; QScriptProgram program("1 + 2"); QScriptValue result = engine.evaluate(program);
Constructs a null QScriptProgram.
Constructs a new QScriptProgram with the given sourceCode, fileName and firstLineNumber.
Constructs a new QScriptProgram that is a copy of other.
Destroys this QScriptProgram.
Returns the filename associated with this program.
Returns the line number associated with this program.
Returns true if this QScriptProgram is null; otherwise returns false.
Returns the source code of this program.
Returns true if this QScriptProgram is not equal to other; otherwise returns false.
Assigns the other value to this QScriptProgram.
Returns true if this QScriptProgram is equal to other; otherwise returns false.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.