mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Column: Implemented ::renderInteger
This commit is contained in:
parent
dc72a22887
commit
b8ae54275e
2 changed files with 16 additions and 1 deletions
|
@ -25,9 +25,9 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <Column.h>
|
||||
#include <algorithm>
|
||||
#include <Context.h>
|
||||
#include <Column.h>
|
||||
#include <ColDepends.h>
|
||||
#include <ColDescription.h>
|
||||
#include <ColDue.h>
|
||||
|
@ -265,3 +265,15 @@ bool Column::validate (std::string& input)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Column::renderInteger (
|
||||
std::vector <std::string>& lines,
|
||||
int width,
|
||||
Color& color,
|
||||
int value)
|
||||
{
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (value, width)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -65,6 +65,9 @@ public:
|
|||
virtual void render (std::vector <std::string>&, Task&, int, Color&) {};
|
||||
virtual std::string modify (std::string& input) { return input; };
|
||||
|
||||
protected:
|
||||
void renderInteger (std::vector <std::string>&, int, Color&, int);
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
std::string _type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue