Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 75cecd67

Von Christian Ehringfeld vor mehr als 7 Jahren hinzugefügt

  • ID 75cecd6788d56ed391e44e354609ec91116335db
  • Vorgänger 638e5843
  • Nachfolger 949b3ea3

hmm

Unterschiede anzeigen:

src/entity.h
#include "relation.h"
#include "validators/validatorrule.h"
#include "validators/errormsg.h"
#include <QDebug>
namespace CuteEntityManager {
/**
......
signals:
void idChanged();
#define EM_LIST_MACRO(type) \
virtual void setListProperty(QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) { \
#define EM_MACRO(type) \
virtual void setAsListProperty(const QSharedPointer<Entity> &e,QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) override { \
QList<QSharedPointer<type>> list = *reinterpret_cast<QList<QSharedPointer<type>>*>(&entList); \
QVariant var; \
var.setValue<QList<QSharedPointer<type>>>(list); \
property.write(this, var); \
property.write(e.data(), var); \
}
//#define EM_PROPERTY(type,attribute,getter,setter)
......
//#define EM_LIST_PROPERTY(type,attribute,getter,setter)
// Q_PROPERTY(QList<QSharedPointer<type>> attribute READ getter WRITE setter)
// EM_LIST_MACRO(type)
// EM_MACRO(type)
......
QList<ErrorMsg> getErrors() const;
QString getErrorsAsString() const;
void setErrors(const QList<ErrorMsg> &value);
virtual void setListProperty(QList<QSharedPointer<Entity>> &entList,
const QMetaProperty &property) {
Q_UNUSED(entList);
Q_UNUSED(property);
}
virtual void setAsListProperty(const QSharedPointer<Entity> &e, QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) = 0;
protected:
explicit Entity (QObject *parent = 0);

Auch abrufbar als: Unified diff