32#ifndef _QX_REGISTER_QT_META_PROPERTY_H_
33#define _QX_REGISTER_QT_META_PROPERTY_H_
46#include <QtCore/qmetaobject.h>
47#include <QtCore/qmetatype.h>
53#define QX_REGISTER_ALL_QT_PROPERTIES(className, propertyId) \
55template <> void register_class(QxClass< className > & t) \
56{ qx::register_all_qt_properties< className >(t, propertyId); } }
66 int iIndexId = (sPropertyId.isEmpty() ? -2 : (pMetaObject ? pMetaObject->indexOfProperty(qPrintable(sPropertyId)) : -1));
67 if (! pMetaObject || (iIndexId == -1)) {
qAssert(
false);
return; }
69 for (
int i = pMetaObject->propertyOffset(); i < pMetaObject->propertyCount(); i++)
71 QMetaProperty prop = pMetaObject->property(i);
72 if (i == iIndexId) { t.
id(sPropertyId, 0); }
73 else { t.
data(prop.name(), 0); }
Concrete class registered into QxOrm context.
qx::QxClass<T> : concrete class of type T registered into QxOrm context (this class is a singleton an...
IxDataMember * id(type_primary_key T::*pDataMemberId, const QString &sKey, long lVersion=0)
IxDataMember * data(const QString &sKey, long lVersion)
Root namespace for all QxOrm library features.
void register_all_qt_properties(QxClass< T > &t, const QString &sPropertyId)