Task.h header
#include <ew/core/Task.h>
Namespace ew::core
Task class
class ew::core::Task
A task or to-do: a first-class content object with a title, a completion flag, a priority, an optional due date, and a workflow status (its kanban board column). A task may target another object (the thing it is about, e.g. the chapter to revise), letting tasks hang off documents and entities. Tasks are ordered within a status column by their sort index.
Members
ew::core::Task::Task(ContentId id, QString title)
Creates a task with identity id and title, at Normal priority in the default "To Do" status, not done and with no due date or target.
const QString & ew::core::Task::title() const
The task's title (what to do).
void ew::core::Task::setTitle(QString title)
Sets the task's title.
const QString & ew::core::Task::description() const
A free-text description / details of the task, shown beneath the title on its board card. Empty by default.
void ew::core::Task::setDescription(QString description)
Sets the task's free-text description.
bool ew::core::Task::isDone() const
Whether the task has been completed (checked off).
void ew::core::Task::setDone(bool done)
Sets whether the task is completed.
TaskPriority ew::core::Task::priority() const
The task's priority.
void ew::core::Task::setPriority(TaskPriority priority)
Sets the task's priority.
QDate ew::core::Task::dueDate() const
The task's due date; an invalid (null) date means no due date.
void ew::core::Task::setDueDate(QDate dueDate)
Sets the task's due date (an invalid date means no due date).
const QString & ew::core::Task::board() const
The board the task belongs to (e.g. "Tasks", "Submissions"). Lets a project keep separate kanban boards – a submission/pipeline tracker distinct from writing tasks.
void ew::core::Task::setBoard(QString board)
Sets the board the task belongs to.
const QString & ew::core::Task::status() const
The board column / workflow stage the task sits in (e.g. "To Do", "Doing", "Done"). Drives the kanban board.
void ew::core::Task::setStatus(QString status)
Sets the task's board column / workflow stage.
ContentId ew::core::Task::targetId() const
The object this task is about (e.g. the chapter to revise); a null id means the task is not linked to any object.
void ew::core::Task::setTargetId(ContentId targetId)
Sets the object this task is about (a null id means none).
int ew::core::Task::sortIndex() const
The task's position among the tasks in its status column (lower comes first).
void ew::core::Task::setSortIndex(int sortIndex)
Sets the task's position within its status column (lower comes first).
const SubmissionInfo & ew::core::Task::submission() const
The submission-pipeline details, when this task tracks a submission of a piece of writing (an empty record means it is an ordinary to-do). The recipient, submitted date and notes; the response-due date is the task's due date and the pipeline stage is its status.
void ew::core::Task::setSubmission(SubmissionInfo submission)
Sets the submission-pipeline details (an empty record means an ordinary to-do).