MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / render

Method render

src/columns/ColStatus.cpp:73–104  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

71
72////////////////////////////////////////////////////////////////////////////////
73void ColumnStatus::render(std::vector<std::string>& lines, Task& task, int width, Color& color) {
74 Task::status status = task.getStatus();
75 std::string value;
76
77 if (_style == "default" || _style == "long") {
78 if (status == Task::pending)
79 value = "Pending";
80 else if (status == Task::completed)
81 value = "Completed";
82 else if (status == Task::deleted)
83 value = "Deleted";
84 else if (status == Task::waiting)
85 value = "Waiting";
86 else if (status == Task::recurring)
87 value = "Recurring";
88 }
89
90 else if (_style == "short") {
91 if (status == Task::pending)
92 value = "P";
93 else if (status == Task::completed)
94 value = "C";
95 else if (status == Task::deleted)
96 value = "D";
97 else if (status == Task::waiting)
98 value = "W";
99 else if (status == Task::recurring)
100 value = "R";
101 }
102
103 renderStringLeft(lines, width, color, value);
104}
105
106////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

getStatusMethod · 0.80

Tested by

no test coverage detected