supercell-wx/scwx-qt/source/scwx/qt/map/generic_layer.cpp
2024-03-02 00:58:25 -06:00

48 lines
1,003 B
C++

#include <scwx/qt/map/generic_layer.hpp>
namespace scwx
{
namespace qt
{
namespace map
{
class GenericLayerImpl
{
public:
explicit GenericLayerImpl(std::shared_ptr<MapContext> context) :
context_ {context}
{
}
~GenericLayerImpl() {}
std::shared_ptr<MapContext> context_;
};
GenericLayer::GenericLayer(std::shared_ptr<MapContext> context) :
p(std::make_unique<GenericLayerImpl>(context))
{
}
GenericLayer::~GenericLayer() = default;
bool GenericLayer::RunMousePicking(
const QMapLibre::CustomLayerRenderParameters& /* params */,
const QPointF& /* mouseLocalPos */,
const QPointF& /* mouseGlobalPos */,
const glm::vec2& /* mousePos */,
const common::Coordinate& /* mouseGeoCoords */,
std::shared_ptr<types::EventHandler>& /* eventHandler */)
{
// By default, the layer has nothing to pick
return false;
}
std::shared_ptr<MapContext> GenericLayer::context() const
{
return p->context_;
}
} // namespace map
} // namespace qt
} // namespace scwx