-
Notifications
You must be signed in to change notification settings - Fork 3
/
dataobject.h
42 lines (32 loc) · 916 Bytes
/
dataobject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef DATAOBJECT_H
#define DATAOBJECT_H
#include <QObject>
//![0]
class DataObject : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
Q_PROPERTY(QString security READ security WRITE setSecurity NOTIFY securityChanged)
Q_PROPERTY(QString code READ code WRITE setCode NOTIFY codeChanged)
//![0]
public:
DataObject(QObject *parent=0);
DataObject(const QString &name, const QString &security, const QString &code, QObject *parent=0);
QString name() const;
void setName(const QString &name);
QString security() const;
void setSecurity(const QString &security);
QString code() const;
void setCode(const QString &code);
signals:
void nameChanged();
void securityChanged();
void codeChanged();
private:
QString m_name;
QString m_security;
QString m_code;
//![1]
};
//![1]
#endif // DATAOBJECT_H