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

159 lines
4.9 KiB
Objective-C
Executable File

/**
**
** @RDE_HEADER@
** Definition of transient map objects for use while rubberbanding is done
** $Id$
** $HeadURL$
** $Author$
**
** -----------------------------------------------------------------------------------------------
**
** Hardware-Environment: Intel-PC
** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5
**
** Language ........: C++ 11
**
** -----------------------------------------------------------------------------------------------
**
** Author ...........: Jörg Turla, SPD G, Tel. 3132
**
** -----------------------------------------------------------------------------------------------
**
** Notes .........:
**
** 29.09.2015, JT : First edition for use with Qt5
**
** -----------------------------------------------------------------------------------------------
*/
#pragma once
#include "abstract_map_object.h"
#include "line_style.h"
#include "fill_style.h"
#include <QString>
namespace SituationMap
{
/**
@class SIDC_Symbol SIDC_Symbol.h
The class \c SIDC_Symbol creates a tactical symbol due a sidc code. In distinction to the class
\c Participant the \c SIDC_Symbol is not limited to point features. The sidc implies the kind of
geometry (point, polyline or polygon) of the symbol feature, the number of positions to construct the
symbol and the way of interpreting the positions.
\see Participant
*/
class SITUATIONMAP_EXPORT SidcSymbol : public virtual AbstractMapObject
{
public:
/**
@name Construction & Destruction
@{
*/
SidcSymbol() : AbstractMapObject() {} // Workaround VS2015 bug "= default;" --> gives a crash here
virtual ~SidcSymbol() = default;
SidcSymbol(const SidcSymbol &other) = delete;
SidcSymbol &operator=(SidcSymbol &other) = delete;
/** @} */
/** \name Positions
* Set positions of the object. Could be either a single and multi point feature.
*/
//@{
virtual PositionCont positions() const = 0;
virtual void setPositions(const PositionCont &posCont) = 0;
//@}
/** \name LineStyle
* See AbstractMapObject for details.
*/
//@{
virtual LineStyle lineStyle() const = 0;
virtual LineStyle &rLineStyle() = 0;
virtual void setLineStyle(const LineStyle &lineStyle) = 0;
//@}
/** \name FillStyle
* See AbstractMapObject for details.
*/
//@{
virtual FillStyle fillStyle() const = 0;
virtual FillStyle &rFillStyle() = 0;
virtual void setFillStyle(const FillStyle &FillStyle) = 0;
//@}
/**
* @name sidc
* Returns the code of the symbol
*/
virtual const QString &sidc() const = 0;
/**
* @name setSidc
* Defines the code of the symbol. Alternatively the \c AbstractObject::symbol and \c AbstractObject::setSymbol functions can be used.
* @see defineSymbol, AbstractObject::symbol, AbstractObject::setSymbol, SymbolData
*/
virtual void setSidc(const QString &) = 0;
/**
* @name color
* Provides the color of the symbol if set with \c setColor. Default is QColor(0,0,0,0)
* @attention In current release using user defined colors for symbols are not implemented.
* @see setColor
*/
virtual const QColor &color() const = 0;
/**
* @name setColor
* @brief Overrides the color setting of the symbol.
* Generally the color setting is defined by sidc. With \c setColor this definition will be overwritten. Valid color values
* have an alpha value greater than 0. Otherwise the sidc definition will be used. The default is QColor(0,0,0,0)
* @attention In current release using user defined colors for symbols are not implemented.
* @see color
*/
virtual void setColor(const QColor &color = QColor(0, 0, 0, 0)) = 0;
/**
* @name attributeMap
* Returns the attribute map of the symbol.
*/
virtual const QMap<QString, QVariant> &attributeMap() const = 0;
/**
* @name setAttributeMap
* Defines the attribute map of the symbol to support additional drawing attributes. An attribute is a pair of name and value.
* Attributes are used to specify additional properties like width of a corridor or radius of a circle.
* Alternatively the \c AbstractObject::symbol and \c AbstractObject::setSymbol functions can be used.
* @see defineSymbol, AbstractObject::symbol, AbstractObject::setSymbol, SymbolData
*/
virtual void setAttributeMap(const QMap<QString, QVariant> &attrMap) = 0;
/**
* @name defineSymbol
* Convenience function to define a symbol
* @attention In current release using user defined colors for symbols are not implemented. The color parameter is for further use only.
* @see setSidc, setAttributeMap, setColor, AbstractObject::symbol, AbstractObject::setSymbol, SymbolData
*/
virtual void defineSymbol(const QString &sidc,
const PositionCont &posCont,
const QMap<QString, QVariant> &attrMap,
const QColor &color = QColor(0, 0, 0, 0)) = 0;
}; /* SidcSymbol */
} // namespace SituationMap