Qt 4.8
Public Functions | Public Variables | List of all members
ContextData Struct Reference
Inheritance diagram for ContextData:
QScriptDeclarativeClass::Object UrlContextData

Public Functions

 ContextData ()
 
 ContextData (QDeclarativeContextData *c, QObject *o)
 
QDeclarativeContextDatagetContext (QDeclarativeEngine *engine)
 
QObjectgetScope (QDeclarativeEngine *engine)
 
- Public Functions inherited from QScriptDeclarativeClass::Object
virtual ~Object ()
 

Public Variables

QDeclarativeGuardedContextData context
 
bool isSharedContext:1
 
bool isUrlContext:1
 
QObjectoverrideObject
 
QDeclarativeGuard< QObjectscopeObject
 

Detailed Description

Definition at line 52 of file qdeclarativecontextscriptclass.cpp.

Constructors and Destructors

◆ ContextData() [1/2]

ContextData::ContextData ( )
inline

◆ ContextData() [2/2]

ContextData::ContextData ( QDeclarativeContextData c,
QObject o 
)
inline

Definition at line 54 of file qdeclarativecontextscriptclass.cpp.

55  : context(c), scopeObject(o), overrideObject(0), isSharedContext(false), isUrlContext(false) {}
QDeclarativeGuardedContextData context
QDeclarativeGuard< QObject > scopeObject

Functions

◆ getContext()

QDeclarativeContextData* ContextData::getContext ( QDeclarativeEngine engine)
inline

Definition at line 62 of file qdeclarativecontextscriptclass.cpp.

Referenced by QDeclarativeContextScriptClass::contextFromValue().

62  {
63  if (isSharedContext) {
65  } else {
66  return context.contextData();
67  }
68  }
static QDeclarativeEnginePrivate * get(QDeclarativeEngine *e)
QDeclarativeContextData * sharedContext
QDeclarativeContextData * contextData()
QDeclarativeGuardedContextData context

◆ getScope()

QObject* ContextData::getScope ( QDeclarativeEngine engine)
inline

Definition at line 70 of file qdeclarativecontextscriptclass.cpp.

70  {
71  if (isSharedContext) {
73  } else {
74  return scopeObject.data();
75  }
76  }
static QDeclarativeEnginePrivate * get(QDeclarativeEngine *e)
QDeclarativeGuard< QObject > scopeObject

Properties

◆ context

QDeclarativeGuardedContextData ContextData::context

Definition at line 56 of file qdeclarativecontextscriptclass.cpp.

◆ isSharedContext

bool ContextData::isSharedContext

Definition at line 59 of file qdeclarativecontextscriptclass.cpp.

Referenced by getContext(), and getScope().

◆ isUrlContext

bool ContextData::isUrlContext

◆ overrideObject

QObject* ContextData::overrideObject

◆ scopeObject

QDeclarativeGuard<QObject> ContextData::scopeObject

Definition at line 57 of file qdeclarativecontextscriptclass.cpp.


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