TimelineEra.h header

#include <ew/core/TimelineEra.h>

Namespace ew::core

TimelineEra struct

struct ew::core::TimelineEra

A named stretch of story time drawn as a labelled background band on the timeline (TL-18) – the Third Age, the Occupation, Act Two. Named time is how authors navigate; raw numbers are not. An era spans the half-open instant range [start, end) in minutes since the story epoch (the same axis a TimelineEvent uses), so it validates and orders independently of any calendar. A project-level value type (not a first-class content object): the eras live in a registry on the project, exactly like continuity rules, and the whole set is replaced by one undoable command.

Members

QString ew::core::TimelineEra::name

The era's name, shown on its band (e.g. "The Third Age").

qint64 ew::core::TimelineEra::startMinute = 0

When the era begins, in minutes since the story epoch (may be negative for a pre-epoch era).

qint64 ew::core::TimelineEra::endMinute = 0

When the era ends, in minutes since the story epoch. An end before the start is treated as a zero-width era by the layout/paint (never a backwards band).

QString ew::core::TimelineEra::color

An optional "#RRGGBB" band colour; empty takes an automatic colour from the era's position, mirroring how a timeline event's style colour is stored as a string so the model stays free of any UI type.

bool operator==(const TimelineEra &, const TimelineEra &)=default

Value equality over all fields, so a no-op edit (a dialog OK'd with no change) can be detected and skipped rather than clearing the redo stack.