Revision 6e6097fb
Von Christian Ehringfeld vor mehr als 7 Jahren hinzugefügt
src/entity.h | ||
---|---|---|
#include <QObject>
|
||
#include <QSharedPointer>
|
||
#include <QStringList>
|
||
#include <QMetaProperty>
|
||
#include "relation.h"
|
||
#include "validators/validatorrule.h"
|
||
#include "validators/errormsg.h"
|
||
... | ... | |
signals:
|
||
void idChanged();
|
||
|
||
#define EM_LIST_MACRO(type) \
|
||
virtual void setListProperty(QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) { \
|
||
QList<QSharedPointer<type>> list = *reinterpret_cast<QList<QSharedPointer<type>>*>(&entList); \
|
||
QVariant var; \
|
||
var.setValue<QList<QSharedPointer<type>>>(list); \
|
||
property.write(this, var); \
|
||
}
|
||
|
||
|
||
public:
|
||
virtual QString toString() const;
|
||
/**
|
||
... | ... | |
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);
|
||
}
|
||
|
||
protected:
|
||
explicit Entity (QObject *parent = 0);
|
Auch abrufbar als: Unified diff
huray