mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-04 01:27:20 +02:00
Columns
- Refactored column objects to contain a ::validate method, for the validation of incoming data. - Context.columns is now a vector of one of each column object, indexed by attribute name, for validation purposes.
This commit is contained in:
parent
a7d6b91ad3
commit
3c1c900b5b
38 changed files with 252 additions and 76 deletions
|
@ -37,6 +37,7 @@ class Column
|
|||
{
|
||||
public:
|
||||
static Column* factory (const std::string&, const std::string&);
|
||||
static void factory (std::map <std::string, Column*>&);
|
||||
|
||||
Column ();
|
||||
Column (const Column&);
|
||||
|
@ -52,6 +53,7 @@ public:
|
|||
virtual void setLabel (const std::string& value) { _label = value; }
|
||||
virtual void setReport (const std::string& value) { _report = value; }
|
||||
|
||||
virtual bool validate (std::string&);
|
||||
virtual void measure (const std::string&, int&, int&);
|
||||
virtual void measure (Task&, int&, int&);
|
||||
virtual void renderHeader (std::vector <std::string>&, int, Color&);
|
||||
|
@ -59,6 +61,7 @@ public:
|
|||
virtual void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
std::string _type;
|
||||
std::string _style;
|
||||
std::string _label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue