Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/kreportconfigurationfilterdlg.cpp
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Line(s) | 164 | if (m_tab2->findChild<KComboBox*>("m_comboRows")->isEnabled()) { | |||
---|---|---|---|---|---|
165 | MyMoneyReport::ERowType rt[2] = { MyMoneyReport::eExpenseIncome, MyMoneyReport::eAssetLiability }; | 165 | MyMoneyReport::ERowType rt[2] = { MyMoneyReport::eExpenseIncome, MyMoneyReport::eAssetLiability }; | ||
166 | m_currentState.setRowType(rt[m_tab2->findChild<KComboBox*>("m_comboRows")->currentIndex()]); | 166 | m_currentState.setRowType(rt[m_tab2->findChild<KComboBox*>("m_comboRows")->currentIndex()]); | ||
167 | } | 167 | } | ||
168 | 168 | | |||
169 | m_currentState.setShowingRowTotals(false); | 169 | m_currentState.setShowingRowTotals(false); | ||
170 | if (m_tab2->findChild<KComboBox*>("m_comboRows")->currentIndex() == 0) | 170 | if (m_tab2->findChild<KComboBox*>("m_comboRows")->currentIndex() == 0) | ||
171 | m_currentState.setShowingRowTotals(m_tab2->findChild<QCheckBox*>("m_checkTotalColumn")->isChecked()); | 171 | m_currentState.setShowingRowTotals(m_tab2->findChild<QCheckBox*>("m_checkTotalColumn")->isChecked()); | ||
172 | 172 | | |||
173 | MyMoneyReport::EColumnType ct[6] = { MyMoneyReport::eDays, MyMoneyReport::eWeeks, MyMoneyReport::eMonths, MyMoneyReport::eBiMonths, MyMoneyReport::eQuarters, MyMoneyReport::eYears }; | 173 | MyMoneyReport::Column::Type ct[6] = { MyMoneyReport::Column::Days, MyMoneyReport::Column::Weeks, MyMoneyReport::Column::Months, MyMoneyReport::Column::BiMonths, MyMoneyReport::Column::Quarters, MyMoneyReport::Column::Years }; | ||
174 | bool dy[6] = { true, true, false, false, false, false }; | 174 | bool dy[6] = { true, true, false, false, false, false }; | ||
175 | m_currentState.setColumnType(ct[m_tab2->findChild<KComboBox*>("m_comboColumns")->currentIndex()]); | 175 | m_currentState.setColumnType(ct[m_tab2->findChild<KComboBox*>("m_comboColumns")->currentIndex()]); | ||
176 | 176 | | |||
177 | //TODO (Ace) This should be implicit in the call above. MMReport needs fixin' | 177 | //TODO (Ace) This should be implicit in the call above. MMReport needs fixin' | ||
178 | m_currentState.setColumnsAreDays(dy[m_tab2->findChild<KComboBox*>("m_comboColumns")->currentIndex()]); | 178 | m_currentState.setColumnsAreDays(dy[m_tab2->findChild<KComboBox*>("m_comboColumns")->currentIndex()]); | ||
179 | 179 | | |||
180 | m_currentState.setIncludingSchedules(m_tab2->findChild<QCheckBox*>("m_checkScheduled")->isChecked()); | 180 | m_currentState.setIncludingSchedules(m_tab2->findChild<QCheckBox*>("m_checkScheduled")->isChecked()); | ||
181 | 181 | | |||
▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | 300 | if (m_tab2) { | |||
329 | } | 329 | } | ||
330 | m_tab2->findChild<QCheckBox*>("m_checkTotalColumn")->setChecked(m_initialState.isShowingRowTotals()); | 330 | m_tab2->findChild<QCheckBox*>("m_checkTotalColumn")->setChecked(m_initialState.isShowingRowTotals()); | ||
331 | 331 | | |||
332 | slotRowTypeChanged(combo->currentIndex()); | 332 | slotRowTypeChanged(combo->currentIndex()); | ||
333 | 333 | | |||
334 | combo = m_tab2->findChild<KComboBox*>("m_comboColumns"); | 334 | combo = m_tab2->findChild<KComboBox*>("m_comboColumns"); | ||
335 | if (m_initialState.isColumnsAreDays()) { | 335 | if (m_initialState.isColumnsAreDays()) { | ||
336 | switch (m_initialState.columnType()) { | 336 | switch (m_initialState.columnType()) { | ||
337 | case MyMoneyReport::eNoColumns: | 337 | case MyMoneyReport::Column::NoColumns: | ||
338 | case MyMoneyReport::eDays: | 338 | case MyMoneyReport::Column::Days: | ||
339 | combo->setCurrentItem(i18nc("@item the columns will display daily data", "Daily"), false); | 339 | combo->setCurrentItem(i18nc("@item the columns will display daily data", "Daily"), false); | ||
340 | break; | 340 | break; | ||
341 | case MyMoneyReport::eWeeks: | 341 | case MyMoneyReport::Column::Weeks: | ||
342 | combo->setCurrentItem(i18nc("@item the columns will display weekly data", "Weekly"), false); | 342 | combo->setCurrentItem(i18nc("@item the columns will display weekly data", "Weekly"), false); | ||
343 | break; | 343 | break; | ||
344 | default: | 344 | default: | ||
345 | break; | 345 | break; | ||
346 | } | 346 | } | ||
347 | } else { | 347 | } else { | ||
348 | switch (m_initialState.columnType()) { | 348 | switch (m_initialState.columnType()) { | ||
349 | case MyMoneyReport::eNoColumns: | 349 | case MyMoneyReport::Column::NoColumns: | ||
350 | case MyMoneyReport::eMonths: | 350 | case MyMoneyReport::Column::Months: | ||
351 | combo->setCurrentItem(i18nc("@item the columns will display monthly data", "Monthly"), false); | 351 | combo->setCurrentItem(i18nc("@item the columns will display monthly data", "Monthly"), false); | ||
352 | break; | 352 | break; | ||
353 | case MyMoneyReport::eBiMonths: | 353 | case MyMoneyReport::Column::BiMonths: | ||
354 | combo->setCurrentItem(i18nc("@item the columns will display bi-monthly data", "Bi-Monthly"), false); | 354 | combo->setCurrentItem(i18nc("@item the columns will display bi-monthly data", "Bi-Monthly"), false); | ||
355 | break; | 355 | break; | ||
356 | case MyMoneyReport::eQuarters: | 356 | case MyMoneyReport::Column::Quarters: | ||
357 | combo->setCurrentItem(i18nc("@item the columns will display quarterly data", "Quarterly"), false); | 357 | combo->setCurrentItem(i18nc("@item the columns will display quarterly data", "Quarterly"), false); | ||
358 | break; | 358 | break; | ||
359 | case MyMoneyReport::eYears: | 359 | case MyMoneyReport::Column::Years: | ||
360 | combo->setCurrentItem(i18nc("@item the columns will display yearly data", "Yearly"), false); | 360 | combo->setCurrentItem(i18nc("@item the columns will display yearly data", "Yearly"), false); | ||
361 | break; | 361 | break; | ||
362 | default: | 362 | default: | ||
363 | break; | 363 | break; | ||
364 | } | 364 | } | ||
365 | } | 365 | } | ||
366 | 366 | | |||
367 | //load budgets combo | 367 | //load budgets combo | ||
Show All 20 Lines | |||||
388 | } | 388 | } | ||
389 | 389 | | |||
390 | m_tab2->findChild<QCheckBox*>("m_checkScheduled")->setChecked(m_initialState.isIncludingSchedules()); | 390 | m_tab2->findChild<QCheckBox*>("m_checkScheduled")->setChecked(m_initialState.isIncludingSchedules()); | ||
391 | m_tab2->findChild<QCheckBox*>("m_checkTransfers")->setChecked(m_initialState.isIncludingTransfers()); | 391 | m_tab2->findChild<QCheckBox*>("m_checkTransfers")->setChecked(m_initialState.isIncludingTransfers()); | ||
392 | m_tab2->findChild<QCheckBox*>("m_checkUnused")->setChecked(m_initialState.isIncludingUnusedAccounts()); | 392 | m_tab2->findChild<QCheckBox*>("m_checkUnused")->setChecked(m_initialState.isIncludingUnusedAccounts()); | ||
393 | } else if (m_tab3) { | 393 | } else if (m_tab3) { | ||
394 | KComboBox *combo = m_tab3->findChild<KComboBox*>("m_comboOrganizeBy"); | 394 | KComboBox *combo = m_tab3->findChild<KComboBox*>("m_comboOrganizeBy"); | ||
395 | switch (m_initialState.rowType()) { | 395 | switch (m_initialState.rowType()) { | ||
396 | case MyMoneyReport::eNoColumns: | 396 | case MyMoneyReport::Column::NoColumns: | ||
397 | case MyMoneyReport::eCategory: | 397 | case MyMoneyReport::eCategory: | ||
398 | combo->setCurrentItem(i18n("Categories"), false); | 398 | combo->setCurrentItem(i18n("Categories"), false); | ||
399 | break; | 399 | break; | ||
400 | case MyMoneyReport::eTopCategory: | 400 | case MyMoneyReport::eTopCategory: | ||
401 | combo->setCurrentItem(i18n("Top Categories"), false); | 401 | combo->setCurrentItem(i18n("Top Categories"), false); | ||
402 | break; | 402 | break; | ||
403 | case MyMoneyReport::eTag: | 403 | case MyMoneyReport::eTag: | ||
404 | combo->setCurrentItem(i18n("Tags"), false); | 404 | combo->setCurrentItem(i18n("Tags"), false); | ||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |