Qt 4.8
|
#include <qdeclarativetypeloader_p.h>
Classes | |
struct | ScriptReference |
struct | TypeDataCallback |
struct | TypeReference |
Public Functions | |
QDeclarativeCompiledData * | compiledData () const |
const QDeclarativeImports & | imports () const |
const QDeclarativeScriptParser & | parser () const |
QDeclarativeTypeData (const QUrl &, QDeclarativeTypeLoader::Options, QDeclarativeTypeLoader *) | |
void | registerCallback (TypeDataCallback *) |
const QList< ScriptReference > & | resolvedScripts () const |
const QList< TypeReference > & | resolvedTypes () const |
QDeclarativeTypeLoader * | typeLoader () const |
void | unregisterCallback (TypeDataCallback *) |
~QDeclarativeTypeData () | |
Public Functions inherited from QDeclarativeDataBlob | |
void | addDependency (QDeclarativeDataBlob *) |
Wait for blob to become complete or to error. More... | |
QList< QDeclarativeError > | errors () const |
Return the errors on this blob. More... | |
QUrl | finalUrl () const |
Returns the final url of the data. More... | |
bool | isComplete () const |
Returns true if the status is Complete. More... | |
bool | isCompleteOrError () const |
Returns true if the status is Complete or Error. More... | |
bool | isError () const |
Returns true if the status is Error. More... | |
bool | isLoading () const |
Returns true if the status is Loading. More... | |
bool | isNull () const |
Returns true if the status is Null. More... | |
bool | isWaiting () const |
Returns true if the status is WaitingForDependencies. More... | |
qreal | progress () const |
Returns the data download progress from 0 to 1. More... | |
QDeclarativeDataBlob (const QUrl &, Type) | |
Create a new QDeclarativeDataBlob for url and of the provided type. More... | |
void | setError (const QDeclarativeError &) |
Mark this blob as having errors. More... | |
void | setError (const QList< QDeclarativeError > &errors) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Status | status () const |
Returns the blob's status. More... | |
Type | type () const |
Returns the type provided to the constructor. More... | |
QUrl | url () const |
Returns the blob url passed to the constructor. More... | |
virtual | ~QDeclarativeDataBlob () |
Public Functions inherited from QDeclarativeRefCount | |
void | addref () |
QDeclarativeRefCount () | |
void | release () |
virtual | ~QDeclarativeRefCount () |
Protected Functions | |
virtual void | allDependenciesDone () |
Called when all blobs waited for have completed. More... | |
virtual void | dataReceived (const QByteArray &) |
Invoked when data for the blob is received. More... | |
virtual void | done () |
Invoked once data has either been received or a network error occurred, and all dependencies are complete. More... | |
virtual void | downloadProgressChanged (qreal) |
Called when the download progress of this blob changes. More... | |
Protected Functions inherited from QDeclarativeDataBlob | |
virtual void | dependencyComplete (QDeclarativeDataBlob *) |
Called if blob, which was previously waited for, has completed. More... | |
virtual void | dependencyError (QDeclarativeDataBlob *) |
Called if blob, which was previously waited for, has an error. More... | |
virtual void | networkError (QNetworkReply::NetworkError) |
Invoked if there is a network error while fetching this blob. More... | |
Private Functions | |
void | compile () |
QDeclarativeQmldirData * | qmldirForUrl (const QUrl &) |
void | resolveTypes () |
Properties | |
QList< TypeDataCallback * > | m_callbacks |
QDeclarativeCompiledData * | m_compiledData |
QDeclarativeImports | m_imports |
QDeclarativeTypeLoader::Options | m_options |
QList< QDeclarativeQmldirData * > | m_qmldirs |
QList< ScriptReference > | m_scripts |
QDeclarativeTypeLoader * | m_typeLoader |
QList< TypeReference > | m_types |
bool | m_typesResolved:1 |
QDeclarativeScriptParser | scriptParser |
Additional Inherited Members | |
Public Types inherited from QDeclarativeDataBlob | |
enum | Status { Null, Loading, WaitingForDependencies, Complete, Error } |
This enum describes the status of the data blob. More... | |
enum | Type { QmlFile, JavaScriptFile, QmldirFile } |
This enum describes the type of the data blob. More... | |
Definition at line 224 of file qdeclarativetypeloader_p.h.
QDeclarativeTypeData::QDeclarativeTypeData | ( | const QUrl & | url, |
QDeclarativeTypeLoader::Options | options, | ||
QDeclarativeTypeLoader * | manager | ||
) |
Definition at line 864 of file qdeclarativetypeloader.cpp.
QDeclarativeTypeData::~QDeclarativeTypeData | ( | ) |
Definition at line 871 of file qdeclarativetypeloader.cpp.
|
protectedvirtual |
Called when all blobs waited for have completed.
This occurs regardless of whether they are in error, or complete state.
The default implementation does nothing.
Reimplemented from QDeclarativeDataBlob.
Definition at line 1024 of file qdeclarativetypeloader.cpp.
|
private |
Definition at line 1040 of file qdeclarativetypeloader.cpp.
Referenced by done().
QDeclarativeCompiledData * QDeclarativeTypeData::compiledData | ( | ) | const |
Definition at line 908 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeCompiler::buildDynamicMeta(), QDeclarativeCompiler::compile(), QDeclarativeBinding::createBinding(), and QDeclarativeComponentPrivate::fromTypeData().
|
protectedvirtual |
Invoked when data for the blob is received.
Implementors should use this callback to determine a blob's dependencies. Within this callback you may call setError() or addDependency().
Implements QDeclarativeDataBlob.
Definition at line 983 of file qdeclarativetypeloader.cpp.
|
protectedvirtual |
Invoked once data has either been received or a network error occurred, and all dependencies are complete.
You can set an error in this method, but you cannot add new dependencies. Implementors should use this callback to finalize processing of data.
The default implementation does nothing.
Reimplemented from QDeclarativeDataBlob.
Definition at line 929 of file qdeclarativetypeloader.cpp.
|
protectedvirtual |
Called when the download progress of this blob changes.
progress goes from 0 to 1.
Reimplemented from QDeclarativeDataBlob.
Definition at line 1032 of file qdeclarativetypeloader.cpp.
const QDeclarativeImports & QDeclarativeTypeData::imports | ( | ) | const |
Definition at line 888 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeCompiler::buildDynamicMeta(), QDeclarativeCompiler::buildProperty(), QDeclarativeCompiler::buildPropertyInNamespace(), QDeclarativeCompiler::compileTree(), QDeclarativeCompiler::completeComponentBuild(), QDeclarativeCompiler::evaluateEnum(), QDeclarativeCompiler::resolveType(), and QDeclarativeCompiler::testQualifiedEnumAssignment().
const QDeclarativeScriptParser & QDeclarativeTypeData::parser | ( | ) | const |
Definition at line 893 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeCompiler::compile(), and QDeclarativeDomDocument::load().
|
private |
Definition at line 1185 of file qdeclarativetypeloader.cpp.
Referenced by resolveTypes().
void QDeclarativeTypeData::registerCallback | ( | TypeDataCallback * | callback | ) |
Definition at line 916 of file qdeclarativetypeloader.cpp.
const QList< QDeclarativeTypeData::ScriptReference > & QDeclarativeTypeData::resolvedScripts | ( | ) | const |
Definition at line 903 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeCompiler::compileTree().
const QList< QDeclarativeTypeData::TypeReference > & QDeclarativeTypeData::resolvedTypes | ( | ) | const |
Definition at line 898 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeCompiler::buildProperty(), QDeclarativeCompiler::buildSignal(), and QDeclarativeCompiler::compile().
|
private |
Definition at line 1059 of file qdeclarativetypeloader.cpp.
Referenced by allDependenciesDone().
QDeclarativeTypeLoader * QDeclarativeTypeData::typeLoader | ( | ) | const |
Definition at line 883 of file qdeclarativetypeloader.cpp.
Referenced by compile(), dataReceived(), and resolveTypes().
void QDeclarativeTypeData::unregisterCallback | ( | TypeDataCallback * | callback | ) |
Definition at line 922 of file qdeclarativetypeloader.cpp.
Referenced by QDeclarativeComponentPrivate::clear().
|
private |
Definition at line 294 of file qdeclarativetypeloader_p.h.
Referenced by done(), downloadProgressChanged(), registerCallback(), and unregisterCallback().
|
private |
Definition at line 292 of file qdeclarativetypeloader_p.h.
Referenced by compile(), compiledData(), and ~QDeclarativeTypeData().
|
private |
Definition at line 284 of file qdeclarativetypeloader_p.h.
Referenced by compile(), dataReceived(), imports(), and resolveTypes().
|
private |
Definition at line 279 of file qdeclarativetypeloader_p.h.
Referenced by done().
|
private |
Definition at line 287 of file qdeclarativetypeloader_p.h.
Referenced by dataReceived(), qmldirForUrl(), and ~QDeclarativeTypeData().
|
private |
Definition at line 286 of file qdeclarativetypeloader_p.h.
Referenced by dataReceived(), done(), resolvedScripts(), and ~QDeclarativeTypeData().
|
private |
Definition at line 296 of file qdeclarativetypeloader_p.h.
Referenced by resolveTypes(), and typeLoader().
|
private |
Definition at line 289 of file qdeclarativetypeloader_p.h.
Referenced by done(), resolvedTypes(), resolveTypes(), and ~QDeclarativeTypeData().
|
private |
Definition at line 290 of file qdeclarativetypeloader_p.h.
Referenced by allDependenciesDone().
|
private |
Definition at line 283 of file qdeclarativetypeloader_p.h.
Referenced by dataReceived(), done(), parser(), and resolveTypes().