mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: Migrated getUntrackedRanges from helper
This commit is contained in:
parent
d62a8eb2a2
commit
57faef4389
3 changed files with 20 additions and 19 deletions
19
src/data.cpp
19
src/data.cpp
|
@ -577,6 +577,25 @@ std::vector <Interval> getTrackedIntervals (
|
|||
return intervals;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Untracked time is that which is not excluded, and not filled. Gaps.
|
||||
std::vector <Range> getUntrackedRanges (
|
||||
const Rules& rules)
|
||||
{
|
||||
std::vector <Range> gaps;
|
||||
|
||||
// Get the set of expanded exclusions that overlap the range defined by the
|
||||
// timeline. If no range is defined, derive it from the set of all data.
|
||||
/*
|
||||
auto exclusions = getExcludedRanges (rules);
|
||||
*/
|
||||
|
||||
// TODO subtract all exclusions
|
||||
// TODO subtract all inclusions
|
||||
|
||||
return gaps;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Interval getLatestInterval (Database& database)
|
||||
{
|
||||
|
|
|
@ -133,24 +133,6 @@ std::vector <Range> getExcludedRanges (Rules& rules, Range& range)
|
|||
return getAllExclusions (rules, overallRange);
|
||||
}
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Untracked time is that which is not excluded, and not filled. Gaps.
|
||||
std::vector <Range> getUntrackedRanges (Rules& rules)
|
||||
{
|
||||
std::vector <Range> gaps;
|
||||
|
||||
// Get the set of expanded exclusions that overlap the range defined by the
|
||||
// timeline. If no range is defined, derive it from the set of all data.
|
||||
/*
|
||||
auto exclusions = getExcludedRanges (rules);
|
||||
*/
|
||||
|
||||
// TODO subtract all exclusions
|
||||
// TODO subtract all inclusions
|
||||
|
||||
return gaps;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Compose a JSON document of intervals. In the trivial case:
|
||||
// [
|
||||
|
|
|
@ -52,6 +52,7 @@ Range outerRange (const std::vector <Interval>&);
|
|||
bool matchesFilter (const Interval&, const Interval&);
|
||||
Interval clip (const Interval&, const Range&);
|
||||
std::vector <Interval> getTrackedIntervals (Database&, const Rules&, Interval&);
|
||||
std::vector <Range> getUntrackedRanges (const Rules&);
|
||||
Interval getLatestInterval (Database&);
|
||||
|
||||
// init.cpp
|
||||
|
@ -66,7 +67,6 @@ Color tagColor (const Rules&, const std::string&);
|
|||
std::string intervalSummarize (const Rules&, const Interval&);
|
||||
bool expandIntervalHint (const std::string&, std::string&, std::string&);
|
||||
std::vector <Range> getExcludedRanges (Rules&, Range&);
|
||||
std::vector <Range> getUntrackedRanges (Rules&);
|
||||
std::string jsonFromIntervals (const std::vector <Interval>&);
|
||||
Palette createPalette (const Rules&);
|
||||
std::map <std::string, Color> createTagColorMap (const Rules&, Palette&, const std::vector <Interval>&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue