Commands - burndown.monthly, burndown.weekly, burndown.daily

- Migrated burndown charts to CmdBurndown.
This commit is contained in:
Paul Beckingham
2011-05-29 01:20:58 -04:00
parent 398380d390
commit b0cbc7f757
8 changed files with 176 additions and 111 deletions

View File

@@ -7,6 +7,7 @@ include_directories (${CMAKE_SOURCE_DIR}
set (commands_SRCS Command.cpp Command.h
CmdAppend.cpp CmdAppend.h
CmdBurndown.cpp CmdBurndown.h
CmdCommands.cpp CmdCommands.h
CmdCount.cpp CmdCount.h
CmdCustom.cpp CmdCustom.h

1127
src/commands/CmdBurndown.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_CMDBURNDOWN
#define INCLUDED_CMDBURNDOWN
#define L10N // Localization complete.
#include <string>
#include <Command.h>
class CmdBurndownMonthly : public Command
{
public:
CmdBurndownMonthly ();
int execute (const std::string&, std::string&);
};
class CmdBurndownWeekly : public Command
{
public:
CmdBurndownWeekly ();
int execute (const std::string&, std::string&);
};
class CmdBurndownDaily : public Command
{
public:
CmdBurndownDaily ();
int execute (const std::string&, std::string&);
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -151,18 +151,6 @@ int CmdHelp::execute (const std::string&, std::string& output)
view.set (row, 1, "task timesheet [weeks]");
view.set (row, 2, "Shows a weekly report of tasks completed and started.");
row = view.addRow ();
view.set (row, 1, "task burndown.daily");
view.set (row, 2, "Shows a graphical burndown chart, by day.");
row = view.addRow ();
view.set (row, 1, "task burndown.weekly");
view.set (row, 2, "Shows a graphical burndown chart, by week.");
row = view.addRow ();
view.set (row, 1, "task burndown.monthly");
view.set (row, 2, "Shows a graphical burndown chart, by month.");
row = view.addRow ();
view.set (row, 1, "task calendar [due|month year|year]");
view.set (row, 2, "Shows a calendar, with due tasks marked.");

View File

@@ -29,6 +29,7 @@
#include <vector>
#include <Command.h>
#include <CmdAppend.h>
#include <CmdBurndown.h>
#include <CmdCommands.h>
#include <CmdCount.h>
#include <CmdCustom.h>
@@ -60,6 +61,9 @@ void Command::factory (std::map <std::string, Command*>& all)
Command* c;
c = new CmdAppend (); all[c->keyword ()] = c;
c = new CmdBurndownDaily (); all[c->keyword ()] = c;
c = new CmdBurndownMonthly (); all[c->keyword ()] = c;
c = new CmdBurndownWeekly (); all[c->keyword ()] = c;
c = new CmdCompletionCommands (); all[c->keyword ()] = c;
c = new CmdCompletionIds (); all[c->keyword ()] = c;
c = new CmdCompletionProjects (); all[c->keyword ()] = c;