Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/reports/objectinfotable.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | |||||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | void ObjectInfoTable::init() | 79 | void ObjectInfoTable::init() | ||
80 | { | 80 | { | ||
81 | m_columns.clear(); | 81 | m_columns.clear(); | ||
82 | m_group.clear(); | 82 | m_group.clear(); | ||
83 | m_subtotal.clear(); | 83 | m_subtotal.clear(); | ||
84 | switch (m_config.rowType()) { | 84 | switch (m_config.rowType()) { | ||
85 | case MyMoneyReport::eSchedule: | 85 | case MyMoneyReport::Row::Schedule: | ||
86 | constructScheduleTable(); | 86 | constructScheduleTable(); | ||
87 | m_columns << ctNextDueDate << ctName; | 87 | m_columns << ctNextDueDate << ctName; | ||
88 | break; | 88 | break; | ||
89 | case MyMoneyReport::eAccountInfo: | 89 | case MyMoneyReport::Row::AccountInfo: | ||
90 | constructAccountTable(); | 90 | constructAccountTable(); | ||
91 | m_columns << ctInstitution << ctType << ctName; | 91 | m_columns << ctInstitution << ctType << ctName; | ||
92 | break; | 92 | break; | ||
93 | case MyMoneyReport::eAccountLoanInfo: | 93 | case MyMoneyReport::Row::AccountLoanInfo: | ||
94 | constructAccountLoanTable(); | 94 | constructAccountLoanTable(); | ||
95 | m_columns << ctInstitution << ctType << ctName; | 95 | m_columns << ctInstitution << ctType << ctName; | ||
96 | break; | 96 | break; | ||
97 | default: | 97 | default: | ||
98 | break; | 98 | break; | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | // Sort the data to match the report definition | 101 | // Sort the data to match the report definition | ||
102 | m_subtotal << ctValue; | 102 | m_subtotal << ctValue; | ||
103 | 103 | | |||
104 | switch (m_config.rowType()) { | 104 | switch (m_config.rowType()) { | ||
105 | case MyMoneyReport::eSchedule: | 105 | case MyMoneyReport::Row::Schedule: | ||
106 | m_group << ctType; | 106 | m_group << ctType; | ||
107 | m_subtotal << ctValue; | 107 | m_subtotal << ctValue; | ||
108 | break; | 108 | break; | ||
109 | case MyMoneyReport::eAccountInfo: | 109 | case MyMoneyReport::Row::AccountInfo: | ||
110 | case MyMoneyReport::eAccountLoanInfo: | 110 | case MyMoneyReport::Row::AccountLoanInfo: | ||
111 | m_group << ctTopCategory << ctInstitution; | 111 | m_group << ctTopCategory << ctInstitution; | ||
112 | m_subtotal << ctCurrentBalance; | 112 | m_subtotal << ctCurrentBalance; | ||
113 | break; | 113 | break; | ||
114 | default: | 114 | default: | ||
115 | throw MYMONEYEXCEPTION("ObjectInfoTable::ObjectInfoTable(): unhandled row type"); | 115 | throw MYMONEYEXCEPTION("ObjectInfoTable::ObjectInfoTable(): unhandled row type"); | ||
116 | } | 116 | } | ||
117 | 117 | | |||
118 | QVector<cellTypeE> sort = QVector<cellTypeE>::fromList(m_group) << QVector<cellTypeE>::fromList(m_columns) << ctID << ctRank; | 118 | QVector<cellTypeE> sort = QVector<cellTypeE>::fromList(m_group) << QVector<cellTypeE>::fromList(m_columns) << ctID << ctRank; | ||
119 | 119 | | |||
120 | switch (m_config.rowType()) { | 120 | switch (m_config.rowType()) { | ||
121 | case MyMoneyReport::eSchedule: | 121 | case MyMoneyReport::Row::Schedule: | ||
122 | if (m_config.detailLevel() == MyMoneyReport::eDetailAll) { | 122 | if (m_config.detailLevel() == MyMoneyReport::eDetailAll) { | ||
123 | m_columns << ctName << ctPayee << ctPaymentType << ctOccurrence | 123 | m_columns << ctName << ctPayee << ctPaymentType << ctOccurrence | ||
124 | << ctNextDueDate << ctCategory; | 124 | << ctNextDueDate << ctCategory; | ||
125 | } else { | 125 | } else { | ||
126 | m_columns << ctName << ctPayee << ctPaymentType << ctOccurrence | 126 | m_columns << ctName << ctPayee << ctPaymentType << ctOccurrence | ||
127 | << ctNextDueDate; | 127 | << ctNextDueDate; | ||
128 | } | 128 | } | ||
129 | break; | 129 | break; | ||
130 | case MyMoneyReport::eAccountInfo: | 130 | case MyMoneyReport::Row::AccountInfo: | ||
131 | m_columns << ctType << ctName << ctNumber << ctDescription | 131 | m_columns << ctType << ctName << ctNumber << ctDescription | ||
132 | << ctOpeningDate << ctCurrencyName << ctBalanceWarning | 132 | << ctOpeningDate << ctCurrencyName << ctBalanceWarning | ||
133 | << ctCreditWarning << ctMaxCreditLimit | 133 | << ctCreditWarning << ctMaxCreditLimit | ||
134 | << ctTax << ctFavorite; | 134 | << ctTax << ctFavorite; | ||
135 | break; | 135 | break; | ||
136 | case MyMoneyReport::eAccountLoanInfo: | 136 | case MyMoneyReport::Row::AccountLoanInfo: | ||
137 | m_columns << ctType << ctName << ctNumber << ctDescription | 137 | m_columns << ctType << ctName << ctNumber << ctDescription | ||
138 | << ctOpeningDate << ctCurrencyName << ctPayee | 138 | << ctOpeningDate << ctCurrencyName << ctPayee | ||
139 | << ctLoanAmount << ctInterestRate << ctNextInterestChange | 139 | << ctLoanAmount << ctInterestRate << ctNextInterestChange | ||
140 | << ctPeriodicPayment << ctFinalPayment << ctFavorite; | 140 | << ctPeriodicPayment << ctFinalPayment << ctFavorite; | ||
141 | break; | 141 | break; | ||
142 | default: | 142 | default: | ||
143 | m_columns.clear(); | 143 | m_columns.clear(); | ||
144 | } | 144 | } | ||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |