Herunterladen als
root/samples/example/models/contact.h @ 3fd96253
1cee0f5b | Christian Ehringfeld | #ifndef CONTACT_H
|
|
#define CONTACT_H
|
|||
#include <QString>
|
|||
#include "entity.h"
|
|||
#include "enums.h"
|
|||
class Contact: public CuteEntityManager::Entity
|
|||
{
|
|||
Q_OBJECT
|
|||
3fd96253 | Christian Ehringfeld | Q_PROPERTY(QString content READ getContent WRITE setContent)
|
|
Q_PROPERTY(Enums::ContactCategory category READ getCategory WRITE setCategory)
|
|||
Q_PROPERTY(QString label READ getLabel WRITE setLabel)
|
|||
1cee0f5b | Christian Ehringfeld | ||
public:
|
|||
Q_INVOKABLE Contact() {}
|
|||
3fd96253 | Christian Ehringfeld | Contact(QString label, Enums::ContactCategory category, QString content);
|
|
1cee0f5b | Christian Ehringfeld | ||
3fd96253 | Christian Ehringfeld | QString getContent() const;
|
|
void setContent(const QString &value);
|
|||
1cee0f5b | Christian Ehringfeld | ||
3fd96253 | Christian Ehringfeld | Enums::ContactCategory getCategory() const;
|
|
void setCategory(const Enums::ContactCategory &value);
|
|||
QString getLabel() const;
|
|||
void setLabel(const QString &value);
|
|||
1cee0f5b | Christian Ehringfeld | ||
protected:
|
|||
3fd96253 | Christian Ehringfeld | QString content;
|
|
Enums::ContactCategory category;
|
|||
QString label;
|
|||
1cee0f5b | Christian Ehringfeld | };
|
|
#endif // CONTACT_H
|