PlotThread.h header

#include <ew/core/PlotThread.h>

Namespace ew::core

PlotThread struct

struct ew::core::PlotThread

A plot line / narrative thread the writer tracks across the manuscript – e.g. "Main quest", "Romance", "The betrayal subplot" – so scenes can be tagged with the threads they advance and each thread's scenes read as a through-line. A character arc is modelled as a thread whose characterId names the character it belongs to (its scenes are that character's arc beats); a thread with a null characterId is a plain plot line.

Threads are a lightweight, project-level registry (like the audience registry), not full content objects: a document references the threads it belongs to by id, so a thread can be renamed or recoloured without touching the scenes tagged to it. Ids are stable strings assigned by the UI (a UUID) so the core stays deterministic and free of id-generation side effects.

Members

QString ew::core::PlotThread::id

Stable identity of this thread; how documents reference it (survives renames). Assigned by the UI when the thread is created.

QString ew::core::PlotThread::name

The writer-facing name of the thread (e.g. "Romance", "Frodo's arc").

QString ew::core::PlotThread::color

A colour for visualising this thread (ribbons on cards, list swatches), as a CSS hex string such as "#c0392b". Empty means the UI picks a default.

QString ew::core::PlotThread::description

Optional notes describing what this thread is about.

ContentId ew::core::PlotThread::characterId

When set (non-null), this thread is a character arc belonging to the named character entity; its tagged scenes are that character's arc beats. Null means a plain (non-character) plot line.

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

Two threads compare equal when every field matches.