Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyinstitution.cpp
Context not available. | |||||
42 | using namespace Icons; | 42 | using namespace Icons; | ||
---|---|---|---|---|---|
43 | 43 | | |||
44 | MyMoneyInstitution::MyMoneyInstitution() : | 44 | MyMoneyInstitution::MyMoneyInstitution() : | ||
45 | MyMoneyObject(), | 45 | MyMoneyObject(*new MyMoneyInstitutionPrivate), | ||
46 | MyMoneyKeyValueContainer(), | 46 | MyMoneyKeyValueContainer() | ||
47 | d_ptr(new MyMoneyInstitutionPrivate) | | |||
48 | { | 47 | { | ||
49 | } | 48 | } | ||
50 | 49 | | |||
Context not available. | |||||
55 | const QString& telephone, | 54 | const QString& telephone, | ||
56 | const QString& manager, | 55 | const QString& manager, | ||
57 | const QString& sortcode) : | 56 | const QString& sortcode) : | ||
58 | MyMoneyKeyValueContainer(), | 57 | MyMoneyObject(*new MyMoneyInstitutionPrivate), | ||
59 | d_ptr(new MyMoneyInstitutionPrivate) | 58 | MyMoneyKeyValueContainer() | ||
60 | { | 59 | { | ||
61 | Q_D(MyMoneyInstitution); | 60 | Q_D(MyMoneyInstitution); | ||
62 | clearId(); | 61 | clearId(); | ||
Context not available. | |||||
70 | } | 69 | } | ||
71 | 70 | | |||
72 | MyMoneyInstitution::MyMoneyInstitution(const QDomElement& node) : | 71 | MyMoneyInstitution::MyMoneyInstitution(const QDomElement& node) : | ||
73 | MyMoneyObject(node), | 72 | MyMoneyObject(*new MyMoneyInstitutionPrivate, node), | ||
74 | MyMoneyKeyValueContainer(node.elementsByTagName(nodeNames[nnKeyValuePairs]).item(0).toElement()), | 73 | MyMoneyKeyValueContainer(node.elementsByTagName(nodeNames[nnKeyValuePairs]).item(0).toElement()) | ||
75 | d_ptr(new MyMoneyInstitutionPrivate) | | |||
76 | { | 74 | { | ||
77 | if (nodeNames[nnInstitution] != node.tagName()) | 75 | if (nodeNames[nnInstitution] != node.tagName()) | ||
78 | throw MYMONEYEXCEPTION("Node was not INSTITUTION"); | 76 | throw MYMONEYEXCEPTION("Node was not INSTITUTION"); | ||
Context not available. | |||||
106 | } | 104 | } | ||
107 | 105 | | |||
108 | MyMoneyInstitution::MyMoneyInstitution(const MyMoneyInstitution& other) : | 106 | MyMoneyInstitution::MyMoneyInstitution(const MyMoneyInstitution& other) : | ||
109 | MyMoneyObject(other.id()), | 107 | MyMoneyObject(*new MyMoneyInstitutionPrivate(*other.d_func()), other.id()), | ||
110 | MyMoneyKeyValueContainer(other), | 108 | MyMoneyKeyValueContainer(other) | ||
111 | d_ptr(new MyMoneyInstitutionPrivate(*other.d_func())) | | |||
112 | { | 109 | { | ||
113 | } | 110 | } | ||
114 | 111 | | |||
115 | MyMoneyInstitution::MyMoneyInstitution(const QString& id, const MyMoneyInstitution& other) : | 112 | MyMoneyInstitution::MyMoneyInstitution(const QString& id, const MyMoneyInstitution& other) : | ||
116 | MyMoneyObject(id), | 113 | MyMoneyObject(*new MyMoneyInstitutionPrivate(*other.d_func()), id), | ||
117 | MyMoneyKeyValueContainer(other), | 114 | MyMoneyKeyValueContainer(other) | ||
118 | d_ptr(new MyMoneyInstitutionPrivate(*other.d_func())) | | |||
119 | { | 115 | { | ||
120 | } | 116 | } | ||
121 | 117 | | |||
122 | MyMoneyInstitution::~MyMoneyInstitution() | 118 | MyMoneyInstitution::~MyMoneyInstitution() | ||
123 | { | 119 | { | ||
124 | Q_D(MyMoneyInstitution); | | |||
125 | delete d; | | |||
126 | } | 120 | } | ||
127 | 121 | | |||
128 | QString MyMoneyInstitution::manager() const | 122 | QString MyMoneyInstitution::manager() const | ||
Context not available. | |||||
284 | 278 | | |||
285 | void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) const | 279 | void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) const | ||
286 | { | 280 | { | ||
281 | Q_D(const MyMoneyInstitution); | ||||
287 | auto el = document.createElement(nodeNames[nnInstitution]); | 282 | auto el = document.createElement(nodeNames[nnInstitution]); | ||
288 | 283 | | |||
289 | writeBaseXML(document, el); | 284 | d->writeBaseXML(document, el); | ||
290 | 285 | | |||
291 | Q_D(const MyMoneyInstitution); | | |||
292 | el.setAttribute(d->getAttrName(Institution::Attribute::Name), d->m_name); | 286 | el.setAttribute(d->getAttrName(Institution::Attribute::Name), d->m_name); | ||
293 | el.setAttribute(d->getAttrName(Institution::Attribute::Manager), d->m_manager); | 287 | el.setAttribute(d->getAttrName(Institution::Attribute::Manager), d->m_manager); | ||
294 | el.setAttribute(d->getAttrName(Institution::Attribute::SortCode), d->m_sortcode); | 288 | el.setAttribute(d->getAttrName(Institution::Attribute::SortCode), d->m_sortcode); | ||
Context not available. |