Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyreport.cpp
Context not available. | |||||
63 | const QStringList kAccountTypeText = QString("unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid").split(','); | 63 | const QStringList kAccountTypeText = QString("unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid").split(','); | ||
---|---|---|---|---|---|
64 | 64 | | |||
65 | MyMoneyReport::MyMoneyReport() : | 65 | MyMoneyReport::MyMoneyReport() : | ||
66 | d_ptr(new MyMoneyReportPrivate) | 66 | MyMoneyObject(*new MyMoneyReportPrivate) | ||
67 | { | 67 | { | ||
68 | Q_D(MyMoneyReport); | 68 | Q_D(MyMoneyReport); | ||
69 | d->m_name = "Unconfigured Pivot Table Report"; | 69 | d->m_name = "Unconfigured Pivot Table Report"; | ||
Context not available. | |||||
120 | EDetailLevel ss, | 120 | EDetailLevel ss, | ||
121 | const QString& name, | 121 | const QString& name, | ||
122 | const QString& comment) : | 122 | const QString& comment) : | ||
123 | d_ptr(new MyMoneyReportPrivate) | 123 | MyMoneyObject(*new MyMoneyReportPrivate) | ||
124 | { | 124 | { | ||
125 | Q_D(MyMoneyReport); | 125 | Q_D(MyMoneyReport); | ||
126 | d->m_name = name; | 126 | d->m_name = name; | ||
Context not available. | |||||
239 | } | 239 | } | ||
240 | 240 | | |||
241 | MyMoneyReport::MyMoneyReport(const QDomElement& node) : | 241 | MyMoneyReport::MyMoneyReport(const QDomElement& node) : | ||
242 | MyMoneyObject(node), | 242 | MyMoneyObject(*new MyMoneyReportPrivate, node) | ||
243 | d_ptr(new MyMoneyReportPrivate) | | |||
244 | { | 243 | { | ||
245 | Q_D(MyMoneyReport); | 244 | Q_D(MyMoneyReport); | ||
246 | d->m_currentDateColumn = 0; | 245 | d->m_currentDateColumn = 0; | ||
Context not available. | |||||
251 | } | 250 | } | ||
252 | 251 | | |||
253 | MyMoneyReport::MyMoneyReport(const MyMoneyReport& other) : | 252 | MyMoneyReport::MyMoneyReport(const MyMoneyReport& other) : | ||
254 | MyMoneyObject(other.id()), | 253 | MyMoneyObject(*new MyMoneyReportPrivate(*other.d_func()), other.id()), | ||
255 | MyMoneyTransactionFilter(other), | 254 | MyMoneyTransactionFilter(other) | ||
256 | d_ptr(new MyMoneyReportPrivate(*other.d_func())) | | |||
257 | { | 255 | { | ||
258 | } | 256 | } | ||
259 | 257 | | |||
260 | MyMoneyReport::MyMoneyReport(const QString& id, const MyMoneyReport& other) : | 258 | MyMoneyReport::MyMoneyReport(const QString& id, const MyMoneyReport& other) : | ||
261 | MyMoneyObject(id), | 259 | MyMoneyObject(*new MyMoneyReportPrivate(*other.d_func()), id), | ||
262 | MyMoneyTransactionFilter(other), | 260 | MyMoneyTransactionFilter(other) | ||
263 | d_ptr(new MyMoneyReportPrivate(*other.d_func())) | | |||
264 | { | 261 | { | ||
265 | Q_D(MyMoneyReport); | 262 | Q_D(MyMoneyReport); | ||
266 | d->m_movingAverageDays = 0; | 263 | d->m_movingAverageDays = 0; | ||
Context not available. | |||||
269 | 266 | | |||
270 | MyMoneyReport::~MyMoneyReport() | 267 | MyMoneyReport::~MyMoneyReport() | ||
271 | { | 268 | { | ||
272 | Q_D(MyMoneyReport); | | |||
273 | delete d; | | |||
274 | } | 269 | } | ||
275 | 270 | | |||
276 | MyMoneyReport::EReportType MyMoneyReport::reportType() const | 271 | MyMoneyReport::EReportType MyMoneyReport::reportType() const | ||
Context not available. | |||||
1073 | e.setAttribute(d->getAttrName(Report::Attribute::Type), "infotable 1.0"); | 1068 | e.setAttribute(d->getAttrName(Report::Attribute::Type), "infotable 1.0"); | ||
1074 | 1069 | | |||
1075 | e.setAttribute(d->getAttrName(Report::Attribute::Group), d->m_group); | 1070 | e.setAttribute(d->getAttrName(Report::Attribute::Group), d->m_group); | ||
1076 | e.setAttribute(d->getAttrName(Report::Attribute::ID), m_id); | 1071 | e.setAttribute(d->getAttrName(Report::Attribute::ID), d->m_id); | ||
1077 | 1072 | | |||
1078 | // write general tab | 1073 | // write general tab | ||
1079 | if (anonymous) { | 1074 | if (anonymous) { | ||
1080 | e.setAttribute(d->getAttrName(Report::Attribute::Name), m_id); | 1075 | e.setAttribute(d->getAttrName(Report::Attribute::Name), d->m_id); | ||
1081 | e.setAttribute(d->getAttrName(Report::Attribute::Comment), QString(d->m_comment).fill('x')); | 1076 | e.setAttribute(d->getAttrName(Report::Attribute::Comment), QString(d->m_comment).fill('x')); | ||
1082 | } else { | 1077 | } else { | ||
1083 | e.setAttribute(d->getAttrName(Report::Attribute::Name), d->m_name); | 1078 | e.setAttribute(d->getAttrName(Report::Attribute::Name), d->m_name); | ||
Context not available. | |||||
1374 | return false; | 1369 | return false; | ||
1375 | 1370 | | |||
1376 | d->m_group = e.attribute(d->getAttrName(Report::Attribute::Group)); | 1371 | d->m_group = e.attribute(d->getAttrName(Report::Attribute::Group)); | ||
1377 | m_id = e.attribute(d->getAttrName(Report::Attribute::ID)); | 1372 | d->m_id = e.attribute(d->getAttrName(Report::Attribute::ID)); | ||
1378 | 1373 | | |||
1379 | clearTransactionFilter(); | 1374 | clearTransactionFilter(); | ||
1380 | 1375 | | |||
Context not available. |