Projekt

Allgemein

Profil

Herunterladen als
Herunterladen (1,54 KB) Statistiken
| Zweig: | Revision:
1cee0f5b Christian Ehringfeld
#ifndef ADDRESS_H
#define ADDRESS_H

#include <QString>
af84b9c4 Christian Ehringfeld
#include <QHash>
1cee0f5b Christian Ehringfeld
#include "entity.h"

af84b9c4 Christian Ehringfeld
class Person;
class Relation;
class Pupil;
class Address: public CuteEntityManager::Entity {
1cee0f5b Christian Ehringfeld
Q_OBJECT

af84b9c4 Christian Ehringfeld
Q_PROPERTY(QString label READ getLabel WRITE setLabel)
Q_PROPERTY(QString street READ getStreet WRITE setStreet)
Q_PROPERTY(QString postcode READ getPostcode WRITE setPostcode)
Q_PROPERTY(QString city READ getCity WRITE setCity)
Q_PROPERTY(QList<QSharedPointer<Person>> persons READ
getPersons WRITE setPersons)
Q_PROPERTY(QList<QSharedPointer<Pupil>> pupils READ
getPupils WRITE setPupils)
1cee0f5b Christian Ehringfeld
af84b9c4 Christian Ehringfeld
public:
1cee0f5b Christian Ehringfeld
Q_INVOKABLE Address() {}
Address(QString label, QString street, QString postcode, QString city);

af84b9c4 Christian Ehringfeld
QString getLabel() const;
void setLabel(const QString &value);
1cee0f5b Christian Ehringfeld
af84b9c4 Christian Ehringfeld
QString getStreet() const;
void setStreet(const QString &value);
1cee0f5b Christian Ehringfeld
af84b9c4 Christian Ehringfeld
QString getPostcode() const;
void setPostcode(const QString &value);
1cee0f5b Christian Ehringfeld
af84b9c4 Christian Ehringfeld
QString getCity() const;
void setCity(const QString &value);

QList<QSharedPointer<Person> > getPersons() const;
void setPersons(const QList<QSharedPointer<Person> > &value);

const QHash<QString, CuteEntityManager::Relation> getRelations() const override;

QList<QSharedPointer<Pupil> > getPupils() const;
void setPupils(const QList<QSharedPointer<Pupil> > &value);
1cee0f5b Christian Ehringfeld
protected:
af84b9c4 Christian Ehringfeld
QString label;
QString street;
QString postcode;
QString city;
QList<QSharedPointer<Person>> persons;
QList<QSharedPointer<Pupil>> pupils;
1cee0f5b Christian Ehringfeld
};

#endif // ADDRESS_H