111 lines
3.0 KiB
C++
Executable File
111 lines
3.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Operator Map Settings
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Own
|
|
#include "situation_map_types.h"
|
|
#include <Map/camera.h>
|
|
#include <Map/layer_parameter.h>
|
|
#include <Map/viewpoint2D.h>
|
|
#include <situation_map_export.h>
|
|
|
|
|
|
// Qt
|
|
#include <QList>
|
|
#include <QPair>
|
|
#include <QString>
|
|
#include <QVector>
|
|
|
|
class QJsonObject;
|
|
|
|
//----------------------------------------------------------------------------
|
|
namespace SituationMap
|
|
{
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
struct MapWidgetSettings
|
|
{
|
|
bool gridVisibility = true;
|
|
bool positionStringVisibility = true;
|
|
bool timeStringVisibility = false;
|
|
bool exerciseTimeStringVisibility = false;
|
|
bool compassVisibility = true;
|
|
bool overviewMapVisibility = false;
|
|
|
|
static MapWidgetSettings read(const QJsonObject &json);
|
|
QJsonObject toJsonObject() const;
|
|
};
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
struct JumpPointData
|
|
{
|
|
QString key;
|
|
Point3D originGeo;
|
|
double mapScale = 0.0;
|
|
|
|
static JumpPointData read(const QJsonObject &json);
|
|
QJsonObject toJsonObject() const;
|
|
};
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
struct SITUATIONMAP_EXPORT OperatorMapSettings
|
|
{
|
|
Mode mode = Mode::Undefined;
|
|
Viewpoint2D viewpoint;
|
|
Camera camera;
|
|
|
|
NavigationConstraint navigationConstraint = NavigationConstraint::Undefined; // navigateBelowGround, since V100.5.0
|
|
float baseSurfaceOpacity = 100.0; // since V100.5.0
|
|
|
|
QVector<QPair<QString, LayerParameter>> orderedLayers;
|
|
|
|
QList<int> orderedOverlays; // QList due to the usage of keys()
|
|
|
|
MapWidgetSettings mapWidgetSettings;
|
|
double symbolScale = 1.0;
|
|
// int symbolOpacity = 100; // of all? of participants? of ???
|
|
|
|
QVector<JumpPointData> jumpPoints;
|
|
|
|
|
|
// ToDo: add bool buildingOwnership
|
|
|
|
|
|
QJsonObject toJsonObject() const;
|
|
bool fromJsonObject(const QJsonObject &json);
|
|
QByteArray toJson() const;
|
|
bool fromJson(const QByteArray &json);
|
|
|
|
bool isEmpty() const;
|
|
|
|
// convenience:
|
|
bool getLayerParameter(const QString &layername, LayerParameter& layerParameterOut) const;
|
|
bool updateLayerParameter(const QString &layername, const LayerParameter& layerParameter);
|
|
|
|
|
|
|
|
};
|
|
//----------------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
} // namespace SituationMap
|
|
|