Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision af84b9c4

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID af84b9c49dc80f70ee77216012cb415cba778e7e
  • Vorgänger 94bf67c7
  • Nachfolger 09b2592d

example update

Unterschiede anzeigen:

samples/example/models/contact.cpp
#include "contact.h"
#include "pupil.h"
Contact::Contact(QString label, Category category, QString content) {
this->label = label;
this->category = category;
this->content = content;
}
const QHash<QString, CuteEntityManager::Relation> Contact::getRelations()
const {
auto hash = Entity::getRelations();
hash.insert("persons", CuteEntityManager::Relation("persons",
RelationType::MANY_TO_MANY,
QString("contacts")));
hash.insert("pupils", CuteEntityManager::Relation("pupils",
RelationType::MANY_TO_MANY,
QString("contacts")));
return hash;
}
QString Contact::getContent() const {
return content;
}
......
category = value;
}
QList<QSharedPointer<Person> > Contact::getPersons() const {
return persons;
}
void Contact::setPersons(const QList<QSharedPointer<Person> > &value) {
persons = value;
}
QList<QSharedPointer<Pupil> > Contact::getPupils() const {
return pupils;
}
void Contact::setPupils(const QList<QSharedPointer<Pupil> > &value) {
pupils = value;
}

Auch abrufbar als: Unified diff