Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyreport.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 36 | /** | |||
---|---|---|---|---|---|
52 | * @author Ace Jones <acejones@users.sourceforge.net> | 52 | * @author Ace Jones <acejones@users.sourceforge.net> | ||
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 | class Report { | ||
61 | public: | ||||
62 | enum Type { NoReport = 0, PivotTable, QueryTable, InfoTable }; | ||||
63 | /** | ||||
64 | * Return report type as string. | ||||
65 | * | ||||
66 | * @param type report type to get string for | ||||
67 | * @return report type converted to string | ||||
68 | */ | ||||
69 | static QString toString(Type type); | ||||
70 | static const Type kTypeArray[]; | ||||
71 | }; | ||||
72 | | ||||
61 | class Column { | 73 | class Column { | ||
62 | public: | 74 | public: | ||
63 | enum Type { NoColumns = 0, Days = 1, Months = 1, BiMonths = 2, Quarters = 3, Weeks = 7, Years = 12 }; | 75 | enum Type { NoColumns = 0, Days = 1, Months = 1, BiMonths = 2, Quarters = 3, Weeks = 7, Years = 12 }; | ||
64 | static const QStringList kTypeText; | 76 | static const QStringList kTypeText; | ||
65 | }; | 77 | }; | ||
66 | 78 | | |||
67 | // if you add bits to this bitmask, start with the value currently assigned to end and update its value afterwards | 79 | // if you add bits to this bitmask, start with the value currently assigned to end and update its value afterwards | ||
68 | // also don't forget to add column names to QueryColumns::kText in mymoneyreport.cpp | 80 | // also don't forget to add column names to QueryColumns::kText in mymoneyreport.cpp | ||
69 | class QueryColumns { | 81 | class QueryColumns { | ||
70 | public: | 82 | public: | ||
71 | enum Type { None = 0x0, Begin = 0x1, Number = 0x1, Payee = 0x2, Category = 0x4, Tag = 0x8, Memo = 0x10, Account = 0x20, Reconciled = 0x40, Action = 0x80, Shares = 0x100, Price = 0x200, Performance = 0x400, Loan = 0x800, Balance = 0x1000, End = 0x2000 }; | 83 | enum Type { None = 0x0, Begin = 0x1, Number = 0x1, Payee = 0x2, Category = 0x4, Tag = 0x8, Memo = 0x10, Account = 0x20, Reconciled = 0x40, Action = 0x80, Shares = 0x100, Price = 0x200, Performance = 0x400, Loan = 0x800, Balance = 0x1000, End = 0x2000 }; | ||
72 | static const QStringList kText; | 84 | static const QStringList kText; | ||
73 | }; | 85 | }; | ||
74 | 86 | | |||
75 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | 87 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | ||
76 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | 88 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | ||
77 | 89 | | |||
78 | static const QStringList kRowTypeText; | 90 | static const QStringList kRowTypeText; | ||
79 | static const QStringList kDetailLevelText; | 91 | static const QStringList kDetailLevelText; | ||
80 | static const QStringList kChartTypeText; | 92 | static const QStringList kChartTypeText; | ||
81 | static const EReportType kTypeArray[]; | | |||
82 | 93 | | |||
83 | public: | 94 | public: | ||
84 | MyMoneyReport(); | 95 | MyMoneyReport(); | ||
85 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | 96 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | ||
86 | MyMoneyReport(const QString& id, const MyMoneyReport& right); | 97 | MyMoneyReport(const QString& id, const MyMoneyReport& right); | ||
87 | 98 | | |||
88 | /** | 99 | /** | ||
89 | * This constructor creates an object based on the data found in the | 100 | * This constructor creates an object based on the data found in the | ||
90 | * QDomElement referenced by @p node. If problems arise, the @p id of | 101 | * QDomElement referenced by @p node. If problems arise, the @p id of | ||
91 | * the object is cleared (see MyMoneyObject::clearId()). | 102 | * the object is cleared (see MyMoneyObject::clearId()). | ||
92 | */ | 103 | */ | ||
93 | MyMoneyReport(const QDomElement& node); | 104 | MyMoneyReport(const QDomElement& node); | ||
94 | 105 | | |||
95 | // Simple get operations | 106 | // Simple get operations | ||
96 | const QString& name() const { | 107 | const QString& name() const { | ||
97 | return m_name; | 108 | return m_name; | ||
98 | } | 109 | } | ||
99 | bool isShowingRowTotals() const { | 110 | bool isShowingRowTotals() const { | ||
100 | return (m_showRowTotals); | 111 | return (m_showRowTotals); | ||
101 | } | 112 | } | ||
102 | EReportType reportType() const { | 113 | Report::Type reportType() const { | ||
103 | return m_reportType; | 114 | return m_reportType; | ||
104 | } | 115 | } | ||
105 | ERowType rowType() const { | 116 | ERowType rowType() const { | ||
106 | return m_rowType; | 117 | return m_rowType; | ||
107 | } | 118 | } | ||
108 | Column::Type columnType() const { | 119 | Column::Type columnType() const { | ||
109 | return m_columnType; | 120 | return m_columnType; | ||
110 | } | 121 | } | ||
▲ Show 20 Lines • Show All 388 Lines • ▼ Show 20 Line(s) | |||||
499 | /** | 510 | /** | ||
500 | * Return row type as string. | 511 | * Return row type as string. | ||
501 | * | 512 | * | ||
502 | * @param type type to get string for | 513 | * @param type type to get string for | ||
503 | * @return row type converted to string | 514 | * @return row type converted to string | ||
504 | */ | 515 | */ | ||
505 | static QString toString(ERowType type); | 516 | static QString toString(ERowType type); | ||
506 | 517 | | |||
507 | /** | | |||
508 | * Return report type as string. | | |||
509 | * | | |||
510 | * @param type report type to get string for | | |||
511 | * @return report type converted to string | | |||
512 | */ | | |||
513 | static QString toString(EReportType type); | | |||
514 | | ||||
515 | private: | 518 | private: | ||
516 | /** | 519 | /** | ||
517 | * The user-assigned name of the report | 520 | * The user-assigned name of the report | ||
518 | */ | 521 | */ | ||
519 | QString m_name; | 522 | QString m_name; | ||
520 | /** | 523 | /** | ||
521 | * The user-assigned comment for the report, in case they want to make | 524 | * The user-assigned comment for the report, in case they want to make | ||
522 | * additional notes for themselves about the report. | 525 | * additional notes for themselves about the report. | ||
Show All 30 Lines | 555 | /** | |||
553 | * Whether this report should only include loan accounts | 556 | * Whether this report should only include loan accounts | ||
554 | * Applies only to querytable reports. Mutually exclusive with | 557 | * Applies only to querytable reports. Mutually exclusive with | ||
555 | * m_investments. | 558 | * m_investments. | ||
556 | */ | 559 | */ | ||
557 | bool m_loans; | 560 | bool m_loans; | ||
558 | /** | 561 | /** | ||
559 | * What sort of algorithm should be used to run the report | 562 | * What sort of algorithm should be used to run the report | ||
560 | */ | 563 | */ | ||
561 | enum EReportType m_reportType; | 564 | Report::Type m_reportType; | ||
562 | /** | 565 | /** | ||
563 | * What sort of values should show up on the ROWS of this report | 566 | * What sort of values should show up on the ROWS of this report | ||
564 | */ | 567 | */ | ||
565 | enum ERowType m_rowType; | 568 | enum ERowType m_rowType; | ||
566 | /** | 569 | /** | ||
567 | * What sort of values should show up on the COLUMNS of this report, | 570 | * What sort of values should show up on the COLUMNS of this report, | ||
568 | * in the case of a 'PivotTable' report. Really this is used more as a | 571 | * in the case of a 'PivotTable' report. Really this is used more as a | ||
569 | * QUANTITY of months or days. Whether it's months or days is determined | 572 | * QUANTITY of months or days. Whether it's months or days is determined | ||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |