Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeWorkerScriptEnginePrivate::ScriptEngine Struct Reference
Inheritance diagram for QDeclarativeWorkerScriptEnginePrivate::ScriptEngine:
QDeclarativeScriptEngine QScriptEngine QObject

Public Functions

virtual QNetworkAccessManagernetworkAccessManager ()
 
 ScriptEngine (QDeclarativeWorkerScriptEnginePrivate *parent)
 
 ~ScriptEngine ()
 
- Public Functions inherited from QDeclarativeScriptEngine
 QDeclarativeScriptEngine (QDeclarativeEnginePrivate *priv)
 
QUrl resolvedUrl (QScriptContext *context, const QUrl &url)
 
virtual ~QDeclarativeScriptEngine ()
 
- Public Functions inherited from QScriptEngine
void abortEvaluation (const QScriptValue &result=QScriptValue())
 Aborts any script evaluation currently taking place in this engine. More...
 
QScriptEngineAgentagent () const
 Returns the agent currently installed on this engine, or 0 if no agent is installed. More...
 
QStringList availableExtensions () const
 Returns a list naming the available extensions that can be imported using the importExtension() function. More...
 
bool canEvaluate (const QString &program) const
 Returns true if program can be evaluated; i. More...
 
void clearExceptions ()
 Clears any uncaught exceptions in this engine. More...
 
void collectGarbage ()
 Runs the garbage collector. More...
 
QScriptContextcurrentContext () const
 Returns the current context. More...
 
QScriptValue defaultPrototype (int metaTypeId) const
 Returns the default prototype associated with the given metaTypeId, or an invalid QScriptValue if no default prototype has been set. More...
 
QScriptValue evaluate (const QString &program, const QString &fileName=QString(), int lineNumber=1)
 Evaluates program, using lineNumber as the base line number, and returns the result of the evaluation. More...
 
QScriptValue evaluate (const QScriptProgram &program)
 Evaluates the given program and returns the result of the evaluation. More...
 
template<typename T >
fromScriptValue (const QScriptValue &value)
 Returns the given value converted to the template type T. More...
 
QScriptValue globalObject () const
 Returns this engine's Global Object. More...
 
bool hasUncaughtException () const
 Returns true if the last script evaluation resulted in an uncaught exception; otherwise returns false. More...
 
QStringList importedExtensions () const
 Returns a list naming the extensions that have been imported using the importExtension() function. More...
 
QScriptValue importExtension (const QString &extension)
 Imports the given extension into this QScriptEngine. More...
 
void installTranslatorFunctions (const QScriptValue &object=QScriptValue())
 Installs translator functions on the given object, or on the Global Object if no object is specified. More...
 
bool isEvaluating () const
 Returns true if this engine is currently evaluating a script, otherwise returns false. More...
 
QScriptValue newActivationObject ()
 
QScriptValue newArray (uint length=0)
 Creates a QtScript object of class Array with the given length. More...
 
QScriptValue newDate (qsreal value)
 Creates a QtScript object of class Date with the given value (the number of milliseconds since 01 January 1970, UTC). More...
 
QScriptValue newDate (const QDateTime &value)
 Creates a QtScript object of class Date from the given value. More...
 
QScriptValue newFunction (FunctionSignature signature, int length=0)
 Creates a QScriptValue that wraps a native (C++) function. More...
 
QScriptValue newFunction (FunctionSignature signature, const QScriptValue &prototype, int length=0)
 Creates a constructor function from fun, with the given length. More...
 
QScriptValue newFunction (FunctionWithArgSignature signature, void *arg)
 
QScriptValue newObject ()
 Creates a QtScript object of class Object. More...
 
QScriptValue newObject (QScriptClass *scriptClass, const QScriptValue &data=QScriptValue())
 Creates a QtScript Object of the given class, scriptClass. More...
 
QScriptValue newQMetaObject (const QMetaObject *metaObject, const QScriptValue &ctor=QScriptValue())
 Creates a QtScript object that represents a QObject class, using the the given metaObject and constructor ctor. More...
 
QScriptValue newQObject (QObject *object, ValueOwnership ownership=QtOwnership, const QObjectWrapOptions &options=0)
 Creates a QtScript object that wraps the given QObject object, using the given ownership. More...
 
QScriptValue newQObject (const QScriptValue &scriptObject, QObject *qtObject, ValueOwnership ownership=QtOwnership, const QObjectWrapOptions &options=0)
 Initializes the given scriptObject to hold the given qtObject, and returns the scriptObject. More...
 
QScriptValue newRegExp (const QRegExp &regexp)
 Creates a QtScript object of class RegExp with the given regexp. More...
 
QScriptValue newRegExp (const QString &pattern, const QString &flags)
 Creates a QtScript object of class RegExp with the given pattern and flags. More...
 
QScriptValue newVariant (const QVariant &value)
 Creates a QtScript object holding the given variant value. More...
 
QScriptValue newVariant (const QScriptValue &object, const QVariant &value)
 Initializes the given Qt Script object to hold the given variant value, and returns the object. More...
 
QScriptValue nullValue ()
 Returns a QScriptValue of the primitive type Null. More...
 
QScriptValue objectById (qint64 id) const
 Returns the object with the given id, or an invalid QScriptValue if there is no object with that id. More...
 
void popContext ()
 Pops the current execution context and restores the previous one. More...
 
int processEventsInterval () const
 Returns the interval in milliseconds between calls to QCoreApplication::processEvents() while the interpreter is running. More...
 
QScriptContextpushContext ()
 Enters a new execution context and returns the associated QScriptContext object. More...
 
 QScriptEngine ()
 Constructs a QScriptEngine object. More...
 
 QScriptEngine (QObject *parent)
 Constructs a QScriptEngine object with the given parent. More...
 
void reportAdditionalMemoryCost (int size)
 Reports an additional memory cost of the given size, measured in bytes, to the garbage collector. More...
 
template<class T >
QScriptValue scriptValueFromQMetaObject ()
 Creates a QScriptValue that represents the Qt class T. More...
 
void setAgent (QScriptEngineAgent *agent)
 Installs the given agent on this engine. More...
 
void setDefaultPrototype (int metaTypeId, const QScriptValue &prototype)
 Sets the default prototype of the C++ type identified by the given metaTypeId to prototype. More...
 
void setGlobalObject (const QScriptValue &object)
 Sets this engine's Global Object to be the given object. More...
 
void setProcessEventsInterval (int interval)
 Sets the interval between calls to QCoreApplication::processEvents to interval milliseconds. More...
 
QScriptValue toObject (const QScriptValue &value)
 Converts the given value to an object, if such a conversion is possible; otherwise returns an invalid QScriptValue. More...
 
template<typename T >
QScriptValue toScriptValue (const T &value)
 Creates a QScriptValue with the given value. More...
 
QScriptString toStringHandle (const QString &str)
 Returns a handle that represents the given string, str. More...
 
QScriptValue uncaughtException () const
 Returns the current uncaught exception, or an invalid QScriptValue if there is no uncaught exception. More...
 
QStringList uncaughtExceptionBacktrace () const
 Returns a human-readable backtrace of the last uncaught exception. More...
 
int uncaughtExceptionLineNumber () const
 Returns the line number where the last uncaught exception occurred. More...
 
QScriptValue undefinedValue ()
 Returns a QScriptValue of the primitive type Undefined. More...
 
virtual ~QScriptEngine ()
 Destroys this QScriptEngine. More...
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Public Variables

QNetworkAccessManageraccessManager
 
QDeclarativeWorkerScriptEnginePrivatep
 
- Public Variables inherited from QDeclarativeScriptEngine
QUrl baseUrl
 
QScriptClassnamedNodeMapClass
 
QScriptClassnodeListClass
 
QString offlineStoragePath
 
QDeclarativeEnginePrivatep
 
QScriptClasssqlQueryClass
 

Additional Inherited Members

- Public Types inherited from QScriptEngine
typedef void(* DemarshalFunction) (const QScriptValue &, void *)
 
typedef QScriptValue(* FunctionSignature) (QScriptContext *, QScriptEngine *)
 
typedef QScriptValue(* FunctionWithArgSignature) (QScriptContext *, QScriptEngine *, void *)
 
typedef QScriptValue(* MarshalFunction) (QScriptEngine *, const void *)
 
enum  QObjectWrapOption {
  ExcludeChildObjects = 0x0001, ExcludeSuperClassMethods = 0x0002, ExcludeSuperClassProperties = 0x0004, ExcludeSuperClassContents = 0x0006,
  SkipMethodsInEnumeration = 0x0008, ExcludeDeleteLater = 0x0010, ExcludeSlots = 0x0020, AutoCreateDynamicProperties = 0x0100,
  PreferExistingWrapperObject = 0x0200
}
 These flags specify options when wrapping a QObject pointer with newQObject(). More...
 
enum  ValueOwnership { QtOwnership, ScriptOwnership, AutoOwnership }
 This enum specifies the ownership when wrapping a C++ value, e. More...
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Signals inherited from QScriptEngine
void signalHandlerException (const QScriptValue &exception)
 This signal is emitted when a script function connected to a signal causes an exception. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Functions inherited from QDeclarativeScriptEngine
static QDeclarativeScriptEngineget (QScriptEngine *e)
 
static QScriptValue resolvedUrl (QScriptContext *ctxt, QScriptEngine *engine)
 
- Static Public Functions inherited from QScriptEngine
static QScriptSyntaxCheckResult checkSyntax (const QString &program)
 Checks the syntax of the given program. More...
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Functions inherited from QScriptEngine
 QScriptEngine (QScriptEnginePrivate &dd, QObject *parent=0)
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

Definition at line 131 of file qdeclarativeworkerscript.cpp.

Constructors and Destructors

◆ ScriptEngine()

QDeclarativeWorkerScriptEnginePrivate::ScriptEngine::ScriptEngine ( QDeclarativeWorkerScriptEnginePrivate parent)
inline

Definition at line 133 of file qdeclarativeworkerscript.cpp.

133 : QDeclarativeScriptEngine(0), p(parent), accessManager(0) {}
QDeclarativeScriptEngine(QDeclarativeEnginePrivate *priv)

◆ ~ScriptEngine()

QDeclarativeWorkerScriptEnginePrivate::ScriptEngine::~ScriptEngine ( )
inline

Definition at line 134 of file qdeclarativeworkerscript.cpp.

Functions

◆ networkAccessManager()

virtual QNetworkAccessManager* QDeclarativeWorkerScriptEnginePrivate::ScriptEngine::networkAccessManager ( )
inlinevirtual

Reimplemented from QDeclarativeScriptEngine.

Definition at line 138 of file qdeclarativeworkerscript.cpp.

138  {
139  if (!accessManager) {
142  } else {
144  }
145  }
146  return accessManager;
147  }
virtual QNetworkAccessManager * create(QObject *parent)=0
Creates and returns a network access manager with the specified parent.
QDeclarativeNetworkAccessManagerFactory * networkAccessManagerFactory() const
Returns the current QDeclarativeNetworkAccessManagerFactory.
The QNetworkAccessManager class allows the application to send network requests and receive replies...

Properties

◆ accessManager

QNetworkAccessManager* QDeclarativeWorkerScriptEnginePrivate::ScriptEngine::accessManager

Definition at line 136 of file qdeclarativeworkerscript.cpp.

◆ p

QDeclarativeWorkerScriptEnginePrivate* QDeclarativeWorkerScriptEnginePrivate::ScriptEngine::p

Definition at line 135 of file qdeclarativeworkerscript.cpp.


The documentation for this struct was generated from the following file: