CmdTimesheet: Migrated from ViewText to Table
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <Filter.h>
|
#include <Filter.h>
|
||||||
#include <ViewText.h>
|
#include <Table.h>
|
||||||
#include <ISO8601.h>
|
#include <ISO8601.h>
|
||||||
#include <main.h>
|
#include <main.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
@@ -102,12 +102,12 @@ int CmdTimesheet::execute (std::string& output)
|
|||||||
<< '\n';
|
<< '\n';
|
||||||
|
|
||||||
// Render the completed table.
|
// Render the completed table.
|
||||||
ViewText completed;
|
Table completed;
|
||||||
completed.width (context.getWidth ());
|
completed.width (context.getWidth ());
|
||||||
completed.add (Column::factory ("string", " "));
|
completed.add (" ");
|
||||||
completed.add (Column::factory ("string", STRING_COLUMN_LABEL_PROJECT));
|
completed.add (STRING_COLUMN_LABEL_PROJECT);
|
||||||
completed.add (Column::factory ("string.right", STRING_COLUMN_LABEL_DUE));
|
completed.add (STRING_COLUMN_LABEL_DUE, false);
|
||||||
completed.add (Column::factory ("string", STRING_COLUMN_LABEL_DESC));
|
completed.add (STRING_COLUMN_LABEL_DESC);
|
||||||
|
|
||||||
Color label;
|
Color label;
|
||||||
if (context.color ())
|
if (context.color ())
|
||||||
@@ -163,12 +163,12 @@ int CmdTimesheet::execute (std::string& output)
|
|||||||
<< '\n';
|
<< '\n';
|
||||||
|
|
||||||
// Now render the started table.
|
// Now render the started table.
|
||||||
ViewText started;
|
Table started;
|
||||||
started.width (context.getWidth ());
|
started.width (context.getWidth ());
|
||||||
started.add (Column::factory ("string", " "));
|
started.add (" ");
|
||||||
started.add (Column::factory ("string", STRING_COLUMN_LABEL_PROJECT));
|
started.add (STRING_COLUMN_LABEL_PROJECT);
|
||||||
started.add (Column::factory ("string.right", STRING_COLUMN_LABEL_DUE));
|
started.add (STRING_COLUMN_LABEL_DUE, false);
|
||||||
started.add (Column::factory ("string", STRING_COLUMN_LABEL_DESC));
|
started.add (STRING_COLUMN_LABEL_DESC);
|
||||||
started.colorHeader (label);
|
started.colorHeader (label);
|
||||||
|
|
||||||
for (auto& task : all)
|
for (auto& task : all)
|
||||||
|
|||||||
Reference in New Issue
Block a user