Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyobject.h
Context not available. | |||||
20 | // ---------------------------------------------------------------------------- | 20 | // ---------------------------------------------------------------------------- | ||
---|---|---|---|---|---|
21 | // QT Includes | 21 | // QT Includes | ||
22 | 22 | | |||
23 | #include <QString> | 23 | #include <qglobal.h> | ||
24 | class QDomDocument; | | |||
25 | class QDomElement; | | |||
26 | 24 | | |||
27 | // ---------------------------------------------------------------------------- | 25 | // ---------------------------------------------------------------------------- | ||
28 | // Project Includes | 26 | // Project Includes | ||
Context not available. | |||||
30 | #include "kmm_mymoney_export.h" | 28 | #include "kmm_mymoney_export.h" | ||
31 | #include "mymoneyunittestable.h" | 29 | #include "mymoneyunittestable.h" | ||
32 | 30 | | |||
31 | class QString; | ||||
32 | class QDomDocument; | ||||
33 | class QDomElement; | ||||
34 | | ||||
33 | /** | 35 | /** | ||
34 | * @author Thomas Baumgart | 36 | * @author Thomas Baumgart | ||
35 | */ | 37 | */ | ||
Context not available. | |||||
37 | /** | 39 | /** | ||
38 | * This class represents the base class of all MyMoney objects. | 40 | * This class represents the base class of all MyMoney objects. | ||
39 | */ | 41 | */ | ||
42 | class MyMoneyObjectPrivate; | ||||
40 | class KMM_MYMONEY_EXPORT MyMoneyObject | 43 | class KMM_MYMONEY_EXPORT MyMoneyObject | ||
41 | { | 44 | { | ||
45 | Q_DECLARE_PRIVATE(MyMoneyObject) | ||||
46 | | ||||
42 | KMM_MYMONEY_UNIT_TESTABLE | 47 | KMM_MYMONEY_UNIT_TESTABLE | ||
43 | 48 | | |||
44 | public: | 49 | public: | ||
45 | /** | 50 | /** | ||
46 | * This is the constructor for the MyMoneyObject object | 51 | * This is the constructor for the MyMoneyObject object | ||
47 | */ | 52 | */ | ||
48 | MyMoneyObject(); | 53 | MyMoneyObject(); | ||
49 | 54 | | |||
50 | /** | 55 | /** | ||
51 | * This is the destructor for the MyMoneyObject object | 56 | * This is the destructor for the MyMoneyObject object | ||
Context not available. | |||||
86 | 91 | | |||
87 | bool operator == (const MyMoneyObject& right) const; | 92 | bool operator == (const MyMoneyObject& right) const; | ||
88 | 93 | | |||
89 | static const QString& emptyId(); | | |||
90 | | ||||
91 | protected: | 94 | protected: | ||
95 | MyMoneyObjectPrivate * d_ptr; | ||||
96 | MyMoneyObject(MyMoneyObjectPrivate &dd); | ||||
97 | MyMoneyObject(MyMoneyObjectPrivate &dd, | ||||
98 | const QString& id); | ||||
99 | MyMoneyObject(MyMoneyObjectPrivate &dd, | ||||
100 | const QDomElement& node, | ||||
101 | bool forceId = true); | ||||
102 | | ||||
92 | /** | 103 | /** | ||
93 | * This contructor assigns the id to the MyMoneyObject | 104 | * This contructor assigns the id to the MyMoneyObject | ||
94 | * | 105 | * | ||
Context not available. | |||||
110 | * used by objects, which are stored w/o id (eg. splits, | 121 | * used by objects, which are stored w/o id (eg. splits, | ||
111 | * transactions within schedules) | 122 | * transactions within schedules) | ||
112 | */ | 123 | */ | ||
113 | MyMoneyObject(const QDomElement& node, const bool forceId = true); | 124 | explicit MyMoneyObject(const QDomElement& node, bool forceId = true); | ||
114 | | ||||
115 | void setId(const QString& id); | | |||
116 | | ||||
117 | /** | | |||
118 | * This method writes out the members contained in this object. | | |||
119 | */ | | |||
120 | void writeBaseXML(QDomDocument& document, QDomElement& el) const; | | |||
121 | | ||||
122 | protected: | | |||
123 | QString m_id; | | |||
124 | static const QString m_emptyId; | | |||
125 | }; | 125 | }; | ||
126 | 126 | | |||
127 | #endif | 127 | #endif | ||
Context not available. |