TimelineLayers.h header

#include <ew/app/TimelineLayers.h>

Namespace ew::app

TimelineLayerSet struct

struct ew::app::TimelineLayerSet

The named layers present on a timeline's events, plus whether any event is unlayered (TL-88). Named layers are the distinct non-empty layer strings, sorted, so a visibility menu lists them in a stable order consistent with the Maps dock's layer menu; hasUnlayered says whether a "(No layer)" toggle is also warranted (some events carry the default, empty layer).

Members

QStringList ew::app::TimelineLayerSet::named

Distinct non-empty layer names, sorted.

bool ew::app::TimelineLayerSet::hasUnlayered = false

True when at least one event carries no layer (belongs to the default, unlayered layer).

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

Value equality over both fields, so a rebuild that produces the same set can skip re-emitting.

Functions

bool ew::app::timelineEventLayerVisible(const QString &eventLayer, const std::set< QString > &hiddenLayers)

Whether an event whose layer is eventLayer is visible when hiddenLayers holds the set of hidden layer keys. The unlayered bucket is keyed by the empty string, so hiding it (Maps parity) is expressed as an empty string in hiddenLayers. Keeping the predicate here – rather than an inline contains in the paint path – keeps the visibility rule (TL-88) testable and one place.

TimelineLayerSet ew::app::timelineLayers(const std::vector< QString > &eventLayers)

Gathers the layer set from eventLayers – one layer string per event, empty for an unlayered event. Mirrors how the Maps dock collects a map's region layers: distinct non-empty names, sorted, with a separate flag for the default (empty) layer. Pure, so "which layers exist" is machine-checkable rather than a paint-time scan.