Revision a47954c0
Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt
example/models/group.cpp | ||
---|---|---|
|
||
#include "models/person.h"
|
||
#include "models/group.h"
|
||
#include "relation.h"
|
||
//#include <QQmlListProperty>
|
||
#include <QDebug>
|
||
|
||
... | ... | |
{
|
||
teacher = value;
|
||
}
|
||
QSharedPointer<Artikel> Group::getArtikel() const
|
||
{
|
||
return artikel;
|
||
}
|
||
|
||
void Group::setArtikel(const QSharedPointer<Artikel> &value)
|
||
{
|
||
artikel = value;
|
||
}
|
||
|
||
|
||
|
||
|
||
... | ... | |
qDebug() << "changed!";
|
||
}
|
||
|
||
QHash<QString, CuteEntityManager::Relation> Group::getRelations()
|
||
{
|
||
QHash<QString, CuteEntityManager::Relation> h = QHash<QString, CuteEntityManager::Relation>();
|
||
CuteEntityManager::Relation r = CuteEntityManager::Relation("artikel",CuteEntityManager::BELONGS_TO);
|
||
h.insert("artikel", r);
|
||
return h;
|
||
}
|
||
|
||
//void Group::appendPerson(QQmlListProperty<Person> *list, Person *p) {
|
||
// Group *group = qobject_cast<Group*>(list->object);
|
||
// if(group && p) {
|
Auch abrufbar als: Unified diff
some wip