TimelineUncertainty.h header
#include <ew/app/TimelineUncertainty.h>
Namespace ew::app
UncertaintyBand struct
struct ew::app::UncertaintyBand
The geometry an uncertain event draws INSTEAD of a crisp mark (TL-10): "render fuzziness as a fuzzy thing -- a soft band, a bracket -- never a crisp point that implies false precision." The panel fills [start, end] as a soft band when soft is set, and adds a directional bracket when bracketLeft / bracketRight is set (the true moment lies somewhere off that side of the event's stored instant). For an Exact event the band is just the event's own span and nothing is soft or bracketed, so an ordinary event is unaffected.
Members
qint64 ew::app::UncertaintyBand::start = 0
The band's start instant (minutes since the epoch) – the left edge of the fuzzy region.
qint64 ew::app::UncertaintyBand::end = 0
The band's end instant – the right edge of the fuzzy region.
bool ew::app::UncertaintyBand::soft = false
Whether to draw the region as a faded soft band rather than a crisp bar (Circa/Before/After/ During). False for Exact.
bool ew::app::UncertaintyBand::bracketLeft = false
Whether the true moment lies to the LEFT of the stored instant (Before): draw an open bracket on the left.
bool ew::app::UncertaintyBand::bracketRight = false
Whether the true moment lies to the RIGHT of the stored instant (After): draw an open bracket on the right.
bool operator==(const UncertaintyBand &, const UncertaintyBand &)=default
Value equality over all fields, so the geometry is testable without a view.
Functions
UncertaintyBand ew::app::uncertaintyBand(ew::core::TimelineDateQualifier qualifier, qint64 start, qint64 end, qint64 fuzzMinutes)
Computes the fuzzy band an event with date qualifier qualifier draws (TL-10), from its stored span [start, end] and a fuzz width fuzzMinutes (how far either side an approximate date reaches; the caller picks a view-appropriate amount). Pure so the "reads as fuzzy" invariant is machine-checkable, with no view:
- Exact -> the crisp span [start, end], soft = false (unchanged).
- Circa -> [start - fuzz, end + fuzz], a symmetric soft band around the instant.
- Before -> [start - fuzz, start], soft, bracket on the LEFT (an upper bound).
- After -> [end, end + fuzz], soft, bracket on the RIGHT (a lower bound).
- During -> the event's own span made soft; a zero-width span widens to
fuzzMinutesso a "sometime during" event still reads as a window rather than a point.fuzzMinutesis clamped to be non-negative; a reversed [start, end] is tolerated (the band keeps start <= end).