Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+112
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* @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
|
||||
|
||||
Reference in new issue
Block a user