WritingActivity.h header

#include <ew/app/WritingActivity.h>

Namespace ew::app

Functions

int ew::app::activityLevel(int words, int maxWords)

Maps a day's word count to a discrete activity intensity level for the productivity heatmap: 0 for a day with no writing, then 1..4 in ascending quartiles of maxWords (so the busiest day in the shown window reads as 4, and any day with writing reads as at least 1). Returns 0 when maxWords is not positive; words above maxWords is clamped to 4.

int ew::app::maxWordsInRange(const ew::core::WritingLog &log, QDate from, QDate to)

The largest single-day word count recorded in log across the inclusive date range [from, to], or 0 if no day in the range has any writing. Used to scale the heatmap's colour buckets to the busiest visible day.