Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/MapImpl/overview_map_handler_impl.h
T
2026-08-13 18:33:10 +02:00

113 lines
2.2 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Implementation of OverviewMap
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include <Map/overview_map_handler.h>
#include <Common/situation_map_logging.h>
#include "situation_map_export.h"
// ESRI
#include <arcgis/MapGraphicsView.h>
// Qt
// Forward:
namespace Esri
{
namespace ArcGISRuntime
{
class Graphic;
}
}
//----------------------------------------------------------------------------
namespace SituationMap
{
class MapImpl;
/**
* @brief The OverviewMap is a wrapper around OverviewMapWidget.
*/
class OverviewMap : public QObject
{
Q_OBJECT
using BaseClass = QObject;
public:
explicit OverviewMap(QObject *parent = nullptr);
~OverviewMap();
void init(MapImpl *mainMap, const QColor &color = Qt::red);
bool createBasicOverviewMap();
QWidget *widget();
protected slots:
void onMainMapExtentChanged();
void setToFullExtent();
protected:
LOGGER_T m_logger; ///< Interface of the Logging-Facility
// Own data:
MapImpl *m_mainMap = nullptr;
QPointer<Esri::ArcGISRuntime::MapGraphicsView> m_graphicsView;
Esri::ArcGISRuntime::Graphic *m_graphic = nullptr;
QColor m_color;
};
// inherent 'public', to get that implementation
// inherent 'public virtual' to get that interface
class SITUATIONMAP_EXPORT OverviewMapHandlerImpl : public QObject, public virtual OverviewMapHandler
{
Q_OBJECT
using BaseClass = QObject;
public:
/*! \name Construction, Destruction */
//@{
explicit OverviewMapHandlerImpl(Map *map);
~OverviewMapHandlerImpl();
OverviewMapHandlerImpl(const OverviewMapHandlerImpl &other) = delete;
OverviewMapHandlerImpl &operator=(OverviewMapHandlerImpl &other) = delete;
void createBuiltInOverviewMap() override;
void removeBuiltInOverviewMap() override;
QWidget *builtInOverviewMapWidget() override;
void removeAll() override;
//@}
protected slots:
void onMainMapRectChanged();
protected:
LOGGER_T m_logger; ///< Interface of the Logging-Facility
class Private;
/**
* The private d->pointer to not break BC when changing internals of this class
*/
Private *d = nullptr;
};
} // namespace SituationMap