42 #ifndef QDECLARATIVEPRIVATE_H 43 #define QDECLARATIVEPRIVATE_H 56 #include <QtCore/qglobal.h> 57 #include <QtCore/qvariant.h> 58 #include <QtCore/qurl.h> 59 #include <QtDeclarative/QDeclarativeListProperty> 60 #include <QtDeclarative/QDeclarativeParserStatus> 61 #include <QtDeclarative/QDeclarativePropertyValueSource> 62 #include <QtDeclarative/QDeclarativePropertyValueInterceptor> 72 template <typename TYPE>
77 hasAttachedProperties = 0
101 template<
class From,
class To,
int N>
104 static inline int cast() {
return -1; }
107 template<
class From,
class To>
110 static inline int cast() {
return int(reinterpret_cast<quintptr>(static_cast<To *>(reinterpret_cast<From *>(0x10000000)))) - 0x10000000; }
113 template<
class From,
class To>
119 static yes_type check(To *);
120 static no_type check(...);
128 template <
typename T>
134 template <
typename T,
bool hasMember>
141 template<
typename ReturnType>
142 static yes_type check(ReturnType *(*)(
QObject *));
143 static no_type check(...);
145 static bool const value =
sizeof(check(&T::qmlAttachedProperties)) ==
sizeof(yes_type);
148 template <
typename T>
152 static bool const value =
false;
155 template<
typename T,
int N>
166 return T::qmlAttachedProperties(obj);
168 template<
typename ReturnType>
170 return &ReturnType::staticMetaObject;
174 return &attachedProperties;
274 inline int qmlRegisterType(
const QUrl &url,
const char *uri,
int versionMajor,
int versionMinor,
const char *qmlName)
293 template<
typename T,
int metaObjectRevision>
299 QByteArray listName(
"QDeclarativeListProperty<" + name +
">");
304 qRegisterMetaType<T *>(pointerName.
constData()),
309 uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
311 QDeclarativePrivate::attachedPropertiesFunc<T>(),
312 QDeclarativePrivate::attachedPropertiesMetaObject<T>(),
334 #endif // QDECLARATIVEPRIVATE_H QObject *(* QDeclarativeAttachedPropertiesFunc)(QObject *)
#define QT_END_NAMESPACE
This macro expands to.
QDeclarativeCustomParser * customParser
void createInto(void *memory)
The QByteArray class provides an array of bytes.
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
AutoParentResult(* AutoParentFunction)(QObject *object, QObject *parent)
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
QDeclarativeAttachedPropertiesFunc attachedPropertiesFunc()
static const QMetaObject * metaObject()
The QObject class is the base class of all Qt objects.
QObject * createParent(QObject *p)
static const QMetaObject * attachedPropertiesMetaObject(ReturnType *(*)(QObject *))
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual ~QDeclarativeElement()
static QDeclarativeAttachedPropertiesFunc func()
int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *)
The QDeclarativeCustomParser class allows you to add new arbitrary types to QML.
static QDeclarativeAttachedPropertiesFunc func()
const char * constData() const
Returns a pointer to the data stored in the byte array.
#define Q_DECLARATIVE_EXPORT
static QObject * attachedProperties(QObject *obj)
void Q_DECLARATIVE_EXPORT qdeclarativeelement_destructor(QObject *)
const QMetaObject * attachedPropertiesMetaObject
static const QMetaObject * metaObject()
QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction
const QMetaObject * metaObject
int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString &reason)
const QMetaObject * extensionMetaObject
The QDeclarativeListProperty class allows applications to expose list-like properties to QML...
const QMetaObject * attachedPropertiesMetaObject()
int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, int versionMinor, const char *qmlName)