Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyreport.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | const QStringList MyMoneyReport::kChartTypeText = QString("none,line,bar,pie,ring,stackedbar,invalid").split(','); | 46 | const QStringList MyMoneyReport::kChartTypeText = QString("none,line,bar,pie,ring,stackedbar,invalid").split(','); | ||
47 | 47 | | |||
48 | // This should live in mymoney/mymoneytransactionfilter.h | 48 | // This should live in mymoney/mymoneytransactionfilter.h | ||
49 | const QStringList kTypeText = QString("all,payments,deposits,transfers,none").split(','); | 49 | const QStringList kTypeText = QString("all,payments,deposits,transfers,none").split(','); | ||
50 | const QStringList kStateText = QString("all,notreconciled,cleared,reconciled,frozen,none").split(','); | 50 | const QStringList kStateText = QString("all,notreconciled,cleared,reconciled,frozen,none").split(','); | ||
51 | const QStringList kDateLockText = QString("alldates,untiltoday,currentmonth,currentyear,monthtodate,yeartodate,yeartomonth,lastmonth,lastyear,last7days,last30days,last3months,last6months,last12months,next7days,next30days,next3months,next6months,next12months,userdefined,last3tonext3months,last11Months,currentQuarter,lastQuarter,nextQuarter,currentFiscalYear,lastFiscalYear,today,next18months").split(','); | 51 | const QStringList kDateLockText = QString("alldates,untiltoday,currentmonth,currentyear,monthtodate,yeartodate,yeartomonth,lastmonth,lastyear,last7days,last30days,last3months,last6months,last12months,next7days,next30days,next3months,next6months,next12months,userdefined,last3tonext3months,last11Months,currentQuarter,lastQuarter,nextQuarter,currentFiscalYear,lastFiscalYear,today,next18months").split(','); | ||
52 | const QStringList kAccountTypeText = QString("unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid").split(','); | 52 | const QStringList kAccountTypeText = QString("unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid").split(','); | ||
53 | 53 | | |||
54 | QString MyMoneyReport::Row::toString(Type type) | ||||
55 | { | ||||
56 | switch(type) { | ||||
57 | case NoRows : return "NoRows"; | ||||
58 | case AssetLiability : return "AssetLiability"; | ||||
59 | case ExpenseIncome : return "ExpenseIncome"; | ||||
60 | case Category : return "Category"; | ||||
61 | case TopCategory : return "TopCategory"; | ||||
62 | case Account : return "Account"; | ||||
63 | case Tag : return "Tag"; | ||||
64 | case Payee : return "Payee"; | ||||
65 | case Month : return "Month"; | ||||
66 | case Week : return "Week"; | ||||
67 | case TopAccount : return "TopAccount"; | ||||
68 | case AccountByTopAccount: return "AccountByTopAccount"; | ||||
69 | case EquityType : return "EquityType"; | ||||
70 | case AccountType : return "AccountType"; | ||||
71 | case Institution : return "Institution"; | ||||
72 | case Budget : return "Budget"; | ||||
73 | case BudgetActual : return "BudgetActual"; | ||||
74 | case Schedule : return "Schedule"; | ||||
75 | case AccountInfo : return "AccountInfo"; | ||||
76 | case AccountLoanInfo : return "AccountLoanInfo"; | ||||
77 | case AccountReconcile : return "AccountReconcile"; | ||||
78 | case CashFlow : return "CashFlow"; | ||||
79 | default : return "undefined"; | ||||
80 | } | ||||
81 | } | ||||
82 | | ||||
54 | QString MyMoneyReport::Report::toString(Type type) | 83 | QString MyMoneyReport::Report::toString(Type type) | ||
55 | { | 84 | { | ||
56 | switch(type) { | 85 | switch(type) { | ||
57 | case NoReport: return "NoReport"; | 86 | case NoReport: return "NoReport"; | ||
58 | case PivotTable: return "PivotTable"; | 87 | case PivotTable: return "PivotTable"; | ||
59 | case QueryTable: return "QueryTable"; | 88 | case QueryTable: return "QueryTable"; | ||
60 | case InfoTable: return "InfoTable"; | 89 | case InfoTable: return "InfoTable"; | ||
61 | default: return "undefined"; | 90 | default: return "undefined"; | ||
62 | } | 91 | } | ||
63 | } | 92 | } | ||
64 | 93 | | |||
65 | MyMoneyReport::MyMoneyReport() : | 94 | MyMoneyReport::MyMoneyReport() : | ||
66 | m_name("Unconfigured Pivot Table Report"), | 95 | m_name("Unconfigured Pivot Table Report"), | ||
67 | m_detailLevel(eDetailNone), | 96 | m_detailLevel(eDetailNone), | ||
68 | m_convertCurrency(true), | 97 | m_convertCurrency(true), | ||
69 | m_favorite(false), | 98 | m_favorite(false), | ||
70 | m_tax(false), | 99 | m_tax(false), | ||
71 | m_investments(false), | 100 | m_investments(false), | ||
72 | m_loans(false), | 101 | m_loans(false), | ||
73 | m_reportType(Report::kTypeArray[eExpenseIncome]), | 102 | m_reportType(Report::kTypeArray[Row::ExpenseIncome]), | ||
74 | m_rowType(eExpenseIncome), | 103 | m_rowType(Row::ExpenseIncome), | ||
75 | m_columnType(Column::Months), | 104 | m_columnType(Column::Months), | ||
76 | m_columnsAreDays(false), | 105 | m_columnsAreDays(false), | ||
77 | m_queryColumns(QueryColumns::None), | 106 | m_queryColumns(QueryColumns::None), | ||
78 | m_dateLock(userDefined), | 107 | m_dateLock(userDefined), | ||
79 | m_accountGroupFilter(false), | 108 | m_accountGroupFilter(false), | ||
80 | m_chartType(eChartLine), | 109 | m_chartType(eChartLine), | ||
81 | m_chartDataLabels(true), | 110 | m_chartDataLabels(true), | ||
82 | m_chartGridLines(true), | 111 | m_chartGridLines(true), | ||
Show All 19 Lines | 130 | MyMoneyReport::MyMoneyReport(const QString& id, const MyMoneyReport& right) : | |||
102 | MyMoneyObject(id), | 131 | MyMoneyObject(id), | ||
103 | m_movingAverageDays(0), | 132 | m_movingAverageDays(0), | ||
104 | m_currentDateColumn(0) | 133 | m_currentDateColumn(0) | ||
105 | { | 134 | { | ||
106 | *this = right; | 135 | *this = right; | ||
107 | setId(id); | 136 | setId(id); | ||
108 | } | 137 | } | ||
109 | 138 | | |||
110 | MyMoneyReport::MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment) : | 139 | MyMoneyReport::MyMoneyReport(Row::Type _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment) : | ||
111 | m_name(_name), | 140 | m_name(_name), | ||
112 | m_comment(_comment), | 141 | m_comment(_comment), | ||
113 | m_detailLevel(_ss), | 142 | m_detailLevel(_ss), | ||
114 | m_convertCurrency(true), | 143 | m_convertCurrency(true), | ||
115 | m_favorite(false), | 144 | m_favorite(false), | ||
116 | m_tax(false), | 145 | m_tax(false), | ||
117 | m_investments(false), | 146 | m_investments(false), | ||
118 | m_loans(false), | 147 | m_loans(false), | ||
Show All 28 Lines | 172 | { | |||
147 | //set report type | 176 | //set report type | ||
148 | if (m_reportType == Report::PivotTable) | 177 | if (m_reportType == Report::PivotTable) | ||
149 | m_columnType = static_cast<Column::Type>(_ct); | 178 | m_columnType = static_cast<Column::Type>(_ct); | ||
150 | if (m_reportType == Report::QueryTable) | 179 | if (m_reportType == Report::QueryTable) | ||
151 | m_queryColumns = static_cast<QueryColumns::Type>(_ct); | 180 | m_queryColumns = static_cast<QueryColumns::Type>(_ct); | ||
152 | setDateFilter(_dl); | 181 | setDateFilter(_dl); | ||
153 | 182 | | |||
154 | //throw exception if the type is inconsistent | 183 | //throw exception if the type is inconsistent | ||
155 | if ((_rt > static_cast<ERowType>(sizeof(Report::kTypeArray) / sizeof(Report::kTypeArray[0]))) | 184 | if ((_rt > static_cast<Row::Type>(sizeof(Report::kTypeArray) / sizeof(Report::kTypeArray[0]))) | ||
156 | || (m_reportType == Report::NoReport)) | 185 | || (m_reportType == Report::NoReport)) | ||
157 | throw MYMONEYEXCEPTION("Invalid report type"); | 186 | throw MYMONEYEXCEPTION("Invalid report type"); | ||
158 | 187 | | |||
159 | //add the corresponding account groups | 188 | //add the corresponding account groups | ||
160 | if (_rt == MyMoneyReport::eAssetLiability) { | 189 | if (_rt == MyMoneyReport::Row::AssetLiability) { | ||
161 | addAccountGroup(MyMoneyAccount::Asset); | 190 | addAccountGroup(MyMoneyAccount::Asset); | ||
162 | addAccountGroup(MyMoneyAccount::Liability); | 191 | addAccountGroup(MyMoneyAccount::Liability); | ||
163 | m_showRowTotals = true; | 192 | m_showRowTotals = true; | ||
164 | } | 193 | } | ||
165 | if (_rt == MyMoneyReport::eAccount) { | 194 | if (_rt == MyMoneyReport::Row::Account) { | ||
166 | addAccountGroup(MyMoneyAccount::Asset); | 195 | addAccountGroup(MyMoneyAccount::Asset); | ||
167 | addAccountGroup(MyMoneyAccount::AssetLoan); | 196 | addAccountGroup(MyMoneyAccount::AssetLoan); | ||
168 | addAccountGroup(MyMoneyAccount::Cash); | 197 | addAccountGroup(MyMoneyAccount::Cash); | ||
169 | addAccountGroup(MyMoneyAccount::Checkings); | 198 | addAccountGroup(MyMoneyAccount::Checkings); | ||
170 | addAccountGroup(MyMoneyAccount::CreditCard); | 199 | addAccountGroup(MyMoneyAccount::CreditCard); | ||
171 | if (KMyMoneyGlobalSettings::expertMode()) | 200 | if (KMyMoneyGlobalSettings::expertMode()) | ||
172 | addAccountGroup(MyMoneyAccount::Equity); | 201 | addAccountGroup(MyMoneyAccount::Equity); | ||
173 | addAccountGroup(MyMoneyAccount::Expense); | 202 | addAccountGroup(MyMoneyAccount::Expense); | ||
174 | addAccountGroup(MyMoneyAccount::Income); | 203 | addAccountGroup(MyMoneyAccount::Income); | ||
175 | addAccountGroup(MyMoneyAccount::Liability); | 204 | addAccountGroup(MyMoneyAccount::Liability); | ||
176 | addAccountGroup(MyMoneyAccount::Loan); | 205 | addAccountGroup(MyMoneyAccount::Loan); | ||
177 | addAccountGroup(MyMoneyAccount::Savings); | 206 | addAccountGroup(MyMoneyAccount::Savings); | ||
178 | addAccountGroup(MyMoneyAccount::Stock); | 207 | addAccountGroup(MyMoneyAccount::Stock); | ||
179 | m_showRowTotals = true; | 208 | m_showRowTotals = true; | ||
180 | } | 209 | } | ||
181 | if (_rt == MyMoneyReport::eExpenseIncome) { | 210 | if (_rt == MyMoneyReport::Row::ExpenseIncome) { | ||
182 | addAccountGroup(MyMoneyAccount::Expense); | 211 | addAccountGroup(MyMoneyAccount::Expense); | ||
183 | addAccountGroup(MyMoneyAccount::Income); | 212 | addAccountGroup(MyMoneyAccount::Income); | ||
184 | m_showRowTotals = true; | 213 | m_showRowTotals = true; | ||
185 | } | 214 | } | ||
186 | //FIXME take this out once we have sorted out all issues regarding budget of assets and liabilities -- asoliverez@gmail.com | 215 | //FIXME take this out once we have sorted out all issues regarding budget of assets and liabilities -- asoliverez@gmail.com | ||
187 | if (_rt == MyMoneyReport::eBudget || _rt == MyMoneyReport::eBudgetActual) { | 216 | if (_rt == MyMoneyReport::Row::Budget || _rt == MyMoneyReport::Row::BudgetActual) { | ||
188 | addAccountGroup(MyMoneyAccount::Expense); | 217 | addAccountGroup(MyMoneyAccount::Expense); | ||
189 | addAccountGroup(MyMoneyAccount::Income); | 218 | addAccountGroup(MyMoneyAccount::Income); | ||
190 | } | 219 | } | ||
191 | if (_rt == MyMoneyReport::eAccountInfo) { | 220 | if (_rt == MyMoneyReport::Row::AccountInfo) { | ||
192 | addAccountGroup(MyMoneyAccount::Asset); | 221 | addAccountGroup(MyMoneyAccount::Asset); | ||
193 | addAccountGroup(MyMoneyAccount::Liability); | 222 | addAccountGroup(MyMoneyAccount::Liability); | ||
194 | } | 223 | } | ||
195 | //cash flow reports show splits for all account groups | 224 | //cash flow reports show splits for all account groups | ||
196 | if (_rt == MyMoneyReport::eCashFlow) { | 225 | if (_rt == MyMoneyReport::Row::CashFlow) { | ||
197 | addAccountGroup(MyMoneyAccount::Expense); | 226 | addAccountGroup(MyMoneyAccount::Expense); | ||
198 | addAccountGroup(MyMoneyAccount::Income); | 227 | addAccountGroup(MyMoneyAccount::Income); | ||
199 | addAccountGroup(MyMoneyAccount::Asset); | 228 | addAccountGroup(MyMoneyAccount::Asset); | ||
200 | addAccountGroup(MyMoneyAccount::Liability); | 229 | addAccountGroup(MyMoneyAccount::Liability); | ||
201 | } | 230 | } | ||
202 | #ifdef DEBUG_REPORTS | 231 | #ifdef DEBUG_REPORTS | ||
203 | QDebug dbg = qDebug(); | 232 | QDebug dbg = qDebug(); | ||
204 | dbg << _name << toString(_rt) << Report::toString(m_reportType); | 233 | dbg << _name << Row::toString(_rt) << Report::toString(m_reportType); | ||
205 | foreach(const MyMoneyAccount::accountTypeE accountType, m_accountGroups) | 234 | foreach(const MyMoneyAccount::accountTypeE accountType, m_accountGroups) | ||
206 | dbg << MyMoneyAccount::accountTypeToString(accountType); | 235 | dbg << MyMoneyAccount::accountTypeToString(accountType); | ||
207 | if (m_accounts.size() > 0) | 236 | if (m_accounts.size() > 0) | ||
208 | dbg << m_accounts; | 237 | dbg << m_accounts; | ||
209 | #endif | 238 | #endif | ||
210 | } | 239 | } | ||
211 | 240 | | |||
212 | MyMoneyReport::MyMoneyReport(const QDomElement& node) : | 241 | MyMoneyReport::MyMoneyReport(const QDomElement& node) : | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 294 | if (!_db.isValid()) | |||
266 | _db = tmpBegin; | 295 | _db = tmpBegin; | ||
267 | if (!_de.isValid()) | 296 | if (!_de.isValid()) | ||
268 | _de = tmpEnd; | 297 | _de = tmpEnd; | ||
269 | } | 298 | } | ||
270 | if (_db > _de) | 299 | if (_db > _de) | ||
271 | _db = _de; | 300 | _db = _de; | ||
272 | } | 301 | } | ||
273 | 302 | | |||
274 | void MyMoneyReport::setRowType(ERowType _rt) | 303 | void MyMoneyReport::setRowType(Row::Type _rt) | ||
275 | { | 304 | { | ||
276 | m_rowType = _rt; | 305 | m_rowType = _rt; | ||
277 | m_reportType = Report::kTypeArray[_rt]; | 306 | m_reportType = Report::kTypeArray[_rt]; | ||
278 | 307 | | |||
279 | m_accountGroupFilter = false; | 308 | m_accountGroupFilter = false; | ||
280 | m_accountGroups.clear(); | 309 | m_accountGroups.clear(); | ||
281 | 310 | | |||
282 | if (_rt == MyMoneyReport::eAssetLiability) { | 311 | if (_rt == MyMoneyReport::Row::AssetLiability) { | ||
283 | addAccountGroup(MyMoneyAccount::Asset); | 312 | addAccountGroup(MyMoneyAccount::Asset); | ||
284 | addAccountGroup(MyMoneyAccount::Liability); | 313 | addAccountGroup(MyMoneyAccount::Liability); | ||
285 | } | 314 | } | ||
286 | if (_rt == MyMoneyReport::eExpenseIncome) { | 315 | if (_rt == MyMoneyReport::Row::ExpenseIncome) { | ||
287 | addAccountGroup(MyMoneyAccount::Expense); | 316 | addAccountGroup(MyMoneyAccount::Expense); | ||
288 | addAccountGroup(MyMoneyAccount::Income); | 317 | addAccountGroup(MyMoneyAccount::Income); | ||
289 | } | 318 | } | ||
290 | } | 319 | } | ||
291 | 320 | | |||
292 | bool MyMoneyReport::accountGroups(QList<MyMoneyAccount::accountTypeE>& list) const | 321 | bool MyMoneyReport::accountGroups(QList<MyMoneyAccount::accountTypeE>& list) const | ||
293 | 322 | | |||
294 | { | 323 | { | ||
Show All 18 Lines | 337 | { | |||
313 | m_accountGroupFilter = true; | 342 | m_accountGroupFilter = true; | ||
314 | if (type != MyMoneyAccount::UnknownAccountType) | 343 | if (type != MyMoneyAccount::UnknownAccountType) | ||
315 | m_accountGroups.push_back(type); | 344 | m_accountGroups.push_back(type); | ||
316 | } | 345 | } | ||
317 | 346 | | |||
318 | bool MyMoneyReport::includesAccountGroup(MyMoneyAccount::accountTypeE type) const | 347 | bool MyMoneyReport::includesAccountGroup(MyMoneyAccount::accountTypeE type) const | ||
319 | { | 348 | { | ||
320 | bool result = (! m_accountGroupFilter) | 349 | bool result = (! m_accountGroupFilter) | ||
321 | || (isIncludingTransfers() && m_rowType == MyMoneyReport::eExpenseIncome) | 350 | || (isIncludingTransfers() && m_rowType == MyMoneyReport::Row::ExpenseIncome) | ||
322 | || m_accountGroups.contains(type); | 351 | || m_accountGroups.contains(type); | ||
323 | 352 | | |||
324 | return result; | 353 | return result; | ||
325 | } | 354 | } | ||
326 | 355 | | |||
327 | bool MyMoneyReport::includes(const MyMoneyAccount& acc) const | 356 | bool MyMoneyReport::includes(const MyMoneyAccount& acc) const | ||
328 | { | 357 | { | ||
329 | bool result = false; | 358 | bool result = false; | ||
330 | 359 | | |||
331 | if (includesAccountGroup(acc.accountGroup())) { | 360 | if (includesAccountGroup(acc.accountGroup())) { | ||
332 | switch (acc.accountGroup()) { | 361 | switch (acc.accountGroup()) { | ||
333 | case MyMoneyAccount::Income: | 362 | case MyMoneyAccount::Income: | ||
334 | case MyMoneyAccount::Expense: | 363 | case MyMoneyAccount::Expense: | ||
335 | if (isTax()) | 364 | if (isTax()) | ||
336 | result = (acc.value("Tax") == "Yes") && includesCategory(acc.id()); | 365 | result = (acc.value("Tax") == "Yes") && includesCategory(acc.id()); | ||
337 | else | 366 | else | ||
338 | result = includesCategory(acc.id()); | 367 | result = includesCategory(acc.id()); | ||
339 | break; | 368 | break; | ||
340 | case MyMoneyAccount::Asset: | 369 | case MyMoneyAccount::Asset: | ||
341 | case MyMoneyAccount::Liability: | 370 | case MyMoneyAccount::Liability: | ||
342 | if (isLoansOnly()) | 371 | if (isLoansOnly()) | ||
343 | result = acc.isLoan() && includesAccount(acc.id()); | 372 | result = acc.isLoan() && includesAccount(acc.id()); | ||
344 | else if (isInvestmentsOnly()) | 373 | else if (isInvestmentsOnly()) | ||
345 | result = acc.isInvest() && includesAccount(acc.id()); | 374 | result = acc.isInvest() && includesAccount(acc.id()); | ||
346 | else if (isIncludingTransfers() && m_rowType == MyMoneyReport::eExpenseIncome) | 375 | else if (isIncludingTransfers() && m_rowType == MyMoneyReport::Row::ExpenseIncome) | ||
347 | // If transfers are included, ONLY include this account if it is NOT | 376 | // If transfers are included, ONLY include this account if it is NOT | ||
348 | // included in the report itself!! | 377 | // included in the report itself!! | ||
349 | result = ! includesAccount(acc.id()); | 378 | result = ! includesAccount(acc.id()); | ||
350 | else | 379 | else | ||
351 | result = includesAccount(acc.id()); | 380 | result = includesAccount(acc.id()); | ||
352 | break; | 381 | break; | ||
353 | default: | 382 | default: | ||
354 | result = includesAccount(acc.id()); | 383 | result = includesAccount(acc.id()); | ||
▲ Show 20 Lines • Show All 366 Lines • ▼ Show 20 Line(s) | 749 | if (!ok) { | |||
721 | i = kDateLockText.indexOf(datelockstr); | 750 | i = kDateLockText.indexOf(datelockstr); | ||
722 | if (i == -1) | 751 | if (i == -1) | ||
723 | i = userDefined; | 752 | i = userDefined; | ||
724 | } | 753 | } | ||
725 | setDateFilter(static_cast<dateOptionE>(i)); | 754 | setDateFilter(static_cast<dateOptionE>(i)); | ||
726 | 755 | | |||
727 | i = kRowTypeText.indexOf(e.attribute("rowtype", "expenseincome")); | 756 | i = kRowTypeText.indexOf(e.attribute("rowtype", "expenseincome")); | ||
728 | if (i != -1) { | 757 | if (i != -1) { | ||
729 | setRowType(static_cast<ERowType>(i)); | 758 | setRowType(static_cast<Row::Type>(i)); | ||
730 | // recent versions of KMyMoney always showed a total column for | 759 | // recent versions of KMyMoney always showed a total column for | ||
731 | // income/expense reports. We turn it on for backward compatibility | 760 | // income/expense reports. We turn it on for backward compatibility | ||
732 | // here. If the total column is turned off, the flag will be reset | 761 | // here. If the total column is turned off, the flag will be reset | ||
733 | // in the next step | 762 | // in the next step | ||
734 | if (i == eExpenseIncome) | 763 | if (i == Row::ExpenseIncome) | ||
735 | m_showRowTotals = true; | 764 | m_showRowTotals = true; | ||
736 | } | 765 | } | ||
737 | if (e.hasAttribute("showrowtotals")) | 766 | if (e.hasAttribute("showrowtotals")) | ||
738 | m_showRowTotals = e.attribute("showrowtotals").toUInt(); | 767 | m_showRowTotals = e.attribute("showrowtotals").toUInt(); | ||
739 | 768 | | |||
740 | i = Column::kTypeText.indexOf(e.attribute("columntype", "months")); | 769 | i = Column::kTypeText.indexOf(e.attribute("columntype", "months")); | ||
741 | if (i != -1) | 770 | if (i != -1) | ||
742 | setColumnType(static_cast<Column::Type>(i)); | 771 | setColumnType(static_cast<Column::Type>(i)); | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
832 | } | 861 | } | ||
833 | 862 | | |||
834 | int MyMoneyReport::m_lineWidth = 2; | 863 | int MyMoneyReport::m_lineWidth = 2; | ||
835 | 864 | | |||
836 | void MyMoneyReport::setLineWidth(int width) | 865 | void MyMoneyReport::setLineWidth(int width) | ||
837 | { | 866 | { | ||
838 | m_lineWidth = width; | 867 | m_lineWidth = width; | ||
839 | } | 868 | } | ||
840 | | ||||
841 | QString MyMoneyReport::toString(ERowType type) | | |||
842 | { | | |||
843 | switch(type) { | | |||
844 | case eNoRows : return "eNoRows"; | | |||
845 | case eAssetLiability : return "eAssetLiability"; | | |||
846 | case eExpenseIncome : return "eExpenseIncome"; | | |||
847 | case eCategory : return "eCategory"; | | |||
848 | case eTopCategory : return "eTopCategory"; | | |||
849 | case eAccount : return "eAccount"; | | |||
850 | case eTag : return "eTag"; | | |||
851 | case ePayee : return "ePayee"; | | |||
852 | case eMonth : return "eMonth"; | | |||
853 | case eWeek : return "eWeek"; | | |||
854 | case eTopAccount : return "eTopAccount"; | | |||
855 | case eAccountByTopAccount: return "eAccountByTopAccount"; | | |||
856 | case eEquityType : return "eEquityType"; | | |||
857 | case eAccountType : return "eAccountType"; | | |||
858 | case eInstitution : return "eInstitution"; | | |||
859 | case eBudget : return "eBudget"; | | |||
860 | case eBudgetActual : return "eBudgetActual"; | | |||
861 | case eSchedule : return "eSchedule"; | | |||
862 | case eAccountInfo : return "eAccountInfo"; | | |||
863 | case eAccountLoanInfo : return "eAccountLoanInfo"; | | |||
864 | case eAccountReconcile : return "eAccountReconcile"; | | |||
865 | case eCashFlow : return "eCashFlow"; | | |||
866 | default : return "undefined"; | | |||
867 | } | | |||
868 | } | |