Update most instances of current time to use a time offset

This commit is contained in:
Dan Paulat 2025-08-22 23:42:08 -05:00
parent e0a4dee72b
commit bd27d0e562
19 changed files with 48 additions and 38 deletions

View file

@ -4,6 +4,7 @@
#include <scwx/qt/util/texture_atlas.hpp>
#include <scwx/qt/util/tooltip.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <execution>
@ -313,7 +314,7 @@ void GeoIcons::Render(const QMapLibre::CustomLayerRenderParameters& params,
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,
@ -930,7 +931,7 @@ bool GeoIcons::RunMousePicking(
// If no time has been selected, use the current time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
// For each pickable icon

View file

@ -3,6 +3,7 @@
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/qt/util/tooltip.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <execution>
@ -284,7 +285,7 @@ void GeoLines::Render(const QMapLibre::CustomLayerRenderParameters& params)
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,
@ -723,7 +724,7 @@ bool GeoLines::RunMousePicking(
// If no time has been selected, use the current time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
// For each pickable line

View file

@ -3,6 +3,7 @@
#include <scwx/qt/util/texture_atlas.hpp>
#include <scwx/qt/util/tooltip.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <execution>
@ -295,7 +296,7 @@ void PlacefileIcons::Render(
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,
@ -720,7 +721,7 @@ bool PlacefileIcons::RunMousePicking(
// If no time has been selected, use the current time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
// For each pickable icon

View file

@ -2,6 +2,7 @@
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/qt/util/texture_atlas.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <QDir>
#include <QUrl>
@ -264,7 +265,7 @@ void PlacefileImages::Render(
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,

View file

@ -3,6 +3,7 @@
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/qt/util/tooltip.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <execution>
@ -248,7 +249,7 @@ void PlacefileLines::Render(
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,
@ -526,7 +527,7 @@ bool PlacefileLines::RunMousePicking(
// If no time has been selected, use the current time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
// For each pickable line

View file

@ -1,6 +1,7 @@
#include <scwx/qt/gl/draw/placefile_polygons.hpp>
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <mutex>
@ -259,7 +260,7 @@ void PlacefilePolygons::Render(
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,

View file

@ -5,6 +5,7 @@
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/qt/util/tooltip.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <fmt/format.h>
#include <imgui.h>
@ -127,7 +128,7 @@ void PlacefileText::Impl::RenderTextDrawItem(
// If no time has been selected, use the current time
std::chrono::system_clock::time_point selectedTime =
(selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
selectedTime_;
const bool thresholdMet =

View file

@ -1,6 +1,7 @@
#include <scwx/qt/gl/draw/placefile_triangles.hpp>
#include <scwx/qt/util/maplibre.hpp>
#include <scwx/util/logger.hpp>
#include <scwx/util/time.hpp>
#include <mutex>
@ -203,7 +204,7 @@ void PlacefileTriangles::Render(
// Selected time
std::chrono::system_clock::time_point selectedTime =
(p->selectedTime_ == std::chrono::system_clock::time_point {}) ?
std::chrono::system_clock::now() :
scwx::util::time::now() :
p->selectedTime_;
glUniform1i(
p->uSelectedTimeLocation_,