-
Notifications
You must be signed in to change notification settings - Fork 3
/
dataobject.cpp
51 lines (43 loc) · 902 Bytes
/
dataobject.cpp
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
43
44
45
46
47
48
49
50
51
#include <QDebug>
#include "dataobject.h"
DataObject::DataObject(QObject *parent)
: QObject(parent)
{
}
DataObject::DataObject(const QString &name, const QString &security, const QString &code, QObject *parent)
: QObject(parent), m_name(name), m_security(security), m_code(code)
{
}
QString DataObject::name() const
{
return m_name;
}
void DataObject::setName(const QString &name)
{
if (name != m_name) {
m_name = name;
emit nameChanged();
}
}
QString DataObject::security() const
{
return m_security;
}
void DataObject::setSecurity(const QString &security)
{
if (security != m_security) {
m_security = security;
emit securityChanged();
}
}
QString DataObject::code() const
{
return m_code;
}
void DataObject::setCode(const QString &code)
{
if (code != m_code) {
m_code = code;
emit codeChanged();
}
}