137 lines
3.7 KiB
C++
Executable File
137 lines
3.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ViewshedParameter
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Own
|
|
#include "symbol_dictionary_types.h"
|
|
#include "advanced_symbology_export.h"
|
|
|
|
|
|
// Qt
|
|
#include <QString>
|
|
#include <QColor>
|
|
#include <QSet>
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
namespace AdvancedSymbology
|
|
{
|
|
|
|
//----------------------------------------------------------------------------
|
|
/**
|
|
* @brief The AdditionalSymbolType enum
|
|
*/
|
|
enum class AdditionalSymbolType
|
|
{
|
|
NbcProtection, ///< Line at top left.
|
|
Manipulation, ///< Black and white dashed lines at bottom (1st of three)
|
|
NoPosition, ///< Red line at bottom (2nd of three)
|
|
BiteError ///< Yellow line at bottom. (3rd of three)
|
|
};
|
|
QString ADVANCED_SYMBOLOGY_EXPORT toString(AdditionalSymbolType);
|
|
|
|
// enable usage as key (e.g. QSet<AdditionalSymbolType>)
|
|
inline uint qHash(AdditionalSymbolType type)
|
|
{
|
|
return ::qHash(static_cast<int>(type));
|
|
}
|
|
using AdditionalSymbolTypeCont = QSet<AdditionalSymbolType>;
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
/**
|
|
* @brief The injury enum
|
|
*/
|
|
enum class Injury
|
|
{
|
|
NoInjury, ///< ""
|
|
Hit, ///< "-"
|
|
MobilityKill, ///< "\"
|
|
WeaponKill, ///< "/"
|
|
TotalKill ///< "/\"
|
|
};
|
|
QString toString(Injury value);
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
/**
|
|
* @brief The SymbolDataToRender struct contains all data usefull to render
|
|
* an advanced symbol.
|
|
*/
|
|
class ADVANCED_SYMBOLOGY_EXPORT SymbolDataToRender
|
|
{
|
|
public:
|
|
explicit SymbolDataToRender(const QString &_sidc = QString(), int _sizeL = 100);
|
|
|
|
void init();
|
|
|
|
QString sidcAccordingRole() const;
|
|
|
|
public:
|
|
QString sidc;
|
|
|
|
Role role;
|
|
|
|
int sizeL;
|
|
|
|
// QColor lineColor = Qt::black; // not supported by esri yet
|
|
QColor fillColor;
|
|
bool fillColorReplace;
|
|
|
|
bool marking;
|
|
|
|
Injury injury;
|
|
QColor injuryColor;
|
|
|
|
AdditionalSymbolTypeCont additionalSymbols; // noPos, Manip...
|
|
|
|
static QColor unknownColor()
|
|
{
|
|
return QColor(255, 255, 0); // 10012500002108000000@Mil2525D: color = QColor(255, 255, 0);
|
|
}
|
|
|
|
|
|
QString toString() const;
|
|
|
|
bool operator==(const SymbolDataToRender &o) const;
|
|
bool operator!=(const SymbolDataToRender &o) const;
|
|
|
|
// just for internal use :
|
|
friend class SymbolDictionaryImpl;
|
|
friend class EsriDictionaryProcessor;
|
|
private:
|
|
QString spiOriginalKey; // spi = symbolPropertyImage
|
|
int spiSizeL = 100; // spi = symbolPropertyImage
|
|
bool renderJustCoreImage = false;
|
|
// : just for internal use
|
|
};
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// output operator:
|
|
//-----------------------------------------------------------------------------
|
|
ADVANCED_SYMBOLOGY_EXPORT std::ostream &operator<< (std::ostream &stream,
|
|
const AdvancedSymbology::AdditionalSymbolType &value);
|
|
|
|
ADVANCED_SYMBOLOGY_EXPORT std::ostream &operator<< (std::ostream &stream,
|
|
const AdvancedSymbology::AdditionalSymbolTypeCont &value);
|
|
|
|
ADVANCED_SYMBOLOGY_EXPORT std::ostream &operator<< (std::ostream &stream,
|
|
const AdvancedSymbology::Injury &value);
|
|
|
|
ADVANCED_SYMBOLOGY_EXPORT std::ostream &operator<< (std::ostream &stream,
|
|
const AdvancedSymbology::SymbolDataToRender &value);
|
|
|
|
} // namespace AdvancedSymbology
|
|
|
|
|
|
|