146 lines
4.1 KiB
Objective-C
Executable File
146 lines
4.1 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 "Map/sidc_symbol.h"
|
|
#include "abstract_map_object_impl.h"
|
|
#include "coordinate_translation.h"
|
|
|
|
#include <QString>
|
|
#include <QColor>
|
|
|
|
|
|
|
|
namespace SituationMap
|
|
{
|
|
|
|
/**
|
|
@class SIDC_SymbolImpl SIDC_SymbolImpl.h
|
|
The class \c SIDC_SymbolImpl creates a tactical symbol due a sidc code. It is used by class
|
|
TransientTacticalSymbol to display transient tactical symbols during rubberband input is done.
|
|
|
|
@see TransientTacticalSymbol
|
|
*/
|
|
class SITUATIONMAP_EXPORT SidcSymbolImpl : public virtual SidcSymbol, public virtual AbstractMapObjectImpl
|
|
{
|
|
using InterfaceClass = SituationMap::SidcSymbol;
|
|
using BaseClass = SituationMap::AbstractMapObjectImpl;
|
|
|
|
public:
|
|
|
|
/**
|
|
@name Construction & Destruction
|
|
@{
|
|
*/
|
|
explicit SidcSymbolImpl(const QString &debugInfo = QString());
|
|
explicit SidcSymbolImpl(const QString &sidc, const QString &debugInfo);
|
|
|
|
SidcSymbolImpl(const SidcSymbolImpl &other) = delete;
|
|
SidcSymbolImpl &operator=(SidcSymbolImpl &other) = delete;
|
|
/** @} */
|
|
|
|
/**
|
|
@name Overloaded functions from base class
|
|
@see AbstractMapObject
|
|
@{
|
|
*/
|
|
PositionCont positions() const override;
|
|
void setPositions(const PositionCont &posCont) override;
|
|
|
|
virtual PositionCont positionsTranslated() const;
|
|
virtual void setPositionsTranslated(const PositionCont &posCont);
|
|
|
|
LineStyle lineStyle() const override;
|
|
LineStyle &rLineStyle() override;
|
|
void setLineStyle(const LineStyle &lineStyle) override;
|
|
|
|
FillStyle fillStyle() const override;
|
|
FillStyle &rFillStyle() override;
|
|
void setFillStyle(const FillStyle &fillStyle) override;
|
|
|
|
float scale() const override;
|
|
void setScale(float scale) override;
|
|
/** @} */
|
|
|
|
const QString &sidc() const override;
|
|
void setSidc(const QString &) override;
|
|
|
|
const QColor &color() const override;
|
|
void setColor(const QColor &color = QColor(0, 0, 0, 0)) override;
|
|
|
|
const QMap<QString, QVariant> &attributeMap() const override;
|
|
void setAttributeMap(const QMap<QString, QVariant> &attrMap) override;
|
|
|
|
void defineSymbol(const QString &sidc,
|
|
const PositionCont &posCont,
|
|
const QMap<QString, QVariant> &attrMap,
|
|
const QColor &color = QColor(0, 0, 0, 0)) override;
|
|
|
|
/**
|
|
Overloaded from base class to implement the construction of GraphicalObjects.
|
|
*/
|
|
bool init(MapImpl *mapImpl, const QString &logicalLayerName = QStringLiteral("GraphicsLayer")) override;
|
|
|
|
void boundingBox(BoundingBox &bbox) const override;
|
|
|
|
protected:
|
|
|
|
/**
|
|
The function \c updateViewImplPre implementents how to begin transfer values to view. It is been called
|
|
after changing values from AbstractMapObject::updateView() before calling \c updateViewImplPre().
|
|
@see AbstractMapObject
|
|
*/
|
|
bool updateViewImplPre() override;
|
|
|
|
/**
|
|
The function \c updateViewImpl implementents how to transfer values to view. It is been called
|
|
after changing values from AbstractMapObject::updateView().
|
|
@see AbstractMapObject
|
|
*/
|
|
bool updateViewImpl() override;
|
|
|
|
friend class MapImpl;
|
|
|
|
|
|
QString m_sidc;
|
|
QColor m_color;
|
|
PositionsTranslated m_positions;
|
|
|
|
private:
|
|
|
|
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
|
|
|
}; /* SidcSymbolImpl */
|
|
|
|
|
|
|
|
} // namespace SituationMap
|
|
|