Custom Reports

- Integrated new View in place of Table for all custom reports.
- Implemented legacy field mapping for columns and sort fields.
- Implemented rc.indent.report.
- Implemented rc.row.padding.
- Implemented rc.column.padding.
- Implemented rc.color.label.
- Modified default rc.indent.annotation from 1 to 2.
- Implemented urgency value caching.
- Implemented View truncation by line and row.
- Columns now know which report thy belong to, so they can use the
  rc.report.<report>.dateformat override.
- Assorted bugs remain.
This commit is contained in:
Paul Beckingham
2011-05-08 09:29:55 -04:00
parent 67a43d6099
commit 041bcfdf21
18 changed files with 346 additions and 798 deletions

View File

@@ -42,7 +42,6 @@ ColumnDate::ColumnDate ()
_style = "default";
_label = "";
_attribute = "";
_report = "";
}
////////////////////////////////////////////////////////////////////////////////
@@ -50,12 +49,6 @@ ColumnDate::~ColumnDate ()
{
}
////////////////////////////////////////////////////////////////////////////////
void ColumnDate::setReport (const std::string& report)
{
_report = report;
}
////////////////////////////////////////////////////////////////////////////////
// Set the minimum and maximum widths for the value.
void ColumnDate::measure (Task& task, int& minimum, int& maximum)
@@ -97,7 +90,7 @@ void ColumnDate::measure (Task& task, int& minimum, int& maximum)
else if (_style == "age")
{
Date now;
minimum = maximum = Duration (now - date).format ().length ();
minimum = maximum = Duration (now - date).formatCompact ().length ();
}
else
throw std::string ("Unrecognized column format '") + _type + "." + _style + "'";
@@ -165,7 +158,7 @@ void ColumnDate::render (
lines.push_back (
color.colorize (
rightJustify (
Duration (now - date).format (), width)));
Duration (now - date).formatCompact (), width)));
}
else if (_style == "short")
{