21 Q_PROPERTY(qsizetype notableCount MEMBER notableCount CONSTANT)
22 Q_PROPERTY(qsizetype highlightCount MEMBER highlightCount CONSTANT)
23 Q_PROPERTY(
bool isEstimate MEMBER isEstimate CONSTANT)
27 qsizetype notableCount = 0;
28 qsizetype highlightCount = 0;
38 bool isEstimate =
true;
41 bool operator==(
const EventStats& rhs)
const
43 return notableCount == rhs.notableCount
44 && highlightCount == rhs.highlightCount
45 && isEstimate == rhs.isEstimate;
47 bool operator!=(
const EventStats& rhs)
const {
return !operator==(rhs); }
53 Q_INVOKABLE
bool empty()
const
55 return notableCount == 0 && !isEstimate && highlightCount == 0;
58 using marker_t = Room::rev_iter_t;
66 static EventStats fromRange(
const Room* room,
const marker_t& from,
68 const EventStats& init = { 0, 0,
false });
76 static EventStats fromMarker(
const Room* room,
const marker_t& marker);
82 static EventStats fromCachedCounters(std::optional<
int> notableCount,
83 std::optional<
int> highlightCount = {});
101 bool updateOnMarkerMove(
const Room* room,
const marker_t& oldMarker,
102 const marker_t& newMarker);
109 bool isValidFor(
const Room* room,
const marker_t& marker)
const;