PlotThreadQueries.h header

#include <ew/app/PlotThreadQueries.h>

Namespace ew::app

Functions

std::vector< const ew::core::Document * > ew::app::documentsForThread(const ew::core::Project &project, const QString &threadId)

The documents tagged with the thread threadId, in ascending id order (deterministic). Used to read a thread as a through-line: every scene that advances it.

const ew::core::PlotThread * ew::app::findPlotThread(const ew::core::Project &project, const QString &threadId)

The registry entry for the plot thread with threadId in project, or null if no thread has that id. Pointer is into the project's registry and stays valid until the registry is replaced.

std::vector< const ew::core::PlotThread * > ew::app::threadsForDocument(const ew::core::Document &document, const ew::core::Project &project)

The plot threads document belongs to, resolved to project's registry entries in registry order (so display order is stable as scenes are tagged). Membership ids that no longer resolve to a registered thread are skipped, so the result is exactly the live threads on the scene.

std::vector< const ew::core::Document * > ew::app::untaggedScenes(const ew::core::Project &project)

The narrative scenes (Prose or Screenplay documents with body prose) in project that belong to no plot thread – the plotting-gap finder ("which scenes aren't on any thread yet?"). Empty-body structural nodes and notes are excluded, since they are not scenes.