Eneboo - Documentación para desarrolladores
Señales | Métodos públicos | Slots protegidos | Amigas
Referencia de la Clase QSScript

The QSScript class provides encapsulation of a script written in Qt Script. Más...

#include <qsscript.h>

Diagrama de herencias de QSScript
QObject Qt Qt

Lista de todos los miembros.

Señales

void codeChanged ()

Métodos públicos

virtual ~QSScript ()
QString name () const
QString code () const
QObjectcontext () const
void setCode (const QString &code)
void addCode (const QString &code)
bool addFunction (const QString &funcName, const QString &funcBody=QString::null)
QSProjectproject () const
QString fileName () const
void setFileName (const QString &name)
QString baseFileName () const
void setBaseFileName (const QString &name)

Slots protegidos

virtual void objectDestroyed ()

Amigas

class QSProject

Descripción detallada

The QSScript class provides encapsulation of a script written in Qt Script.

A script is a container for a script written in Qt Script. It always belongs to a project and it can only be created using the QSProject::createScript() functions. The QSScript can be associated with a QObject which will serve as the context ( this ) when the script is evaluated. QSScripts and their contexts, if any, are associated by name as follows:

  script->name() == script->context()->name()

Use the functions setCode(), addCode(), and addFunction() to modify the contents of the script. Use the function code() to retreive the contents in the script. When the script is changed, the signal codeChanged() is emitted.


Documentación del constructor y destructor

QSScript::~QSScript ( ) [virtual]

Documentación de las funciones miembro

void QSScript::addCode ( const QString code)

Appends the code code to the code in this script. This function will emit codeChanged()

bool QSScript::addFunction ( const QString functionName,
const QString functionBody = QString::null 
)

A function called functionName is added to this script. The name must match the regular expression {/^[A-Za-z_][A-Za-z_0-9]*$/}.

The code for the function can be passed in the functionBody parameter. If functionBody was specified, its text will appear in the editor; if the functionBody is empty a new empty function will be created.

This function returns TRUE on success (i.e. the functionName was valid); otherwise returns FALSE.

QString QSScript::baseFileName ( ) const
QString QSScript::code ( ) const

Returns the scriptcode.

void QSScript::codeChanged ( ) [signal]

This signal is emitted whenever the scriptcode has changed.

QObject* QSScript::context ( ) const [inline]
QString QSScript::fileName ( ) const
QString QSScript::name ( ) const

Returns the name of the script. If the script has a context, this name is the same as the name of the object context()->name().

Reimplementado de QObject.

void QSScript::objectDestroyed ( ) [protected, virtual, slot]
QSProject * QSScript::project ( ) const

Returns the project that this script belongs to.

void QSScript::setBaseFileName ( const QString name)
void QSScript::setCode ( const QString code)

Sets the code in this script to code. This function will emit codeChanged().

void QSScript::setFileName ( const QString name)

Documentación de las funciones relacionadas y clases amigas

friend class QSProject [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'