Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GraphicalObjectText
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Own
|
||||
#include "abstract_graphical_object.h"
|
||||
#include <Map/text_style.h>
|
||||
#include <Map/situation_map_utils.h>
|
||||
#include <Common/simple_value.h>
|
||||
#include <Common/situation_map_logging.h>
|
||||
|
||||
|
||||
// Esri
|
||||
|
||||
|
||||
// Qt
|
||||
|
||||
|
||||
// forward:
|
||||
namespace Esri
|
||||
{
|
||||
namespace ArcGISRuntime
|
||||
{
|
||||
class Graphic;
|
||||
class GraphicsOverlay;
|
||||
class PictureMarkerSymbol;
|
||||
class TextSymbol;
|
||||
|
||||
enum class HorizontalAlignment;
|
||||
enum class VerticalAlignment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
|
||||
class SITUATIONMAP_EXPORT GraphicalObjectText : public AbstractGraphicalObject
|
||||
{
|
||||
|
||||
using BaseClass = AbstractGraphicalObject;
|
||||
|
||||
public:
|
||||
GraphicalObjectText(const Esri::ArcGISRuntime::GeoView *geoView
|
||||
, Esri::ArcGISRuntime::GraphicsOverlay *graphicsLayer
|
||||
, const QString &debugInfo
|
||||
, const UniqueMapId &uniqueMapId
|
||||
);
|
||||
|
||||
~GraphicalObjectText();
|
||||
|
||||
QString toString() const override; // specialized
|
||||
|
||||
// Data access:
|
||||
QString text() const;
|
||||
void setText(const QString &text);
|
||||
|
||||
TextStyle textStyle() const;
|
||||
TextStyle &rTextStyle();
|
||||
void setTextStyle(const TextStyle &textStyle);
|
||||
|
||||
// Offset
|
||||
virtual float xOffset() const;
|
||||
virtual void setXOffset(float xOffset);
|
||||
virtual float yOffset() const;
|
||||
virtual void setYOffset(float yOffset);
|
||||
|
||||
static Esri::ArcGISRuntime::HorizontalAlignment convert(const HorizontalAlignment horizontalAlignment);
|
||||
static Esri::ArcGISRuntime::VerticalAlignment convert(const VerticalAlignment verticalAlignment);
|
||||
|
||||
|
||||
protected:
|
||||
// Internal/Admin
|
||||
bool create() override;
|
||||
|
||||
bool changed() override
|
||||
{
|
||||
return BaseClass::changed()
|
||||
|| m_text.changed()
|
||||
|| m_textStyle.changed()
|
||||
|| m_offset.changed();
|
||||
}
|
||||
|
||||
void resetChanged() override
|
||||
{
|
||||
BaseClass::resetChanged();
|
||||
m_text.reset();
|
||||
m_textStyle.reset();
|
||||
m_offset.reset();
|
||||
}
|
||||
|
||||
bool updateViewImpl() override;
|
||||
|
||||
Esri::ArcGISRuntime::TextSymbol *m_textSymbol = nullptr;
|
||||
|
||||
SimpleValue<QString> m_text; ///< to be displayed on map
|
||||
SimpleValue<TextStyle> m_textStyle;
|
||||
SimpleValue<QPointF> m_offset; ///< Offset (pixel).
|
||||
|
||||
private:
|
||||
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
||||
|
||||
// Forbid some overloaded methods without effects of this object;
|
||||
virtual PositionCont positions() const override
|
||||
{
|
||||
return PositionCont();
|
||||
}
|
||||
virtual void setPositions(const PositionCont &posCont) override
|
||||
{
|
||||
Q_UNUSED(posCont);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace SituationMap
|
||||
|
||||
Reference in new issue
Block a user