WritingGoal.h header
#include <ew/core/WritingGoal.h>
Namespace ew::core
WritingGoal class
class ew::core::WritingGoal
The writer's productivity goals for a project: an optional daily words-written habit target, an optional manuscript total-words target, and an optional deadline for reaching that manuscript target. Each target is off when zero (or, for the deadline, when the date is invalid). Value type; the project owns one and it is persisted with the project metadata. Progress and deadline projection are computed from these against the writing log (see ew::app::evaluateGoal).
Members
void ew::core::WritingGoal::setDailyWordTarget(int words)
Sets the daily words-written target (a habit goal); values below zero are treated as none (0).
int ew::core::WritingGoal::dailyWordTarget() const
The daily words-written target, or 0 for none.
void ew::core::WritingGoal::setManuscriptWordTarget(int words)
Sets the manuscript total-words target; values below zero are treated as none (0).
int ew::core::WritingGoal::manuscriptWordTarget() const
The manuscript total-words target, or 0 for none.
void ew::core::WritingGoal::setDeadline(QDate deadline)
Sets the deadline for reaching the manuscript target; an invalid date means none.
QDate ew::core::WritingGoal::deadline() const
The deadline for the manuscript target, or an invalid date for none.
bool ew::core::WritingGoal::hasDailyTarget() const
True if a daily words-written target is set.
bool ew::core::WritingGoal::hasManuscriptTarget() const
True if a manuscript total-words target is set.
bool ew::core::WritingGoal::hasDeadline() const
True if a manuscript deadline is set.
int ew::core::WritingGoal::remainingManuscriptWords(int currentWords) const
The words still needed to reach the manuscript target given currentWords already written: zero when no target is set or the target is already met.