Commit 6f6a9c07 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

In reports view show report start and end date

BUG:412484
FIXED-IN:4.8.5
parent ed9db842
......@@ -346,11 +346,11 @@ KReportsView::KReportsView(QWidget *parent, const char *name) :
// report-group items have only 1 column (name of group),
// report items have 2 columns (report name and comment)
m_tocTreeWidget->setColumnCount(2);
m_tocTreeWidget->setColumnCount(4);
// headers
QStringList headers;
headers << i18n("Reports") << i18n("Comment");
headers << i18n("Reports") << i18n("Comment") << i18n("Start date") << i18n("End date");
m_tocTreeWidget->setHeaderLabels(headers);
m_tocTreeWidget->setAlternatingRowColors(true);
......
......@@ -22,6 +22,8 @@
// ----------------------------------------------------------------------------
// KDE Includes
#include <KGlobal>
#include <KLocale>
// ----------------------------------------------------------------------------
// Project Includes
......@@ -29,6 +31,11 @@
TocItemReport::TocItemReport(QTreeWidgetItem* parent, MyMoneyReport& report):
TocItem(parent, QStringList() << report.name() << report.comment())
{
QDate startDate,endDate;
if (report.dateFilter(startDate, endDate)) {
setText(2, KGlobal::locale()->formatDate(startDate, KLocale::ShortDate));
setText(3, KGlobal::locale()->formatDate(endDate, KLocale::ShortDate));
}
m_report = report;
type = TocItem::REPORT;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment