diff --git a/kmymoney/dialogs/kreportconfigurationfilterdlg.h b/kmymoney/dialogs/kreportconfigurationfilterdlg.h --- a/kmymoney/dialogs/kreportconfigurationfilterdlg.h +++ b/kmymoney/dialogs/kreportconfigurationfilterdlg.h @@ -39,14 +39,13 @@ #include "kfindtransactiondlg.h" #include "mymoneyreport.h" #include "mymoneybudget.h" -#include "kmymoneyreportconfigtabimpl.h" +#include "reporttabimpl.h" - -class kMyMoneyReportConfigTab1Decl; -class kMyMoneyReportConfigTab2Decl; -class kMyMoneyReportConfigTab3Decl; -class kMyMoneyReportConfigTabChartDecl; -class kMyMoneyReportConfigTabRangeDecl; +class ReportTabGeneral; +class ReportTabRowColPivot; +class ReportTabRowColQuery; +class ReportTabChart; +class ReportTabRange; class MyMoneyBudget; /** @@ -64,11 +63,11 @@ } protected: - kMyMoneyReportConfigTab1Decl* m_tab1; - kMyMoneyReportConfigTab2Decl* m_tab2; - kMyMoneyReportConfigTab3Decl* m_tab3; - kMyMoneyReportConfigTabChartDecl* m_tabChart; - kMyMoneyReportConfigTabRangeDecl* m_tabRange; + QPointer m_tabGeneral; + QPointer m_tabRowColPivot; + QPointer m_tabRowColQuery; + QPointer m_tabChart; + QPointer m_tabRange; MyMoneyReport m_initialState; MyMoneyReport m_currentState; diff --git a/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp b/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp --- a/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp +++ b/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp @@ -62,13 +62,17 @@ #include "ui_kfindtransactiondlgdecl.h" #include "ui_daterangedlgdecl.h" -#include "ui_kmymoneyreportconfigtabrangedecl.h" +#include +#include +#include +#include +#include KReportConfigurationFilterDlg::KReportConfigurationFilterDlg( MyMoneyReport report, QWidget *parent) : KFindTransactionDlg(parent), - m_tab2(0), - m_tab3(0), + m_tabRowColPivot(0), + m_tabRowColQuery(0), m_tabChart(0), m_tabRange(0), m_initialState(report), @@ -94,25 +98,17 @@ // Add new tabs // - m_tab1 = new kMyMoneyReportConfigTab1Decl(m_ui->m_criteriaTab); - m_tab1->setObjectName("kMyMoneyReportConfigTab1"); - m_ui->m_criteriaTab->insertTab(0, m_tab1, i18n("Report")); + m_tabGeneral = new ReportTabGeneral(m_ui->m_criteriaTab); + m_ui->m_criteriaTab->insertTab(0, m_tabGeneral, i18nc("General tab", "General")); if (m_initialState.reportType() == MyMoneyReport::ePivotTable) { - m_tab2 = new kMyMoneyReportConfigTab2Decl(m_ui->m_criteriaTab); - m_tab2->setObjectName("kMyMoneyReportConfigTab2"); - m_ui->m_criteriaTab->insertTab(1, m_tab2, i18n("Rows/Columns")); - connect(m_tab2->findChild("m_comboRows"), SIGNAL(activated(int)), this, SLOT(slotRowTypeChanged(int))); - connect(m_tab2->findChild("m_comboRows"), SIGNAL(activated(int)), this, SLOT(slotUpdateColumnsCombo())); - //control the state of the includeTransfer check - connect(m_ui->m_categoriesView, SIGNAL(stateChanged()), this, SLOT(slotUpdateCheckTransfers())); + m_tabRowColPivot = new ReportTabRowColPivot(m_ui->m_criteriaTab); + m_ui->m_criteriaTab->insertTab(1, m_tabRowColPivot, i18n("Rows/Columns")); - m_tabChart = new kMyMoneyReportConfigTabChartDecl(m_ui->m_criteriaTab); - m_tabChart->setObjectName("kMyMoneyReportConfigTabChart"); + m_tabChart = new ReportTabChart(m_ui->m_criteriaTab); m_ui->m_criteriaTab->insertTab(2, m_tabChart, i18n("Chart")); - m_tabRange = new kMyMoneyReportConfigTabRangeDecl(m_ui->m_criteriaTab); - m_tabRange->setObjectName("kMyMoneyReportConfigTabRange"); + m_tabRange = new ReportTabRange(m_ui->m_criteriaTab); m_ui->m_criteriaTab->insertTab(3, m_tabRange, i18n("Range")); // date tab is going to be replaced by range tab, so delete it @@ -125,18 +121,23 @@ connect(m_tabRange->ui->m_comboColumns, SIGNAL(activated(int)), this, SLOT(slotColumnTypeChanged(int))); connect(m_tabRange->ui->m_comboColumns, SIGNAL(activated(int)), this, SLOT(slotUpdateColumnsCombo())); - connect(m_tabChart->findChild("m_logYaxis"), SIGNAL(stateChanged(int)), this, SLOT(slotLogAxisChanged(int))); + connect(m_tabChart->ui->m_logYaxis, SIGNAL(stateChanged(int)), this, SLOT(slotLogAxisChanged(int))); + + connect(m_tabRowColPivot->ui->m_comboRows, SIGNAL(activated(int)), this, SLOT(slotRowTypeChanged(int))); + connect(m_tabRowColPivot->ui->m_comboRows, SIGNAL(activated(int)), this, SLOT(slotUpdateColumnsCombo())); + //control the state of the includeTransfer check + connect(m_ui->m_categoriesView, SIGNAL(stateChanged()), this, SLOT(slotUpdateCheckTransfers())); + } else if (m_initialState.reportType() == MyMoneyReport::eQueryTable) { // eInvestmentHoldings is a special-case report, and you cannot configure the // rows & columns of that report. if (m_initialState.rowType() < MyMoneyReport::eAccountByTopAccount) { - m_tab3 = new kMyMoneyReportConfigTab3Decl(m_ui->m_criteriaTab); - m_tab3->setObjectName("kMyMoneyReportConfigTab3"); - m_ui->m_criteriaTab->insertTab(1, m_tab3, i18n("Rows/Columns")); + m_tabRowColQuery = new ReportTabRowColQuery(m_ui->m_criteriaTab); + m_ui->m_criteriaTab->insertTab(1, m_tabRowColQuery, i18n("Rows/Columns")); } } - m_ui->m_criteriaTab->setCurrentIndex(m_ui->m_criteriaTab->indexOf(m_tab1)); + m_ui->m_criteriaTab->setCurrentIndex(m_ui->m_criteriaTab->indexOf(m_tabGeneral)); m_ui->m_criteriaTab->setMinimumSize(500, 200); QList list = MyMoneyFile::instance()->budgetList(); @@ -164,46 +165,46 @@ m_currentState.assignFilter(m_filter); // Then extract the report properties - m_currentState.setName(m_tab1->findChild("m_editName")->text()); - m_currentState.setComment(m_tab1->findChild("m_editComment")->text()); - m_currentState.setConvertCurrency(m_tab1->findChild("m_checkCurrency")->isChecked()); - m_currentState.setFavorite(m_tab1->findChild("m_checkFavorite")->isChecked()); - m_currentState.setSkipZero(m_tab1->findChild("m_skipZero")->isChecked()); + m_currentState.setName(m_tabGeneral->ui->m_editName->text()); + m_currentState.setComment(m_tabGeneral->ui->m_editComment->text()); + m_currentState.setConvertCurrency(m_tabGeneral->ui->m_checkCurrency->isChecked()); + m_currentState.setFavorite(m_tabGeneral->ui->m_checkFavorite->isChecked()); + m_currentState.setSkipZero(m_tabGeneral->ui->m_skipZero->isChecked()); - if (m_tab2) { + if (m_tabRowColPivot) { MyMoneyReport::EDetailLevel dl[4] = { MyMoneyReport::eDetailAll, MyMoneyReport::eDetailTop, MyMoneyReport::eDetailGroup, MyMoneyReport::eDetailTotal }; - m_currentState.setDetailLevel(dl[m_tab2->findChild("m_comboDetail")->currentIndex()]); + m_currentState.setDetailLevel(dl[m_tabRowColPivot->ui->m_comboDetail->currentIndex()]); // modify the rowtype only if the widget is enabled - if (m_tab2->findChild("m_comboRows")->isEnabled()) { + if (m_tabRowColPivot->ui->m_comboRows->isEnabled()) { MyMoneyReport::ERowType rt[2] = { MyMoneyReport::eExpenseIncome, MyMoneyReport::eAssetLiability }; - m_currentState.setRowType(rt[m_tab2->findChild("m_comboRows")->currentIndex()]); + m_currentState.setRowType(rt[m_tabRowColPivot->ui->m_comboRows->currentIndex()]); } m_currentState.setShowingRowTotals(false); - if (m_tab2->findChild("m_comboRows")->currentIndex() == 0) - m_currentState.setShowingRowTotals(m_tab2->findChild("m_checkTotalColumn")->isChecked()); + if (m_tabRowColPivot->ui->m_comboRows->currentIndex() == 0) + m_currentState.setShowingRowTotals(m_tabRowColPivot->ui->m_checkTotalColumn->isChecked()); - m_currentState.setIncludingSchedules(m_tab2->findChild("m_checkScheduled")->isChecked()); + m_currentState.setIncludingSchedules(m_tabRowColPivot->ui->m_checkScheduled->isChecked()); - m_currentState.setIncludingTransfers(m_tab2->findChild("m_checkTransfers")->isChecked()); + m_currentState.setIncludingTransfers(m_tabRowColPivot->ui->m_checkTransfers->isChecked()); - m_currentState.setIncludingUnusedAccounts(m_tab2->findChild("m_checkUnused")->isChecked()); + m_currentState.setIncludingUnusedAccounts(m_tabRowColPivot->ui->m_checkUnused->isChecked()); - if (m_tab2->findChild("m_comboBudget")->isEnabled()) { - m_currentState.setBudget(m_budgets[m_tab2->findChild("m_comboBudget")->currentItem()].id(), m_initialState.rowType() == MyMoneyReport::eBudgetActual); + if (m_tabRowColPivot->ui->m_comboBudget->isEnabled()) { + m_currentState.setBudget(m_budgets[m_tabRowColPivot->ui->m_comboBudget->currentItem()].id(), m_initialState.rowType() == MyMoneyReport::eBudgetActual); } else { m_currentState.setBudget(QString(), false); } //set moving average days - if (m_tab2->findChild("m_movingAverageDays")->isEnabled()) { - m_currentState.setMovingAverageDays(m_tab2->findChild("m_movingAverageDays")->value()); + if (m_tabRowColPivot->ui->m_movingAverageDays->isEnabled()) { + m_currentState.setMovingAverageDays(m_tabRowColPivot->ui->m_movingAverageDays->value()); } - } else if (m_tab3) { + } else if (m_tabRowColQuery) { MyMoneyReport::ERowType rtq[8] = { MyMoneyReport::eCategory, MyMoneyReport::eTopCategory, MyMoneyReport::eTag, MyMoneyReport::ePayee, MyMoneyReport::eAccount, MyMoneyReport::eTopAccount, MyMoneyReport::eMonth, MyMoneyReport::eWeek }; - m_currentState.setRowType(rtq[m_tab3->findChild("m_comboOrganizeBy")->currentIndex()]); + m_currentState.setRowType(rtq[m_tabRowColQuery->ui->m_comboOrganizeBy->currentIndex()]); unsigned qc = MyMoneyReport::eQCnone; @@ -211,50 +212,50 @@ // once a loan report, always a loan report qc = MyMoneyReport::eQCloan; - if (m_tab3->findChild("m_checkNumber")->isChecked()) + if (m_tabRowColQuery->ui->m_checkNumber->isChecked()) qc |= MyMoneyReport::eQCnumber; - if (m_tab3->findChild("m_checkPayee")->isChecked()) + if (m_tabRowColQuery->ui->m_checkPayee->isChecked()) qc |= MyMoneyReport::eQCpayee; - if (m_tab3->findChild("m_checkTag")->isChecked()) + if (m_tabRowColQuery->ui->m_checkTag->isChecked()) qc |= MyMoneyReport::eQCtag; - if (m_tab3->findChild("m_checkCategory")->isChecked()) + if (m_tabRowColQuery->ui->m_checkCategory->isChecked()) qc |= MyMoneyReport::eQCcategory; - if (m_tab3->findChild("m_checkMemo")->isChecked()) + if (m_tabRowColQuery->ui->m_checkMemo->isChecked()) qc |= MyMoneyReport::eQCmemo; - if (m_tab3->findChild("m_checkAccount")->isChecked()) + if (m_tabRowColQuery->ui->m_checkAccount->isChecked()) qc |= MyMoneyReport::eQCaccount; - if (m_tab3->findChild("m_checkReconciled")->isChecked()) + if (m_tabRowColQuery->ui->m_checkReconciled->isChecked()) qc |= MyMoneyReport::eQCreconciled; - if (m_tab3->findChild("m_checkAction")->isChecked()) + if (m_tabRowColQuery->ui->m_checkAction->isChecked()) qc |= MyMoneyReport::eQCaction; - if (m_tab3->findChild("m_checkShares")->isChecked()) + if (m_tabRowColQuery->ui->m_checkShares->isChecked()) qc |= MyMoneyReport::eQCshares; - if (m_tab3->findChild("m_checkPrice")->isChecked()) + if (m_tabRowColQuery->ui->m_checkPrice->isChecked()) qc |= MyMoneyReport::eQCprice; - if (m_tab3->findChild("m_checkBalance")->isChecked()) + if (m_tabRowColQuery->ui->m_checkBalance->isChecked()) qc |= MyMoneyReport::eQCbalance; m_currentState.setQueryColumns(static_cast(qc)); - m_currentState.setTax(m_tab3->findChild("m_checkTax")->isChecked()); - m_currentState.setInvestmentsOnly(m_tab3->findChild("m_checkInvestments")->isChecked()); - m_currentState.setLoansOnly(m_tab3->findChild("m_checkLoans")->isChecked()); + m_currentState.setTax(m_tabRowColQuery->ui->m_checkTax->isChecked()); + m_currentState.setInvestmentsOnly(m_tabRowColQuery->ui->m_checkInvestments->isChecked()); + m_currentState.setLoansOnly(m_tabRowColQuery->ui->m_checkLoans->isChecked()); - m_currentState.setDetailLevel(m_tab3->findChild("m_checkHideSplitDetails")->isChecked() ? + m_currentState.setDetailLevel(m_tabRowColQuery->ui->m_checkHideSplitDetails->isChecked() ? MyMoneyReport::eDetailNone : MyMoneyReport::eDetailAll); - m_currentState.setHideTransactions(m_tab3->findChild("m_checkHideTransactions")->isChecked()); + m_currentState.setHideTransactions(m_tabRowColQuery->ui->m_checkHideTransactions->isChecked()); } if (m_tabChart) { MyMoneyReport::EChartType ct[5] = { MyMoneyReport::eChartLine, MyMoneyReport::eChartBar, MyMoneyReport::eChartStackedBar, MyMoneyReport::eChartPie, MyMoneyReport::eChartRing }; - m_currentState.setChartType(ct[m_tabChart->findChild("m_comboType")->currentIndex()]); - - m_currentState.setChartCHGridLines(m_tabChart->findChild("m_checkCHGridLines")->isChecked()); - m_currentState.setChartSVGridLines(m_tabChart->findChild("m_checkSVGridLines")->isChecked()); - m_currentState.setChartDataLabels(m_tabChart->findChild("m_checkValues")->isChecked()); - m_currentState.setChartByDefault(m_tabChart->findChild("m_checkShowChart")->isChecked()); - m_currentState.setChartLineWidth(m_tabChart->findChild("m_lineWidth")->value()); - m_currentState.setLogYAxis(m_tabChart->findChild("m_logYaxis")->isChecked()); + m_currentState.setChartType(ct[m_tabChart->ui->m_comboType->currentIndex()]); + + m_currentState.setChartCHGridLines(m_tabChart->ui->m_checkCHGridLines->isChecked()); + m_currentState.setChartSVGridLines(m_tabChart->ui->m_checkSVGridLines->isChecked()); + m_currentState.setChartDataLabels(m_tabChart->ui->m_checkValues->isChecked()); + m_currentState.setChartByDefault(m_tabChart->ui->m_checkShowChart->isChecked()); + m_currentState.setChartLineWidth(m_tabChart->ui->m_lineWidth->value()); + m_currentState.setLogYAxis(m_tabChart->ui->m_logYaxis->isChecked()); } if (m_tabRange) { @@ -282,12 +283,12 @@ void KReportConfigurationFilterDlg::slotRowTypeChanged(int row) { - m_tab2->findChild("m_checkTotalColumn")->setEnabled(row == 0); + m_tabRowColPivot->ui->m_checkTotalColumn->setEnabled(row == 0); } void KReportConfigurationFilterDlg::slotColumnTypeChanged(int row) { - if ((m_tab2->findChild("m_comboBudget")->isEnabled() && row < 2)) { + if ((m_tabRowColPivot->ui->m_comboBudget->isEnabled() && row < 2)) { m_tabRange->ui->m_comboColumns->setCurrentItem(i18nc("@item the columns will display monthly data", "Monthly"), false); } } @@ -296,7 +297,7 @@ { const int monthlyIndex = 2; const int incomeExpenseIndex = 0; - const bool isIncomeExpenseForecast = m_currentState.isIncludingForecast() && m_tab2->findChild("m_comboRows")->currentIndex() == incomeExpenseIndex; + const bool isIncomeExpenseForecast = m_currentState.isIncludingForecast() && m_tabRowColPivot->ui->m_comboRows->currentIndex() == incomeExpenseIndex; if (isIncomeExpenseForecast && m_tabRange->ui->m_comboColumns->currentIndex() != monthlyIndex) { m_tabRange->ui->m_comboColumns->setCurrentItem(i18nc("@item the columns will display monthly data", "Monthly"), false); } @@ -321,19 +322,19 @@ // Report Properties // - m_tab1->findChild("m_editName")->setText(m_initialState.name()); - m_tab1->findChild("m_editComment")->setText(m_initialState.comment()); - m_tab1->findChild("m_checkCurrency")->setChecked(m_initialState.isConvertCurrency()); - m_tab1->findChild("m_checkFavorite")->setChecked(m_initialState.isFavorite()); + m_tabGeneral->ui->m_editName->setText(m_initialState.name()); + m_tabGeneral->ui->m_editComment->setText(m_initialState.comment()); + m_tabGeneral->ui->m_checkCurrency->setChecked(m_initialState.isConvertCurrency()); + m_tabGeneral->ui->m_checkFavorite->setChecked(m_initialState.isFavorite()); if (m_initialState.isIncludingPrice() || m_initialState.isSkippingZero()) { - m_tab1->findChild("m_skipZero")->setChecked(m_initialState.isSkippingZero()); + m_tabGeneral->ui->m_skipZero->setChecked(m_initialState.isSkippingZero()); } else { - m_tab1->findChild("m_skipZero")->setEnabled(false); + m_tabGeneral->ui->m_skipZero->setEnabled(false); } - if (m_tab2) { - KComboBox *combo = m_tab2->findChild("m_comboDetail"); + if (m_tabRowColPivot) { + KComboBox *combo = m_tabRowColPivot->ui->m_comboDetail; switch (m_initialState.detailLevel()) { case MyMoneyReport::eDetailNone: case MyMoneyReport::eDetailEnd: @@ -351,7 +352,7 @@ break; } - combo = m_tab2->findChild("m_comboRows"); + combo = m_tabRowColPivot->ui->m_comboRows; switch (m_initialState.rowType()) { case MyMoneyReport::eExpenseIncome: case MyMoneyReport::eBudget: @@ -362,38 +363,38 @@ combo->setCurrentItem(i18n("Assets & Liabilities"), false); // asset / liability break; } - m_tab2->findChild("m_checkTotalColumn")->setChecked(m_initialState.isShowingRowTotals()); + m_tabRowColPivot->ui->m_checkTotalColumn->setChecked(m_initialState.isShowingRowTotals()); slotRowTypeChanged(combo->currentIndex()); //load budgets combo if (m_initialState.rowType() == MyMoneyReport::eBudget || m_initialState.rowType() == MyMoneyReport::eBudgetActual) { - m_tab2->findChild("m_comboRows")->setEnabled(false); - m_tab2->findChild("m_budgetFrame")->setEnabled(!m_budgets.empty()); + m_tabRowColPivot->ui->m_comboRows->setEnabled(false); + m_tabRowColPivot->ui->m_budgetFrame->setEnabled(!m_budgets.empty()); int i = 0; for (QVector::const_iterator it_b = m_budgets.constBegin(); it_b != m_budgets.constEnd(); ++it_b) { - m_tab2->findChild("m_comboBudget")->insertItem((*it_b).name(), i); + m_tabRowColPivot->ui->m_comboBudget->insertItem((*it_b).name(), i); //set the current selected item if ((m_initialState.budget() == "Any" && (*it_b).budgetStart().year() == QDate::currentDate().year()) || m_initialState.budget() == (*it_b).id()) - m_tab2->findChild("m_comboBudget")->setCurrentItem(i); + m_tabRowColPivot->ui->m_comboBudget->setCurrentItem(i); i++; } } //set moving average days spinbox - QSpinBox *spinbox = m_tab2->findChild("m_movingAverageDays"); + QSpinBox *spinbox = m_tabRowColPivot->ui->m_movingAverageDays; spinbox->setEnabled(m_initialState.isIncludingMovingAverage()); if (m_initialState.isIncludingMovingAverage()) { spinbox->setValue(m_initialState.movingAverageDays()); } - m_tab2->findChild("m_checkScheduled")->setChecked(m_initialState.isIncludingSchedules()); - m_tab2->findChild("m_checkTransfers")->setChecked(m_initialState.isIncludingTransfers()); - m_tab2->findChild("m_checkUnused")->setChecked(m_initialState.isIncludingUnusedAccounts()); - } else if (m_tab3) { - KComboBox *combo = m_tab3->findChild("m_comboOrganizeBy"); + m_tabRowColPivot->ui->m_checkScheduled->setChecked(m_initialState.isIncludingSchedules()); + m_tabRowColPivot->ui->m_checkTransfers->setChecked(m_initialState.isIncludingTransfers()); + m_tabRowColPivot->ui->m_checkUnused->setChecked(m_initialState.isIncludingUnusedAccounts()); + } else if (m_tabRowColQuery) { + KComboBox *combo = m_tabRowColQuery->ui->m_comboOrganizeBy; switch (m_initialState.rowType()) { case MyMoneyReport::eNoColumns: case MyMoneyReport::eCategory: @@ -425,31 +426,31 @@ } unsigned qc = m_initialState.queryColumns(); - m_tab3->findChild("m_checkNumber")->setChecked(qc & MyMoneyReport::eQCnumber); - m_tab3->findChild("m_checkPayee")->setChecked(qc & MyMoneyReport::eQCpayee); - m_tab3->findChild("m_checkTag")->setChecked(qc & MyMoneyReport::eQCtag); - m_tab3->findChild("m_checkCategory")->setChecked(qc & MyMoneyReport::eQCcategory); - m_tab3->findChild("m_checkMemo")->setChecked(qc & MyMoneyReport::eQCmemo); - m_tab3->findChild("m_checkAccount")->setChecked(qc & MyMoneyReport::eQCaccount); - m_tab3->findChild("m_checkReconciled")->setChecked(qc & MyMoneyReport::eQCreconciled); - m_tab3->findChild("m_checkAction")->setChecked(qc & MyMoneyReport::eQCaction); - m_tab3->findChild("m_checkShares")->setChecked(qc & MyMoneyReport::eQCshares); - m_tab3->findChild("m_checkPrice")->setChecked(qc & MyMoneyReport::eQCprice); - m_tab3->findChild("m_checkBalance")->setChecked(qc & MyMoneyReport::eQCbalance); - - m_tab3->findChild("m_checkTax")->setChecked(m_initialState.isTax()); - m_tab3->findChild("m_checkInvestments")->setChecked(m_initialState.isInvestmentsOnly()); - m_tab3->findChild("m_checkLoans")->setChecked(m_initialState.isLoansOnly()); - - m_tab3->findChild("m_checkHideTransactions")->setChecked(m_initialState.isHideTransactions()); - m_tab3->findChild("m_checkHideSplitDetails")->setEnabled(!m_initialState.isHideTransactions()); - - m_tab3->findChild("m_checkHideSplitDetails")->setChecked + m_tabRowColQuery->ui->m_checkNumber->setChecked(qc & MyMoneyReport::eQCnumber); + m_tabRowColQuery->ui->m_checkPayee->setChecked(qc & MyMoneyReport::eQCpayee); + m_tabRowColQuery->ui->m_checkTag->setChecked(qc & MyMoneyReport::eQCtag); + m_tabRowColQuery->ui->m_checkCategory->setChecked(qc & MyMoneyReport::eQCcategory); + m_tabRowColQuery->ui->m_checkMemo->setChecked(qc & MyMoneyReport::eQCmemo); + m_tabRowColQuery->ui->m_checkAccount->setChecked(qc & MyMoneyReport::eQCaccount); + m_tabRowColQuery->ui->m_checkReconciled->setChecked(qc & MyMoneyReport::eQCreconciled); + m_tabRowColQuery->ui->m_checkAction->setChecked(qc & MyMoneyReport::eQCaction); + m_tabRowColQuery->ui->m_checkShares->setChecked(qc & MyMoneyReport::eQCshares); + m_tabRowColQuery->ui->m_checkPrice->setChecked(qc & MyMoneyReport::eQCprice); + m_tabRowColQuery->ui->m_checkBalance->setChecked(qc & MyMoneyReport::eQCbalance); + + m_tabRowColQuery->ui->m_checkTax->setChecked(m_initialState.isTax()); + m_tabRowColQuery->ui->m_checkInvestments->setChecked(m_initialState.isInvestmentsOnly()); + m_tabRowColQuery->ui->m_checkLoans->setChecked(m_initialState.isLoansOnly()); + + m_tabRowColQuery->ui->m_checkHideTransactions->setChecked(m_initialState.isHideTransactions()); + m_tabRowColQuery->ui->m_checkHideSplitDetails->setEnabled(!m_initialState.isHideTransactions()); + + m_tabRowColQuery->ui->m_checkHideSplitDetails->setChecked (m_initialState.detailLevel() == MyMoneyReport::eDetailNone || m_initialState.isHideTransactions()); } if (m_tabChart) { - KMyMoneyGeneralCombo* combo = m_tabChart->findChild("m_comboType"); + KMyMoneyGeneralCombo* combo = m_tabChart->ui->m_comboType; switch (m_initialState.chartType()) { case MyMoneyReport::eChartNone: combo->setCurrentItem(MyMoneyReport::eChartLine); @@ -464,12 +465,12 @@ case MyMoneyReport::eChartEnd: throw MYMONEYEXCEPTION("KReportConfigurationFilterDlg::slotReset(): Report has invalid charttype"); } - m_tabChart->findChild("m_checkCHGridLines")->setChecked(m_initialState.isChartCHGridLines()); - m_tabChart->findChild("m_checkSVGridLines")->setChecked(m_initialState.isChartSVGridLines()); - m_tabChart->findChild("m_checkValues")->setChecked(m_initialState.isChartDataLabels()); - m_tabChart->findChild("m_checkShowChart")->setChecked(m_initialState.isChartByDefault()); - m_tabChart->findChild("m_lineWidth")->setValue(m_initialState.chartLineWidth()); - m_tabChart->findChild("m_logYaxis")->setChecked(m_initialState.isLogYAxis()); + m_tabChart->ui->m_checkCHGridLines->setChecked(m_initialState.isChartCHGridLines()); + m_tabChart->ui->m_checkSVGridLines->setChecked(m_initialState.isChartSVGridLines()); + m_tabChart->ui->m_checkValues->setChecked(m_initialState.isChartDataLabels()); + m_tabChart->ui->m_checkShowChart->setChecked(m_initialState.isChartByDefault()); + m_tabChart->ui->m_lineWidth->setValue(m_initialState.chartLineWidth()); + m_tabChart->ui->m_logYaxis->setChecked(m_initialState.isLogYAxis()); } if (m_tabRange) { @@ -706,7 +707,7 @@ //TODO Fix the reports and engine to include transfers even if categories are filtered - bug #1523508 void KReportConfigurationFilterDlg::slotUpdateCheckTransfers() { - QCheckBox* cb = m_tab2->findChild("m_checkTransfers"); + QCheckBox* cb = m_tabRowColPivot->ui->m_checkTransfers; if (!m_ui->m_categoriesView->allItemsSelected()) { cb->setChecked(false); cb->setDisabled(true); diff --git a/kmymoney/views/kreportsview.h b/kmymoney/views/kreportsview.h --- a/kmymoney/views/kreportsview.h +++ b/kmymoney/views/kreportsview.h @@ -51,7 +51,7 @@ #include #include "pivottable.h" #include "querytable.h" -#include "../widgets/kmymoneyreportcontrolimpl.h" +#include "../widgets/reportcontrolimpl.h" #include "kreportchartview.h" #include "kmymoneyview.h" @@ -86,7 +86,7 @@ private: KHTMLPart* m_part; reports::KReportChartView* m_chartView; - kMyMoneyReportControl* m_control; + ReportControl* m_control; QVBoxLayout* m_layout; MyMoneyReport m_report; bool m_deleteMe; @@ -116,7 +116,7 @@ void saveAs(const QString& filename, bool includeCSS = false); void updateReport(); QString createTable(const QString& links = QString()); - const kMyMoneyReportControlDecl* control() const { + const ReportControl* control() const { return m_control; } bool isReadyToDelete() const { diff --git a/kmymoney/views/kreportsview.cpp b/kmymoney/views/kreportsview.cpp --- a/kmymoney/views/kreportsview.cpp +++ b/kmymoney/views/kreportsview.cpp @@ -76,7 +76,7 @@ QWidget(parent), m_part(new KHTMLPart(this)), m_chartView(new KReportChartView(this)), - m_control(new kMyMoneyReportControl(this)), + m_control(new ReportControl(this)), m_layout(new QVBoxLayout(this)), m_report(report), m_deleteMe(false), @@ -89,21 +89,21 @@ m_part->setFontScaleFactor(KMyMoneyGlobalSettings::fontSizePercentage()); //set button icons - m_control->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), + m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), QIcon::fromTheme(QStringLiteral("report-line")))); if (QIcon::hasThemeIcon(QStringLiteral("document-close"))) - m_control->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("document-close"))); + m_control->ui->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("document-close"))); else - m_control->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("stop"))); - m_control->buttonConfigure->setIcon(QIcon::fromTheme(QStringLiteral("configure"), + m_control->ui->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("stop"))); + m_control->ui->buttonConfigure->setIcon(QIcon::fromTheme(QStringLiteral("configure"), QIcon::fromTheme(QStringLiteral("preferences-system")))); - m_control->buttonCopy->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy"))); - m_control->buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); + m_control->ui->buttonCopy->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy"))); + m_control->ui->buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); if (QIcon::hasThemeIcon(QStringLiteral("document-export"))) - m_control->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("document-export"))); + m_control->ui->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("document-export"))); else - m_control->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("format-indent-more"))); - m_control->buttonNew->setIcon(QIcon::fromTheme(QStringLiteral("document-new"))); + m_control->ui->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("format-indent-more"))); + m_control->ui->buttonNew->setIcon(QIcon::fromTheme(QStringLiteral("document-new"))); m_chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_chartView->hide(); @@ -207,7 +207,7 @@ m_part->end(); m_table->drawChart(*m_chartView); - m_control->buttonChart->setEnabled(m_chartEnabled); + m_control->ui->buttonChart->setEnabled(m_chartEnabled); if (m_report.isChartByDefault() && !m_showingChart) toggleChart(); @@ -221,18 +221,18 @@ m_part->view()->show(); m_chartView->hide(); - m_control->buttonChart->setText(i18n("Chart")); - m_control->buttonChart->setToolTip(i18n("Show the chart version of this report")); - m_control->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), + m_control->ui->buttonChart->setText(i18n("Chart")); + m_control->ui->buttonChart->setToolTip(i18n("Show the chart version of this report")); + m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), QIcon::fromTheme(QStringLiteral("report-line")))); } else { m_part->view()->hide(); m_chartView->show(); - m_control->buttonChart->setText(i18n("Report")); - m_control->buttonChart->setToolTip(i18n("Show the report version of this chart")); - m_control->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("view-financial-list"), + m_control->ui->buttonChart->setText(i18n("Report")); + m_control->ui->buttonChart->setToolTip(i18n("Show the report version of this chart")); + m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("view-financial-list"), QIcon::fromTheme(QStringLiteral("ledger")))); } m_showingChart = ! m_showingChart; @@ -990,25 +990,25 @@ { KReportTab* tab = new KReportTab(m_reportTabWidget, report); - connect(tab->control()->buttonChart, SIGNAL(clicked()), + connect(tab->control()->ui->buttonChart, SIGNAL(clicked()), this, SLOT(slotToggleChart())); - connect(tab->control()->buttonConfigure, SIGNAL(clicked()), + connect(tab->control()->ui->buttonConfigure, SIGNAL(clicked()), this, SLOT(slotConfigure())); - connect(tab->control()->buttonNew, SIGNAL(clicked()), + connect(tab->control()->ui->buttonNew, SIGNAL(clicked()), this, SLOT(slotDuplicate())); - connect(tab->control()->buttonCopy, SIGNAL(clicked()), + connect(tab->control()->ui->buttonCopy, SIGNAL(clicked()), this, SLOT(slotCopyView())); - connect(tab->control()->buttonExport, SIGNAL(clicked()), + connect(tab->control()->ui->buttonExport, SIGNAL(clicked()), this, SLOT(slotSaveView())); - connect(tab->control()->buttonDelete, SIGNAL(clicked()), + connect(tab->control()->ui->buttonDelete, SIGNAL(clicked()), this, SLOT(slotDelete())); - connect(tab->control()->buttonClose, SIGNAL(clicked()), + connect(tab->control()->ui->buttonClose, SIGNAL(clicked()), this, SLOT(slotCloseCurrent())); connect(tab->browserExtenstion(), SIGNAL(openUrlRequest(const QUrl &, const KParts::OpenUrlArguments &, const KParts::BrowserArguments &)), @@ -1016,7 +1016,7 @@ // if this is a default report, then you can't delete it! if (report.id().isEmpty()) - tab->control()->buttonDelete->setEnabled(false); + tab->control()->ui->buttonDelete->setEnabled(false); m_reportTabWidget->setCurrentIndex(m_reportTabWidget->indexOf(tab)); } diff --git a/kmymoney/widgets/CMakeLists.txt b/kmymoney/widgets/CMakeLists.txt --- a/kmymoney/widgets/CMakeLists.txt +++ b/kmymoney/widgets/CMakeLists.txt @@ -12,7 +12,7 @@ scheduledtransaction.h selectedtransaction.h stdtransactiondownloaded.h stdtransactionmatched.h transactioneditorcontainer.h transactionform.h transaction.h transactionsortoptionimpl.h - kmymoneyreportconfigtabimpl.h kmymoneyreportcontrolimpl.h + reporttabimpl.h reportcontrolimpl.h kmymoneyvalidationfeedback.h onlinejobmessagesview.h kmymoneydateedit.h @@ -162,15 +162,15 @@ kmymoneybriefschedule.cpp registersearchline.cpp transactioneditorcontainer.cpp - kmymoneyreportconfigtabimpl.cpp - kmymoneyreportcontrolimpl.cpp + reporttabimpl.cpp + reportcontrolimpl.cpp ) set(libwidgets_a_UI - kschedulebriefwidget.ui kmymoneyreportcontroldecl.ui - kmymoneyreportconfigtab1decl.ui kmymoneyreportconfigtab2decl.ui - kmymoneyreportconfigtab3decl.ui kmymoneyreportconfigtabchartdecl.ui - kmymoneyreportconfigtabrangedecl.ui + kschedulebriefwidget.ui reportcontrol.ui + reporttabgeneral.ui + reporttabrowcolquery.ui reporttabrowcolpivot.ui + reporttabrange.ui reporttabchart.ui ../dialogs/daterangedlgdecl.ui ) diff --git a/kmymoney/widgets/kmymoneyreportconfigtab1decl.ui b/kmymoney/widgets/kmymoneyreportconfigtab1decl.ui deleted file mode 100644 --- a/kmymoney/widgets/kmymoneyreportconfigtab1decl.ui +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - kMyMoneyReportConfigTab1Decl - - - - 0 - 0 - 600 - 172 - - - - Report Tab - - - - - - <p>On this tab, you set the basic properties of this report.</p> - - - - - - - - Report Name - - - false - - - - - - - <p>Choose a name for this report.</p> - - - - - - - - - - - Comment - - - false - - - - - - - <p>Enter a comment to help you remember the details of this report.</p> - - - - - - - - - Convert values to base currency - - - <p>Select this option to convert all values in the report to your base currency.</p><p>Leave it unchecked if you would like to see values in their original currency.</p><p>If currencies are not converted, then subtotals will not be shown.</p> - - - - - - - Mark as a favorite report - - - <p>Select this option to notate this report as one of your favorites.</p><p>All your favorite reports are grouped in one place on the report list for easy access.</p> - - - - - - - Skip value if price is zero - - - - <p> - This option is for investments reports only which - show prices instead of balances as all other reports do. - </p> - <p> - Select this option to include prices only if there is an actual price for the date. - If not, 0 will be shown. In the graph, the value will be skipped. - </p> - <p> - If this option is off the last existing price is shown for a period, if - it is on, in a table the value is '0' shown and in a chart a linear - interpolation for the missing values will be performed. - <br>Example: - <br>There are prices for January and March, but there is no price for - February. - <ul> - <li><b>OFF</b>: shows the price for February as the last price of - January - <li><b>ON</b>: in a table the value is '0', in a chart a linear - interpolation for the February-price will be performed - (so it makes a kind of average-value using the January- and the - March-price in the chart) - </ul> - </p> - - - - - - - - - 20 - 20 - - - - QSizePolicy::Expanding - - - Qt::Vertical - - - - - - - - - KLineEdit - QLineEdit -
klineedit.h
-
-
-
diff --git a/kmymoney/widgets/kmymoneyreportcontroldecl.ui b/kmymoney/widgets/kmymoneyreportcontroldecl.ui deleted file mode 100644 --- a/kmymoney/widgets/kmymoneyreportcontroldecl.ui +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - kMyMoneyReportControlDecl - - - - 0 - 0 - 600 - 33 - - - - ReportControl - - - - 1 - - - 1 - - - - - - 75 - 0 - - - - Chart - - - Show the chart version of this report - - - - - - - - 75 - 0 - - - - Configure - - - Configure this report - - - - - - - - 75 - 0 - - - - New - - - Create a new report based on this one - - - - - - - - 75 - 0 - - - - Copy - - - Copy this report to the clipboard - - - - - - - - 75 - 0 - - - - &Export - - - Export this report as an HTML or CSV file - - - - - - - - 75 - 0 - - - - Delete - - - Permanently delete this report - - - - - - - - 75 - 0 - - - - Close - - - Close this window - - - - - - - diff --git a/kmymoney/widgets/reportcontrol.ui b/kmymoney/widgets/reportcontrol.ui new file mode 100644 --- /dev/null +++ b/kmymoney/widgets/reportcontrol.ui @@ -0,0 +1,149 @@ + + + ReportControl + + + + 0 + 0 + 600 + 36 + + + + ReportControl + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 75 + 0 + + + + Show the chart version of this report + + + Chart + + + + + + + + 75 + 0 + + + + Configure this report + + + Configure + + + + + + + + 75 + 0 + + + + Create a new report based on this one + + + New + + + + + + + + 75 + 0 + + + + Copy this report to the clipboard + + + Copy + + + + + + + + 75 + 0 + + + + Export this report as an HTML or CSV file + + + &Export + + + + + + + + 75 + 0 + + + + Permanently delete this report + + + Delete + + + + + + + + 75 + 0 + + + + Close this window + + + Close + + + + + + + + + diff --git a/kmymoney/widgets/kmymoneyreportcontrolimpl.h b/kmymoney/widgets/reportcontrolimpl.h rename from kmymoney/widgets/kmymoneyreportcontrolimpl.h rename to kmymoney/widgets/reportcontrolimpl.h --- a/kmymoney/widgets/kmymoneyreportcontrolimpl.h +++ b/kmymoney/widgets/reportcontrolimpl.h @@ -17,24 +17,16 @@ Boston, MA 02110-1301, USA. */ -#ifndef KMYMONEYREPORTCONTROLIMPL_H -#define KMYMONEYREPORTCONTROLIMPL_H +#ifndef REPORTCONTROLIMPL_H +#define REPORTCONTROLIMPL_H -#include "ui_kmymoneyreportcontroldecl.h" +#include "ui_reportcontrol.h" -class kMyMoneyReportControlDecl : public QWidget, public Ui::kMyMoneyReportControlDecl -{ -public: - kMyMoneyReportControlDecl(QWidget *parent) : QWidget(parent) { - setupUi(this); - } -}; - -class kMyMoneyReportControl : public kMyMoneyReportControlDecl +class ReportControl : public QWidget { Q_OBJECT public: - kMyMoneyReportControl(QWidget *parent); - + ReportControl(QWidget *parent); + Ui::ReportControl* ui; }; -#endif /* KMYMONEYREPORTCONTROLIMPL_H */ +#endif /* REPORTCONTROLIMPL_H */ diff --git a/kmymoney/widgets/kmymoneyreportcontrolimpl.cpp b/kmymoney/widgets/reportcontrolimpl.cpp rename from kmymoney/widgets/kmymoneyreportcontrolimpl.cpp rename to kmymoney/widgets/reportcontrolimpl.cpp --- a/kmymoney/widgets/kmymoneyreportcontrolimpl.cpp +++ b/kmymoney/widgets/reportcontrolimpl.cpp @@ -17,13 +17,14 @@ Boston, MA 02110-1301, USA. */ -#include "kmymoneyreportcontrolimpl.h" +#include "reportcontrolimpl.h" +#include "ui_reportcontrol.h" - -kMyMoneyReportControl::kMyMoneyReportControl(QWidget *parent) - : kMyMoneyReportControlDecl(parent) +ReportControl::ReportControl(QWidget *parent) + : QWidget(parent) { - + ui = new Ui::ReportControl; + ui->setupUi(this); } diff --git a/kmymoney/widgets/kmymoneyreportconfigtabchartdecl.ui b/kmymoney/widgets/reporttabchart.ui rename from kmymoney/widgets/kmymoneyreportconfigtabchartdecl.ui rename to kmymoney/widgets/reporttabchart.ui --- a/kmymoney/widgets/kmymoneyreportconfigtabchartdecl.ui +++ b/kmymoney/widgets/reporttabchart.ui @@ -1,7 +1,7 @@ - kMyMoneyReportConfigTabChartDecl - + ReportTabChart + 0 diff --git a/kmymoney/widgets/reporttabgeneral.ui b/kmymoney/widgets/reporttabgeneral.ui new file mode 100644 --- /dev/null +++ b/kmymoney/widgets/reporttabgeneral.ui @@ -0,0 +1,148 @@ + + + ReportTabGeneral + + + + 0 + 0 + 600 + 176 + + + + Report Tab + + + + + + <p>On this tab, you set the basic properties of this report.</p> + + + + + + + + Report Name + + + false + + + + + + + <p>Choose a name for this report.</p> + + + + + + + + + + + Comment + + + false + + + + + + + <p>Enter a comment to help you remember the details of this report.</p> + + + + + + + + + <p>Select this option to convert all values in the report to your base currency.</p><p>Leave it unchecked if you would like to see values in their original currency.</p><p>If currencies are not converted, then subtotals will not be shown.</p> + + + Convert values to base currency + + + + + + + <p>Select this option to notate this report as one of your favorites.</p><p>All your favorite reports are grouped in one place on the report list for easy access.</p> + + + Mark as a favorite report + + + + + + + + <p> + This option is for investments reports only which + show prices instead of balances as all other reports do. + </p> + <p> + Select this option to include prices only if there is an actual price for the date. + If not, 0 will be shown. In the graph, the value will be skipped. + </p> + <p> + If this option is off the last existing price is shown for a period, if + it is on, in a table the value is '0' shown and in a chart a linear + interpolation for the missing values will be performed. + <br>Example: + <br>There are prices for January and March, but there is no price for + February. + <ul> + <li><b>OFF</b>: shows the price for February as the last price of + January + <li><b>ON</b>: in a table the value is '0', in a chart a linear + interpolation for the February-price will be performed + (so it makes a kind of average-value using the January- and the + March-price in the chart) + </ul> + </p> + + + + Skip value if price is zero + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + KLineEdit + QLineEdit +
klineedit.h
+
+
+ + +
diff --git a/kmymoney/widgets/kmymoneyreportconfigtabimpl.h b/kmymoney/widgets/reporttabimpl.h rename from kmymoney/widgets/kmymoneyreportconfigtabimpl.h rename to kmymoney/widgets/reporttabimpl.h --- a/kmymoney/widgets/kmymoneyreportconfigtabimpl.h +++ b/kmymoney/widgets/reporttabimpl.h @@ -17,8 +17,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef KMYMONEYREPORTCONFIGTABIMPL_H -#define KMYMONEYREPORTCONFIGTABIMPL_H +#ifndef REPORTTABIMPL_H +#define REPORTTABIMPL_H #include #include @@ -27,61 +27,58 @@ namespace Ui { -class kMyMoneyReportConfigTab1Decl; -class kMyMoneyReportConfigTab2Decl; -class kMyMoneyReportConfigTab3Decl; -class kMyMoneyReportConfigTabChartDecl; -class kMyMoneyReportConfigTabRangeDecl; +class ReportTabGeneral; +class ReportTabRowColPivot; +class ReportTabRowColQuery; +class ReportTabChart; +class ReportTabRange; } -class kMyMoneyReportConfigTab1Decl : public QWidget +class ReportTabGeneral : public QWidget { public: - kMyMoneyReportConfigTab1Decl(QWidget *parent); - virtual ~kMyMoneyReportConfigTab1Decl(); -private: - Ui::kMyMoneyReportConfigTab1Decl* ui; + ReportTabGeneral(QWidget *parent); + virtual ~ReportTabGeneral(); + Ui::ReportTabGeneral* ui; }; -class kMyMoneyReportConfigTab2Decl : public QWidget +class ReportTabRowColPivot : public QWidget { public: - kMyMoneyReportConfigTab2Decl(QWidget *parent); - virtual ~kMyMoneyReportConfigTab2Decl(); -private: - Ui::kMyMoneyReportConfigTab2Decl* ui; + ReportTabRowColPivot(QWidget *parent); + virtual ~ReportTabRowColPivot(); + Ui::ReportTabRowColPivot* ui; }; -class kMyMoneyReportConfigTab3Decl : public QWidget +class ReportTabRowColQuery : public QWidget { Q_OBJECT public: - kMyMoneyReportConfigTab3Decl(QWidget *parent); - virtual ~kMyMoneyReportConfigTab3Decl(); -private: - Ui::kMyMoneyReportConfigTab3Decl* ui; + ReportTabRowColQuery(QWidget *parent); + virtual ~ReportTabRowColQuery(); + Ui::ReportTabRowColQuery* ui; private slots: void slotHideTransactionsChanged(bool checked); }; -class kMyMoneyReportConfigTabChartDecl : public QWidget +class ReportTabChart : public QWidget { Q_OBJECT public: - kMyMoneyReportConfigTabChartDecl(QWidget *parent); - virtual ~kMyMoneyReportConfigTabChartDecl(); - Ui::kMyMoneyReportConfigTabChartDecl* ui; + ReportTabChart(QWidget *parent); + virtual ~ReportTabChart(); + Ui::ReportTabChart* ui; private slots: void slotChartTypeChanged(int index); }; -class kMyMoneyReportConfigTabRangeDecl : public QWidget +class ReportTabRange : public QWidget { Q_OBJECT public: - kMyMoneyReportConfigTabRangeDecl(QWidget *parent); - virtual ~kMyMoneyReportConfigTabRangeDecl(); - Ui::kMyMoneyReportConfigTabRangeDecl* ui; + ReportTabRange(QWidget *parent); + virtual ~ReportTabRange(); + Ui::ReportTabRange* ui; DateRangeDlg *m_dateRange; void setRangeLogarythmic(bool set); private: @@ -131,5 +128,5 @@ } } }; -#endif /* KMYMONEYREPORTCONFIGTABIMPL_H */ +#endif /* REPORTTABIMPL_H */ diff --git a/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp b/kmymoney/widgets/reporttabimpl.cpp rename from kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp rename to kmymoney/widgets/reporttabimpl.cpp --- a/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp +++ b/kmymoney/widgets/reporttabimpl.cpp @@ -17,49 +17,49 @@ Boston, MA 02110-1301, USA. */ -#include "kmymoneyreportconfigtabimpl.h" +#include "reporttabimpl.h" #include "kmymoneyglobalsettings.h" #include #include -#include "ui_kmymoneyreportconfigtab1decl.h" -#include "ui_kmymoneyreportconfigtab2decl.h" -#include "ui_kmymoneyreportconfigtab3decl.h" -#include "ui_kmymoneyreportconfigtabchartdecl.h" -#include "ui_kmymoneyreportconfigtabrangedecl.h" +#include "ui_reporttabgeneral.h" +#include "ui_reporttabrowcolpivot.h" +#include "ui_reporttabrowcolquery.h" +#include "ui_reporttabchart.h" +#include "ui_reporttabrange.h" #include #include "mymoney/mymoneyreport.h" -kMyMoneyReportConfigTab1Decl::kMyMoneyReportConfigTab1Decl(QWidget *parent) +ReportTabGeneral::ReportTabGeneral(QWidget *parent) : QWidget(parent) { - ui = new Ui::kMyMoneyReportConfigTab1Decl; + ui = new Ui::ReportTabGeneral; ui->setupUi(this); } -kMyMoneyReportConfigTab1Decl::~kMyMoneyReportConfigTab1Decl() +ReportTabGeneral::~ReportTabGeneral() { delete ui; } -kMyMoneyReportConfigTab2Decl::kMyMoneyReportConfigTab2Decl(QWidget *parent) +ReportTabRowColPivot::ReportTabRowColPivot(QWidget *parent) : QWidget(parent) { - ui = new Ui::kMyMoneyReportConfigTab2Decl; + ui = new Ui::ReportTabRowColPivot; ui->setupUi(this); } -kMyMoneyReportConfigTab2Decl::~kMyMoneyReportConfigTab2Decl() +ReportTabRowColPivot::~ReportTabRowColPivot() { delete ui; } -kMyMoneyReportConfigTab3Decl::kMyMoneyReportConfigTab3Decl(QWidget *parent) +ReportTabRowColQuery::ReportTabRowColQuery(QWidget *parent) : QWidget(parent) { - ui = new Ui::kMyMoneyReportConfigTab3Decl; + ui = new Ui::ReportTabRowColQuery; ui->setupUi(this); ui->buttonGroup1->setExclusive(false); ui->buttonGroup1->setId(ui->m_checkMemo, 0); @@ -75,22 +75,22 @@ connect(ui->m_checkHideTransactions, SIGNAL(toggled(bool)), this, SLOT(slotHideTransactionsChanged(bool))); } -void kMyMoneyReportConfigTab3Decl::slotHideTransactionsChanged(bool checked) +void ReportTabRowColQuery::slotHideTransactionsChanged(bool checked) { if (checked) // toggle m_checkHideSplitDetails only if it's mandatory ui->m_checkHideSplitDetails->setChecked(checked); ui->m_checkHideSplitDetails->setEnabled(!checked); // hiding transactions without hiding splits isn't allowed } -kMyMoneyReportConfigTab3Decl::~kMyMoneyReportConfigTab3Decl() +ReportTabRowColQuery::~ReportTabRowColQuery() { delete ui; } -kMyMoneyReportConfigTabChartDecl::kMyMoneyReportConfigTabChartDecl(QWidget *parent) +ReportTabChart::ReportTabChart(QWidget *parent) : QWidget(parent) { - ui = new Ui::kMyMoneyReportConfigTabChartDecl; + ui = new Ui::ReportTabChart; ui->setupUi(this); ui->m_comboType->addItem(i18nc("type of graphic chart", "Line"), MyMoneyReport::eChartLine); @@ -102,12 +102,12 @@ emit ui->m_comboType->currentIndexChanged(ui->m_comboType->currentIndex()); } -kMyMoneyReportConfigTabChartDecl::~kMyMoneyReportConfigTabChartDecl() +ReportTabChart::~ReportTabChart() { delete ui; } -void kMyMoneyReportConfigTabChartDecl::slotChartTypeChanged(int index) +void ReportTabChart::slotChartTypeChanged(int index) { if (index == MyMoneyReport::EChartType::eChartPie || index == MyMoneyReport::EChartType::eChartRing) { @@ -122,10 +122,10 @@ } } -kMyMoneyReportConfigTabRangeDecl::kMyMoneyReportConfigTabRangeDecl(QWidget *parent) +ReportTabRange::ReportTabRange(QWidget *parent) : QWidget(parent) { - ui = new Ui::kMyMoneyReportConfigTabRangeDecl; + ui = new Ui::ReportTabRange; ui->setupUi(this); m_dateRange = new DateRangeDlg(this->parentWidget()); ui->dateRangeGrid->addWidget(m_dateRange, 0, 0, 1, 2); @@ -139,12 +139,12 @@ emit ui->m_dataLock->currentIndexChanged(ui->m_dataLock->currentIndex()); } -kMyMoneyReportConfigTabRangeDecl::~kMyMoneyReportConfigTabRangeDecl() +ReportTabRange::~ReportTabRange() { delete ui; } -void kMyMoneyReportConfigTabRangeDecl::setRangeLogarythmic(bool set) +void ReportTabRange::setRangeLogarythmic(bool set) { // major and minor tick have no influence if axis is logarithmic so hide them if (set) { @@ -160,7 +160,7 @@ } } -void kMyMoneyReportConfigTabRangeDecl::slotEditingFinished(EDimension dim) +void ReportTabRange::slotEditingFinished(EDimension dim) { qreal dataRangeStart = locale().toDouble(ui->m_dataRangeStart->text()); qreal dataRangeEnd = locale().toDouble(ui->m_dataRangeEnd->text()); @@ -203,27 +203,27 @@ } } -void kMyMoneyReportConfigTabRangeDecl::slotEditingFinishedStart() +void ReportTabRange::slotEditingFinishedStart() { slotEditingFinished(eRangeStart); } -void kMyMoneyReportConfigTabRangeDecl::slotEditingFinishedEnd() +void ReportTabRange::slotEditingFinishedEnd() { slotEditingFinished(eRangeEnd); } -void kMyMoneyReportConfigTabRangeDecl::slotEditingFinishedMajor() +void ReportTabRange::slotEditingFinishedMajor() { slotEditingFinished(eMajorTick); } -void kMyMoneyReportConfigTabRangeDecl::slotEditingFinishedMinor() +void ReportTabRange::slotEditingFinishedMinor() { slotEditingFinished(eMinorTick); } -void kMyMoneyReportConfigTabRangeDecl::slotYLabelsPrecisionChanged(const int& value) +void ReportTabRange::slotYLabelsPrecisionChanged(const int& value) { ui->m_dataRangeStart->setValidator(0); ui->m_dataRangeEnd->setValidator(0); @@ -238,7 +238,7 @@ ui->m_dataMinorTick->setValidator(dblVal2); } -void kMyMoneyReportConfigTabRangeDecl::slotDataLockChanged(int index) { +void ReportTabRange::slotDataLockChanged(int index) { if (index == MyMoneyReport::dataOptionE::automatic) { ui->m_dataRangeStart->setText(QStringLiteral("0")); ui->m_dataRangeEnd->setText(QStringLiteral("0")); diff --git a/kmymoney/widgets/kmymoneyreportconfigtabrangedecl.ui b/kmymoney/widgets/reporttabrange.ui rename from kmymoney/widgets/kmymoneyreportconfigtabrangedecl.ui rename to kmymoney/widgets/reporttabrange.ui --- a/kmymoney/widgets/kmymoneyreportconfigtabrangedecl.ui +++ b/kmymoney/widgets/reporttabrange.ui @@ -1,13 +1,13 @@ - kMyMoneyReportConfigTabRangeDecl - + ReportTabRange + 0 0 600 - 250 + 288 diff --git a/kmymoney/widgets/kmymoneyreportconfigtab2decl.ui b/kmymoney/widgets/reporttabrowcolpivot.ui rename from kmymoney/widgets/kmymoneyreportconfigtab2decl.ui rename to kmymoney/widgets/reporttabrowcolpivot.ui --- a/kmymoney/widgets/kmymoneyreportconfigtab2decl.ui +++ b/kmymoney/widgets/reporttabrowcolpivot.ui @@ -1,6 +1,7 @@ + - kMyMoneyReportConfigTab2Decl - + ReportTabRowColPivot + 0 @@ -39,16 +40,16 @@ <p>Choose what kind of accounts to display as the rows of this report.</p> - + Income & Expenses - + - + Assets & Liabilities - + - + @@ -101,9 +102,9 @@ - + Top-Level - + @@ -115,7 +116,7 @@ Totals - + @@ -134,13 +135,13 @@
0 - + 0 - + 0 - + @@ -175,7 +176,7 @@ - + @@ -223,12 +224,12 @@ QComboBox
kcombobox.h
- - KMyMoneyGeneralCombo - QWidget -
kmymoneymvccombo.h
- 1 -
+ + KMyMoneyGeneralCombo + QWidget +
kmymoneymvccombo.h
+ 1 +
diff --git a/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui b/kmymoney/widgets/reporttabrowcolquery.ui rename from kmymoney/widgets/kmymoneyreportconfigtab3decl.ui rename to kmymoney/widgets/reporttabrowcolquery.ui --- a/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui +++ b/kmymoney/widgets/reporttabrowcolquery.ui @@ -1,7 +1,7 @@ - kMyMoneyReportConfigTab3Decl - + ReportTabRowColQuery + 0