Adding map context to simplify parameter passing

This commit is contained in:
Dan Paulat 2021-11-27 19:00:49 -06:00
parent afb174a8fe
commit f7f86ec24a
12 changed files with 140 additions and 124 deletions

View file

@ -0,0 +1,34 @@
#pragma once
#include <scwx/qt/gl/gl.hpp>
#include <scwx/qt/view/radar_product_view.hpp>
namespace scwx
{
namespace qt
{
namespace map
{
struct MapContext
{
explicit MapContext(
std::shared_ptr<view::RadarProductView> radarProductView = nullptr) :
gl_ {}, radarProductView_ {radarProductView}
{
}
~MapContext() = default;
MapContext(const MapContext&) = delete;
MapContext& operator=(const MapContext&) = delete;
MapContext(MapContext&&) noexcept = default;
MapContext& operator=(MapContext&&) noexcept = default;
gl::OpenGLFunctions gl_;
std::shared_ptr<view::RadarProductView> radarProductView_;
};
} // namespace map
} // namespace qt
} // namespace scwx