Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyreport.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 36 | /** | |||
---|---|---|---|---|---|
53 | */ | 53 | */ | ||
54 | 54 | | |||
55 | class KMM_MYMONEY_EXPORT MyMoneyReport: public MyMoneyObject, public MyMoneyTransactionFilter | 55 | class KMM_MYMONEY_EXPORT MyMoneyReport: public MyMoneyObject, public MyMoneyTransactionFilter | ||
56 | { | 56 | { | ||
57 | public: | 57 | public: | ||
58 | // When adding a new row type, be sure to add a corresponding entry in kTypeArray | 58 | // When adding a new row type, be sure to add a corresponding entry in kTypeArray | ||
59 | enum ERowType { eNoRows = 0, eAssetLiability, eExpenseIncome, eCategory, eTopCategory, eAccount, eTag, ePayee, eMonth, eWeek, eTopAccount, eAccountByTopAccount, eEquityType, eAccountType, eInstitution, eBudget, eBudgetActual, eSchedule, eAccountInfo, eAccountLoanInfo, eAccountReconcile, eCashFlow}; | 59 | enum ERowType { eNoRows = 0, eAssetLiability, eExpenseIncome, eCategory, eTopCategory, eAccount, eTag, ePayee, eMonth, eWeek, eTopAccount, eAccountByTopAccount, eEquityType, eAccountType, eInstitution, eBudget, eBudgetActual, eSchedule, eAccountInfo, eAccountLoanInfo, eAccountReconcile, eCashFlow}; | ||
60 | enum EReportType { eNoReport = 0, ePivotTable, eQueryTable, eInfoTable }; | 60 | enum EReportType { eNoReport = 0, ePivotTable, eQueryTable, eInfoTable }; | ||
61 | enum EColumnType { eNoColumns = 0, eDays = 1, eMonths = 1, eBiMonths = 2, eQuarters = 3, eWeeks = 7, eYears = 12 }; | 61 | class Column { | ||
62 | public: | ||||
63 | enum Type { NoColumns = 0, Days = 1, Months = 1, BiMonths = 2, Quarters = 3, Weeks = 7, Years = 12 }; | ||||
64 | static const QStringList kTypeText; | ||||
65 | }; | ||||
62 | 66 | | |||
63 | // if you add bits to this bitmask, start with the value currently assigned to eQCend and update its value afterwards | 67 | // if you add bits to this bitmask, start with the value currently assigned to eQCend and update its value afterwards | ||
64 | // also don't forget to add column names to kQueryColumnsText in mymoneyreport.cpp | 68 | // also don't forget to add column names to kQueryColumnsText in mymoneyreport.cpp | ||
65 | enum EQueryColumns { eQCnone = 0x0, eQCbegin = 0x1, eQCnumber = 0x1, eQCpayee = 0x2, eQCcategory = 0x4, eQCtag = 0x8, eQCmemo = 0x10, eQCaccount = 0x20, eQCreconciled = 0x40, eQCaction = 0x80, eQCshares = 0x100, eQCprice = 0x200, eQCperformance = 0x400, eQCloan = 0x800, eQCbalance = 0x1000, eQCend = 0x2000 }; | 69 | enum EQueryColumns { eQCnone = 0x0, eQCbegin = 0x1, eQCnumber = 0x1, eQCpayee = 0x2, eQCcategory = 0x4, eQCtag = 0x8, eQCmemo = 0x10, eQCaccount = 0x20, eQCreconciled = 0x40, eQCaction = 0x80, eQCshares = 0x100, eQCprice = 0x200, eQCperformance = 0x400, eQCloan = 0x800, eQCbalance = 0x1000, eQCend = 0x2000 }; | ||
66 | 70 | | |||
67 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | 71 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | ||
68 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | 72 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | ||
69 | 73 | | |||
70 | static const QStringList kRowTypeText; | 74 | static const QStringList kRowTypeText; | ||
71 | static const QStringList kColumnTypeText; | | |||
72 | static const QStringList kQueryColumnsText; | 75 | static const QStringList kQueryColumnsText; | ||
73 | static const QStringList kDetailLevelText; | 76 | static const QStringList kDetailLevelText; | ||
74 | static const QStringList kChartTypeText; | 77 | static const QStringList kChartTypeText; | ||
75 | static const EReportType kTypeArray[]; | 78 | static const EReportType kTypeArray[]; | ||
76 | 79 | | |||
77 | public: | 80 | public: | ||
78 | MyMoneyReport(); | 81 | MyMoneyReport(); | ||
79 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | 82 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | ||
Show All 14 Lines | 96 | bool isShowingRowTotals() const { | |||
94 | return (m_showRowTotals); | 97 | return (m_showRowTotals); | ||
95 | } | 98 | } | ||
96 | EReportType reportType() const { | 99 | EReportType reportType() const { | ||
97 | return m_reportType; | 100 | return m_reportType; | ||
98 | } | 101 | } | ||
99 | ERowType rowType() const { | 102 | ERowType rowType() const { | ||
100 | return m_rowType; | 103 | return m_rowType; | ||
101 | } | 104 | } | ||
102 | EColumnType columnType() const { | 105 | Column::Type columnType() const { | ||
103 | return m_columnType; | 106 | return m_columnType; | ||
104 | } | 107 | } | ||
105 | bool isRunningSum() const { | 108 | bool isRunningSum() const { | ||
106 | return (m_rowType == eAssetLiability); | 109 | return (m_rowType == eAssetLiability); | ||
107 | } | 110 | } | ||
108 | bool isConvertCurrency() const { | 111 | bool isConvertCurrency() const { | ||
109 | return m_convertCurrency; | 112 | return m_convertCurrency; | ||
110 | } | 113 | } | ||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | |||||
208 | // Simple set operations | 211 | // Simple set operations | ||
209 | void setName(const QString& _s) { | 212 | void setName(const QString& _s) { | ||
210 | m_name = _s; | 213 | m_name = _s; | ||
211 | } | 214 | } | ||
212 | void setConvertCurrency(bool _f) { | 215 | void setConvertCurrency(bool _f) { | ||
213 | m_convertCurrency = _f; | 216 | m_convertCurrency = _f; | ||
214 | } | 217 | } | ||
215 | void setRowType(ERowType _rt); | 218 | void setRowType(ERowType _rt); | ||
216 | void setColumnType(EColumnType _ct) { | 219 | void setColumnType(Column::Type _ct) { | ||
217 | m_columnType = _ct; | 220 | m_columnType = _ct; | ||
218 | } | 221 | } | ||
219 | void setComment(const QString& _comment) { | 222 | void setComment(const QString& _comment) { | ||
220 | m_comment = _comment; | 223 | m_comment = _comment; | ||
221 | } | 224 | } | ||
222 | void setGroup(const QString& _group) { | 225 | void setGroup(const QString& _group) { | ||
223 | m_group = _group; | 226 | m_group = _group; | ||
224 | } | 227 | } | ||
▲ Show 20 Lines • Show All 333 Lines • ▼ Show 20 Line(s) | 559 | /** | |||
558 | */ | 561 | */ | ||
559 | enum ERowType m_rowType; | 562 | enum ERowType m_rowType; | ||
560 | /** | 563 | /** | ||
561 | * What sort of values should show up on the COLUMNS of this report, | 564 | * What sort of values should show up on the COLUMNS of this report, | ||
562 | * in the case of a 'PivotTable' report. Really this is used more as a | 565 | * in the case of a 'PivotTable' report. Really this is used more as a | ||
563 | * QUANTITY of months or days. Whether it's months or days is determined | 566 | * QUANTITY of months or days. Whether it's months or days is determined | ||
564 | * by m_columnsAreDays. | 567 | * by m_columnsAreDays. | ||
565 | */ | 568 | */ | ||
566 | enum EColumnType m_columnType; | 569 | Column::Type m_columnType; | ||
567 | /** | 570 | /** | ||
568 | * Whether the base unit of columns of this report is days. Only applies to | 571 | * Whether the base unit of columns of this report is days. Only applies to | ||
569 | * 'PivotTable' reports. If false, then columns are months or multiples thereof. | 572 | * 'PivotTable' reports. If false, then columns are months or multiples thereof. | ||
570 | */ | 573 | */ | ||
571 | bool m_columnsAreDays; | 574 | bool m_columnsAreDays; | ||
572 | /** | 575 | /** | ||
573 | * What sort of values should show up on the COLUMNS of this report, | 576 | * What sort of values should show up on the COLUMNS of this report, | ||
574 | * in the case of a 'QueryTable' report | 577 | * in the case of a 'QueryTable' report | ||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |