[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmymoney] kmymoney: Add hide transactions for reports
From: Łukasz_Wojniłowicz <null () kde ! org>
Date: 2017-04-01 6:19:03
Message-ID: E1cuCNL-0003Wy-Ej () code ! kde ! org
[Download RAW message or body]
Git commit 2e591fa1e8f8ad4b3c92fc3892a15606df7dad98 by Łukasz Wojniłowicz.
Committed on 01/04/2017 at 06:16.
Pushed by wojnilowicz into branch 'master'.
Add hide transactions for reports
BUG:344172
FIXED-IN:5.0
Differential Revision: https://phabricator.kde.org/D5228
Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
M +5 -1 kmymoney/dialogs/kreportconfigurationfilterdlg.cpp
M +5 -0 kmymoney/html/kmymoney.css
M +5 -2 kmymoney/mymoney/mymoneyreport.cpp
M +10 -0 kmymoney/mymoney/mymoneyreport.h
M +42 -29 kmymoney/reports/listtable.cpp
M +514 -454 kmymoney/widgets/kmymoneyreportconfigtab3decl.ui
M +8 -0 kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp
M +3 -0 kmymoney/widgets/kmymoneyreportconfigtabimpl.h
https://commits.kde.org/kmymoney/2e591fa1e8f8ad4b3c92fc3892a15606df7dad98
diff --git a/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp \
b/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp index 2b4e7004..5a7ba120 100644
--- a/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp
+++ b/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp
@@ -242,6 +242,7 @@ void KReportConfigurationFilterDlg::slotSearch()
m_currentState.setDetailLevel(m_tab3->findChild<QCheckBox*>("m_checkHideSplitDetails")->isChecked() \
?
MyMoneyReport::eDetailNone : \
MyMoneyReport::eDetailAll); + \
m_currentState.setHideTransactions(m_tab3->findChild<QCheckBox*>("m_checkHideTransactions")->isChecked());
}
if (m_tabChart) {
@@ -439,8 +440,11 @@ void KReportConfigurationFilterDlg::slotReset()
m_tab3->findChild<QCheckBox*>("m_checkInvestments")->setChecked(m_initialState.isInvestmentsOnly());
m_tab3->findChild<QCheckBox*>("m_checkLoans")->setChecked(m_initialState.isLoansOnly());
+ m_tab3->findChild<QCheckBox*>("m_checkHideTransactions")->setChecked(m_initialState.isHideTransactions());
+ m_tab3->findChild<QCheckBox*>("m_checkHideSplitDetails")->setEnabled(!m_initialState.isHideTransactions());
+
m_tab3->findChild<QCheckBox*>("m_checkHideSplitDetails")->setChecked
- (m_initialState.detailLevel() == MyMoneyReport::eDetailNone);
+ (m_initialState.detailLevel() == MyMoneyReport::eDetailNone || \
m_initialState.isHideTransactions()); }
if (m_tabChart) {
diff --git a/kmymoney/html/kmymoney.css b/kmymoney/html/kmymoney.css
index ab63d532..9ef96b0e 100644
--- a/kmymoney/html/kmymoney.css
+++ b/kmymoney/html/kmymoney.css
@@ -216,6 +216,11 @@ table.report tr#topparent td.left {/*parent label for each row \
group containing color:WindowText;
}
+ table.report tr.sectionfooterbasic td { /* totals for without top border */
+ padding: 0 0.5em 0.5em 0.5em;
+ color:WindowText;
+ }
+
table.report tr.sectionfooter td { /* totals for each section -subtotals */
border-top: 1px solid black;
padding: 0 0.5em 0.5em 0.5em;
diff --git a/kmymoney/mymoney/mymoneyreport.cpp b/kmymoney/mymoney/mymoneyreport.cpp
index 0fc1b04e..204fa715 100644
--- a/kmymoney/mymoney/mymoneyreport.cpp
+++ b/kmymoney/mymoney/mymoneyreport.cpp
@@ -57,6 +57,7 @@ MyMoneyReport::MyMoneyReport() :
m_tax(false),
m_investments(false),
m_loans(false),
+ m_hideTransactions(false),
m_reportType(kTypeArray[eExpenseIncome]),
m_rowType(eExpenseIncome),
m_columnType(eMonths),
@@ -106,6 +107,7 @@ MyMoneyReport::MyMoneyReport(ERowType _rt, unsigned _ct, \
dateOptionE _dl, EDetai m_tax(false),
m_investments(false),
m_loans(false),
+ m_hideTransactions(false),
m_reportType(kTypeArray[_rt]),
m_rowType(_rt),
m_columnsAreDays(false),
@@ -347,6 +349,7 @@ void MyMoneyReport::write(QDomElement& e, QDomDocument *doc, bool \
anonymous) con e.setAttribute("tax", m_tax);
e.setAttribute("investments", m_investments);
e.setAttribute("loans", m_loans);
+ e.setAttribute("hidetransactions", m_hideTransactions);
e.setAttribute("rowtype", kRowTypeText[m_rowType]);
e.setAttribute("datelock", kDateLockText[m_dateLock]);
e.setAttribute("datalock", kDataLockText[m_dataLock]);
@@ -383,10 +386,10 @@ void MyMoneyReport::write(QDomElement& e, QDomDocument *doc, \
bool anonymous) con e.setAttribute("dataMinorTick", m_dataMinorTick);
e.setAttribute("dataLock", m_dataLock);
e.setAttribute("skipZero", m_skipZero);
+ e.setAttribute("detail", kDetailLevelText[m_detailLevel]);
if (m_reportType == ePivotTable) {
e.setAttribute("type", "pivottable 1.15");
- e.setAttribute("detail", kDetailLevelText[m_detailLevel]);
e.setAttribute("columntype", kColumnTypeText[m_columnType]);
e.setAttribute("showrowtotals", m_showRowTotals);
} else if (m_reportType == eQueryTable) {
@@ -405,7 +408,6 @@ void MyMoneyReport::write(QDomElement& e, QDomDocument *doc, bool \
anonymous) con e.setAttribute("querycolumns", columns.join(","));
} else if (m_reportType == eInfoTable) {
e.setAttribute("type", "infotable 1.0");
- e.setAttribute("detail", kDetailLevelText[m_detailLevel]);
e.setAttribute("showrowtotals", m_showRowTotals);
}
@@ -649,6 +651,7 @@ bool MyMoneyReport::read(const QDomElement& e)
m_tax = e.attribute("tax", "0").toUInt();
m_investments = e.attribute("investments", "0").toUInt();
m_loans = e.attribute("loans", "0").toUInt();
+ m_hideTransactions = e.attribute("hidetransactions", "0").toUInt();
m_includeSchedules = e.attribute("includeschedules", "0").toUInt();
m_columnsAreDays = e.attribute("columnsaredays", "0").toUInt();
m_includeTransfers = e.attribute("includestransfers", "0").toUInt();
diff --git a/kmymoney/mymoney/mymoneyreport.h b/kmymoney/mymoney/mymoneyreport.h
index 3f0633f0..d690ea38 100644
--- a/kmymoney/mymoney/mymoneyreport.h
+++ b/kmymoney/mymoney/mymoneyreport.h
@@ -140,6 +140,9 @@ public:
EDetailLevel detailLevel() const {
return m_detailLevel;
}
+ bool isHideTransactions() const {
+ return m_hideTransactions;
+ }
EChartType chartType() const {
return m_chartType;
}
@@ -263,6 +266,9 @@ public:
void setDetailLevel(EDetailLevel _detail) {
m_detailLevel = _detail;
}
+ void setHideTransactions(bool _f) {
+ m_hideTransactions = _f;
+ }
void setChartType(EChartType _type) {
m_chartType = _type;
}
@@ -559,6 +565,10 @@ private:
*/
enum EDetailLevel m_detailLevel;
/**
+ * Whether to show transactions or just totals.
+ */
+ bool m_hideTransactions;
+ /**
* Whether to convert all currencies to the base currency of the file (true).
* If this is false, it's up to the report generator to decide how to handle
* the currency.
diff --git a/kmymoney/reports/listtable.cpp b/kmymoney/reports/listtable.cpp
index ba2b42bd..d913fa83 100644
--- a/kmymoney/reports/listtable.cpp
+++ b/kmymoney/reports/listtable.cpp
@@ -242,6 +242,7 @@ void ListTable::render(QString& result, QString& csv) const
//
bool row_odd = true;
+ bool isHigherGroupTotal = false; // hack to inform whether to put separator line \
or not
// ***DV***
MyMoneyMoney startingBalance;
@@ -260,12 +261,18 @@ void ListTable::render(QString& result, QString& csv) const
// detect whether any of groups changed and display new group header in that \
case for (int i = 0; i < groups.count(); ++i) {
if (prevGrpNames.at(i) != (*it_row)[groups.at(i)]) {
- row_odd = true;
- result += "<tr class=\"sectionheader\">"
- "<td class=\"left" + QString::number(i) + "\" "
- "colspan=\"" + QString::number(columns.count()) + "\">" +
- (*it_row)[groups.at(i)] + "</td></tr>\n";
- csv += "\"" + (*it_row)[groups.at(i)] + "\"\n";
+ // group header of lowest group doesn't bring any useful information
+ // if hide transaction is enabled, so don't display it
+ if (!m_config.isHideTransactions() || i != groups.count() - 1) {
+ row_odd = true;
+ result += "<tr class=\"sectionheader\">"
+ "<td class=\"left" + QString::number(i) + "\" "
+ "colspan=\"" + QString::number(columns.count()) + "\">" +
+ (*it_row)[groups.at(i)] + "</td></tr>\n";
+ csv += "\"" + (*it_row)[groups.at(i)] + "\"\n";
+ }
+ if (i == groups.count() - 1) // lowest group has been switched...
+ isHigherGroupTotal = false; // ...so expect lowest group total
prevGrpNames.replace(i, (*it_row)[groups.at(i)]);
}
}
@@ -274,34 +281,40 @@ void ListTable::render(QString& result, QString& csv) const
// Columns
//
- // skip the opening and closing balance row,
- // if the balance column is not shown
- // rank = 0 for opening balance, rank = 3 for closing balance
- if ((columns.contains("balance") == 0) && ((*it_row)["rank"] == "0" || \
(*it_row)["rank"] == "3"))
- continue;
-
bool need_label = true;
QString tlink; // link information to account and transaction
- // ***DV***
- if ((* it_row)["rank"] == "1") {
- row_odd = ! row_odd;
- tlink = QString("id=%1&tid=%2")
- .arg((* it_row)["accountid"], (* it_row)["id"]);
- }
- if ((*it_row)["rank"] == "0" || (*it_row)["rank"] == "3")
- result += QString("<tr class=\"item%1\">").arg((* it_row)["id"]);
- else if ((* it_row)["rank"] == "2")
- result += QString("<tr class=\"%1\">").arg(row_odd ? "item1" : "item0");
- else if ((* it_row)["rank"] == "4") {
- if (m_config.rowType() == MyMoneyReport::eTag || //If we order by Tags don't \
show the Grand total as we can have multiple tags per transaction
- !m_config.isConvertCurrency() && std::next(it_row) == m_rows.end())// \
grand total may be invalid if multiple currencies are used, so don't \
display it
- continue;
- else
- result += QString("<tr class=\"sectionfooter\">");
+ if (!m_config.isHideTransactions() || (*it_row)["rank"] == "4") { // if hide \
transaction is enabled display only total rows i.e. rank = 4 + if \
((*it_row)["rank"] == "0" || (*it_row)["rank"] == "3") { + // skip the opening \
and closing balance row, + // if the balance column is not shown
+ // rank = 0 for opening balance, rank = 3 for closing balance
+ if (!columns.contains("balance"))
+ continue;
+ result += QString("<tr class=\"item%1\">").arg((* it_row)["id"]);
+ // ***DV***
+ } else if ((* it_row)["rank"] == "1") {
+ row_odd = ! row_odd;
+ tlink = QString("id=%1&tid=%2")
+ .arg((* it_row)["accountid"], (* it_row)["id"]);
+ result += QString("<tr class=\"%1\">").arg(row_odd ? "row-odd " : \
"row-even"); + } else if ((* it_row)["rank"] == "2")
+ result += QString("<tr class=\"%1\">").arg(row_odd ? "item1" : "item0");
+ else if ((* it_row)["rank"] == "4") {
+ if ((m_config.rowType() == MyMoneyReport::eTag) || //If we order by Tags \
don't show the Grand total as we can have multiple tags per transaction + \
(!m_config.isConvertCurrency() && std::next(it_row) == m_rows.end()))// grand total \
may be invalid if multiple currencies are used, so don't display it + \
continue; + // display special footer (i.e. without horizontal separator) only \
for lowest group totals + else if (m_config.isHideTransactions() && \
!isHigherGroupTotal && std::next(it_row) != m_rows.end()) { + result += \
QString("<tr class=\"sectionfooterbasic\">"); + isHigherGroupTotal = true;
+ } else
+ result += QString("<tr class=\"sectionfooter\">");
+ } else
+ result += QString("<tr class=\"%1\">").arg(row_odd ? "row-odd " : \
"row-even"); } else
- result += QString("<tr class=\"%1\">").arg(row_odd ? "row-odd " : "row-even");
+ continue;
QStringList::const_iterator it_column = columns.constBegin();
while (it_column != columns.constEnd()) {
diff --git a/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui \
b/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui index 853abcae..f2c0ea90 100644
--- a/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui
+++ b/kmymoney/widgets/kmymoneyreportconfigtab3decl.ui
@@ -1,460 +1,520 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0" stdsetdef="1">
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>kMyMoneyReportConfigTab3Decl</class>
- <widget class="QWidget" name="kMyMoneyReportConfigTab3Decl">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>617</width>
- <height>267</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle">
- <string>Rows/Columns Tab</string>
- </property>
- <property name="toolTip" stdset="0">
- <string/>
- </property>
- <property name="whatsThis" stdset="0">
- <string><p>On this tab, you configure how you would like the rows and \
columns to be selected and organized.</p></string>
- </property>
- <layout class="QVBoxLayout">
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QLabel" name="textLabel3">
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font/>
- </property>
- <property name="text">
- <string>Organize by:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="m_comboOrganizeBy">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Choose how to group the transactions in this \
report</p></string>
- </property>
- <item>
- <property name="text">
- <string>Categories</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Top Categories</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Tags</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Payees</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Accounts</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Top Accounts</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Month</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Week</string>
- </property>
- </item>
- </widget>
- </item>
- <item>
- <spacer name="spacer10_2">
- <property name="sizeHint">
- <size>
- <width>358</width>
- <height>16</height>
- </size>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QGroupBox" name="buttonGroupBox1">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Show Columns</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Choose which columns should be shown in the \
report.</p><p>The date and transaction amount are always \
shown.</p></string>
- </property>
- <layout class="QGridLayout">
- <property name="spacing">
- <number>2</number>
- </property>
- <item row="1" column="1">
- <widget class="QCheckBox" name="m_checkMemo">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Memo</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Memo \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QCheckBox" name="m_checkShares">
- <property name="text">
- <string>Shares</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Shares column \
for investments</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QCheckBox" name="m_checkPrice">
- <property name="text">
- <string>Price</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Price column \
for investments</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="m_checkReconciled">
- <property name="text">
- <string>Reconciled</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Reconciled \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QCheckBox" name="m_checkAccount">
- <property name="text">
- <string>Account</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Account \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="m_checkNumber">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Number</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Number \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QCheckBox" name="m_checkTag">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Tag</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Tag \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="m_checkPayee">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Payee</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Payee \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="m_checkCategory">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Category</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Category \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="0" column="5">
- <widget class="QCheckBox" name="m_checkAction">
- <property name="text">
- <string>Action</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Action \
column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QCheckBox" name="m_checkBalance">
- <property name="text">
- <string>Balance</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Select this option to show the Running \
balance column</p></string>
- </property>
- <attribute name="buttonGroup">
- <string comment="KDE::DoNotExtract">buttonGroup1</string>
- </attribute>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="spacer10">
- <property name="sizeHint">
- <size>
- <width>205</width>
- <height>20</height>
- </size>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout">
- <item row="2" column="0">
- <widget class="QCheckBox" name="m_checkLoans">
- <property name="text">
- <string>Include only Loan accounts</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="m_checkInvestments">
- <property name="text">
- <string>Include only Investment accounts</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Check this box to include only those categories \
which have been marked to "Include on Tax \
Reports"</p></string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="m_checkHideSplitDetails">
- <property name="text">
- <string>Hide Split Transaction Details</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Do not display the individual transactions that make up a \
split transaction</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="m_checkTax">
- <property name="text">
- <string>Include only Tax categories</string>
- </property>
- <property name="toolTip" stdset="0">
- <string><p>Check this box to include only those categories \
which have been marked to "Include on Tax \
Reports"</p></string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="spacer4">
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>16</height>
- </size>
+<ui version="4.0">
+ <class>kMyMoneyReportConfigTab3Decl</class>
+ <widget class="QWidget" name="kMyMoneyReportConfigTab3Decl">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>730</width>
+ <height>267</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>Rows/Columns Tab</string>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string><p>On this tab, you configure how you would like the rows and \
columns to be selected and organized.</p></string> + </property>
+ <layout class="QVBoxLayout">
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QLabel" name="textLabel3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font/>
+ </property>
+ <property name="text">
+ <string>Organize by:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KComboBox" name="m_comboOrganizeBy">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string><p>Choose how to group the transactions in this \
report</p></string> + </property>
+ <item>
+ <property name="text">
+ <string>Categories</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Top Categories</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Tags</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Payees</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Accounts</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Top Accounts</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Month</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Week</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer10_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>358</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QGroupBox" name="buttonGroupBox1">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string><p>Choose which columns should be shown in the \
report.</p><p>The date and transaction amount are always \
shown.</p></string> + </property>
+ <property name="title">
+ <string>Show Columns</string>
+ </property>
+ <layout class="QGridLayout">
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="m_checkMemo">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><p>Select this option to show the Memo \
column</p></string> + </property>
+ <property name="text">
+ <string>Memo</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QCheckBox" name="m_checkShares">
+ <property name="toolTip">
+ <string><p>Select this option to show the Shares column for \
investments</p></string> + </property>
+ <property name="text">
+ <string>Shares</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="m_checkPrice">
+ <property name="toolTip">
+ <string><p>Select this option to show the Price column for \
investments</p></string> + </property>
+ <property name="text">
+ <string>Price</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="m_checkReconciled">
+ <property name="toolTip">
+ <string><p>Select this option to show the Reconciled \
column</p></string> + </property>
+ <property name="text">
+ <string>Reconciled</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QCheckBox" name="m_checkAccount">
+ <property name="toolTip">
+ <string><p>Select this option to show the Account \
column</p></string> + </property>
+ <property name="text">
+ <string>Account</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="m_checkNumber">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><p>Select this option to show the Number \
column</p></string> </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
+ <property name="text">
+ <string>Number</string>
</property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QCheckBox" name="m_checkTag">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
</property>
- </spacer>
- </item>
+ <property name="toolTip">
+ <string><p>Select this option to show the Tag \
column</p></string> + </property>
+ <property name="text">
+ <string>Tag</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="m_checkPayee">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><p>Select this option to show the Payee \
column</p></string> + </property>
+ <property name="text">
+ <string>Payee</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="m_checkCategory">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><p>Select this option to show the Category \
column</p></string> + </property>
+ <property name="text">
+ <string>Category</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QCheckBox" name="m_checkAction">
+ <property name="toolTip">
+ <string><p>Select this option to show the Action \
column</p></string> + </property>
+ <property name="text">
+ <string>Action</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QCheckBox" name="m_checkBalance">
+ <property name="toolTip">
+ <string><p>Select this option to show the Running balance \
column</p></string> + </property>
+ <property name="text">
+ <string>Balance</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup1</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer10">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>205</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout">
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="m_checkLoans">
+ <property name="text">
+ <string>Include only Loan accounts</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="m_checkInvestments">
+ <property name="toolTip">
+ <string><p>Check this box to include only those categories which have \
been marked to "Include on Tax Reports"</p></string> + \
</property> + <property name="text">
+ <string>Include only Investment accounts</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="m_checkHideSplitDetails">
+ <property name="toolTip">
+ <string>Do not display the individual transactions that make up a split \
transaction</string> + </property>
+ <property name="text">
+ <string>Hide Split Transaction Details</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="m_checkTax">
+ <property name="toolTip">
+ <string><p>Check this box to include only those categories which have \
been marked to "Include on Tax Reports"</p></string> + \
</property> + <property name="text">
+ <string>Include only Tax categories</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="m_checkHideTransactions">
+ <property name="toolTip">
+ <string>Do not display the transactions, leaving only totals \
displayed.</string> + </property>
+ <property name="text">
+ <string>Hide Transactions</string>
+ </property>
+ </widget>
+ </item>
</layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <connections>
- <connection>
- <sender>m_checkTax</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkInvestments</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>m_checkTax</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkLoans</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>m_checkInvestments</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkTax</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>m_checkInvestments</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkLoans</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>m_checkLoans</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkTax</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>m_checkLoans</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_checkInvestments</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- </connections>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header location="global">kcombobox.h</header>
- </customwidget>
- </customwidgets>
- <buttongroups>
- <buttongroup name="buttonGroup1"/>
- </buttongroups>
+ </item>
+ <item>
+ <spacer name="spacer4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>m_checkTax</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkInvestments</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>m_checkTax</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkLoans</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>m_checkInvestments</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkTax</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>m_checkInvestments</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkLoans</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>m_checkLoans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkTax</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>m_checkLoans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_checkInvestments</receiver>
+ <slot>setDisabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>20</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <buttongroups>
+ <buttongroup name="buttonGroup1"/>
+ </buttongroups>
</ui>
diff --git a/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp \
b/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp index c465994c..0db2ef21 100644
--- a/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp
+++ b/kmymoney/widgets/kmymoneyreportconfigtabimpl.cpp
@@ -72,6 +72,14 @@ kMyMoneyReportConfigTab3Decl::kMyMoneyReportConfigTab3Decl(QWidget \
*parent) ui->buttonGroup1->setId(ui->m_checkCategory, 7);
ui->buttonGroup1->setId(ui->m_checkAction, 8);
ui->buttonGroup1->setId(ui->m_checkBalance, 9);
+ connect(ui->m_checkHideTransactions, SIGNAL(toggled(bool)), this, \
SLOT(slotHideTransactionsChanged(bool))); +}
+
+void kMyMoneyReportConfigTab3Decl::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()
diff --git a/kmymoney/widgets/kmymoneyreportconfigtabimpl.h \
b/kmymoney/widgets/kmymoneyreportconfigtabimpl.h index 5034be23..ed2533cb 100644
--- a/kmymoney/widgets/kmymoneyreportconfigtabimpl.h
+++ b/kmymoney/widgets/kmymoneyreportconfigtabimpl.h
@@ -54,11 +54,14 @@ private:
class kMyMoneyReportConfigTab3Decl : public QWidget
{
+ Q_OBJECT
public:
kMyMoneyReportConfigTab3Decl(QWidget *parent);
virtual ~kMyMoneyReportConfigTab3Decl();
private:
Ui::kMyMoneyReportConfigTab3Decl* ui;
+private slots:
+ void slotHideTransactionsChanged(bool checked);
};
class kMyMoneyReportConfigTabChartDecl : public QWidget
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic