Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyreport.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 57 | public: | |||
---|---|---|---|---|---|
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 | class Column { | 61 | class Column { | ||
62 | public: | 62 | public: | ||
63 | enum Type { NoColumns = 0, Days = 1, Months = 1, BiMonths = 2, Quarters = 3, Weeks = 7, Years = 12 }; | 63 | enum Type { NoColumns = 0, Days = 1, Months = 1, BiMonths = 2, Quarters = 3, Weeks = 7, Years = 12 }; | ||
64 | static const QStringList kTypeText; | 64 | static const QStringList kTypeText; | ||
65 | }; | 65 | }; | ||
66 | 66 | | |||
67 | // 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 end and update its value afterwards | ||
68 | // also don't forget to add column names to kQueryColumnsText in mymoneyreport.cpp | 68 | // also don't forget to add column names to QueryColumns::kText in mymoneyreport.cpp | ||
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 }; | 69 | class QueryColumns { | ||
70 | 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 }; | ||||
72 | static const QStringList kText; | ||||
73 | }; | ||||
70 | 74 | | |||
71 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | 75 | enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; | ||
72 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | 76 | enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; | ||
73 | 77 | | |||
74 | static const QStringList kRowTypeText; | 78 | static const QStringList kRowTypeText; | ||
75 | static const QStringList kQueryColumnsText; | | |||
76 | static const QStringList kDetailLevelText; | 79 | static const QStringList kDetailLevelText; | ||
77 | static const QStringList kChartTypeText; | 80 | static const QStringList kChartTypeText; | ||
78 | static const EReportType kTypeArray[]; | 81 | static const EReportType kTypeArray[]; | ||
79 | 82 | | |||
80 | public: | 83 | public: | ||
81 | MyMoneyReport(); | 84 | MyMoneyReport(); | ||
82 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | 85 | MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment); | ||
83 | MyMoneyReport(const QString& id, const MyMoneyReport& right); | 86 | MyMoneyReport(const QString& id, const MyMoneyReport& right); | ||
Show All 31 Lines | 117 | unsigned columnPitch() const { | |||
115 | return static_cast<unsigned>(m_columnType); | 118 | return static_cast<unsigned>(m_columnType); | ||
116 | } | 119 | } | ||
117 | bool isShowingColumnTotals() const { | 120 | bool isShowingColumnTotals() const { | ||
118 | return m_convertCurrency; | 121 | return m_convertCurrency; | ||
119 | } | 122 | } | ||
120 | const QString& comment() const { | 123 | const QString& comment() const { | ||
121 | return m_comment; | 124 | return m_comment; | ||
122 | } | 125 | } | ||
123 | EQueryColumns queryColumns() const { | 126 | QueryColumns::Type queryColumns() const { | ||
124 | return m_queryColumns; | 127 | return m_queryColumns; | ||
125 | } | 128 | } | ||
126 | const QString& group() const { | 129 | const QString& group() const { | ||
127 | return m_group; | 130 | return m_group; | ||
128 | } | 131 | } | ||
129 | bool isFavorite() const { | 132 | bool isFavorite() const { | ||
130 | return m_favorite; | 133 | return m_favorite; | ||
131 | } | 134 | } | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 225 | void setComment(const QString& _comment) { | |||
223 | m_comment = _comment; | 226 | m_comment = _comment; | ||
224 | } | 227 | } | ||
225 | void setGroup(const QString& _group) { | 228 | void setGroup(const QString& _group) { | ||
226 | m_group = _group; | 229 | m_group = _group; | ||
227 | } | 230 | } | ||
228 | void setFavorite(bool _f) { | 231 | void setFavorite(bool _f) { | ||
229 | m_favorite = _f; | 232 | m_favorite = _f; | ||
230 | } | 233 | } | ||
231 | void setQueryColumns(EQueryColumns _qc) { | 234 | void setQueryColumns(QueryColumns::Type _qc) { | ||
232 | m_queryColumns = _qc; | 235 | m_queryColumns = _qc; | ||
233 | } | 236 | } | ||
234 | void setTax(bool _f) { | 237 | void setTax(bool _f) { | ||
235 | m_tax = _f; | 238 | m_tax = _f; | ||
236 | } | 239 | } | ||
237 | void setInvestmentsOnly(bool _f) { | 240 | void setInvestmentsOnly(bool _f) { | ||
238 | m_investments = _f; if (_f) m_loans = false; | 241 | m_investments = _f; if (_f) m_loans = false; | ||
239 | } | 242 | } | ||
▲ Show 20 Lines • Show All 331 Lines • ▼ Show 20 Line(s) | 515 | private: | |||
571 | * Whether the base unit of columns of this report is days. Only applies to | 574 | * Whether the base unit of columns of this report is days. Only applies to | ||
572 | * 'PivotTable' reports. If false, then columns are months or multiples thereof. | 575 | * 'PivotTable' reports. If false, then columns are months or multiples thereof. | ||
573 | */ | 576 | */ | ||
574 | bool m_columnsAreDays; | 577 | bool m_columnsAreDays; | ||
575 | /** | 578 | /** | ||
576 | * What sort of values should show up on the COLUMNS of this report, | 579 | * What sort of values should show up on the COLUMNS of this report, | ||
577 | * in the case of a 'QueryTable' report | 580 | * in the case of a 'QueryTable' report | ||
578 | */ | 581 | */ | ||
579 | enum EQueryColumns m_queryColumns; | 582 | enum QueryColumns::Type m_queryColumns; | ||
580 | 583 | | |||
581 | /** | 584 | /** | ||
582 | * The plain-language description of what the date range should be locked | 585 | * The plain-language description of what the date range should be locked | ||
583 | * to. 'userDefined' means NO locking, in any other case, the report | 586 | * to. 'userDefined' means NO locking, in any other case, the report | ||
584 | * will be adjusted to match the date lock. So if the date lock is | 587 | * will be adjusted to match the date lock. So if the date lock is | ||
585 | * 'currentMonth', the start and end dates of the underlying filter will | 588 | * 'currentMonth', the start and end dates of the underlying filter will | ||
586 | * be updated to whatever the current month is. This updating happens | 589 | * be updated to whatever the current month is. This updating happens | ||
587 | * automatically when the report is loaded, and should also be done | 590 | * automatically when the report is loaded, and should also be done | ||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |