Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GraphicalObjectPath
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Own
|
||||
#include "graphical_object_path.h"
|
||||
|
||||
|
||||
// Esri
|
||||
|
||||
|
||||
// Qt
|
||||
#include <QMap>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
|
||||
|
||||
class SITUATIONMAP_EXPORT GraphicalObjectMultiPath : public AbstractGraphicalObject
|
||||
{
|
||||
|
||||
using BaseClass = AbstractGraphicalObject;
|
||||
|
||||
public:
|
||||
|
||||
GraphicalObjectMultiPath(const GraphicalObjectPathType type
|
||||
, const Esri::ArcGISRuntime::GeoView *geoView
|
||||
, Esri::ArcGISRuntime::GraphicsOverlay *graphicsLayer
|
||||
, const QString &debugInfo
|
||||
, UniqueMapId uniqueMapId);
|
||||
|
||||
~GraphicalObjectMultiPath();
|
||||
|
||||
GraphicalObjectPathType pathType() const
|
||||
{
|
||||
return m_pathType;
|
||||
}
|
||||
|
||||
virtual PositionCont path(int pathIndex) const;
|
||||
virtual void setPath(int pathIndex, const PositionCont &positions);
|
||||
|
||||
/*! \name Subsidiary polyline/polygons */
|
||||
//@{
|
||||
virtual void clearPath(int pathIndex);
|
||||
virtual void clearAllPaths();
|
||||
virtual QList<int> pathIndexInUse();
|
||||
virtual void reduceTo(const QList<int> &remainingPathIndexes);
|
||||
//@}
|
||||
|
||||
protected:
|
||||
// Internal/Admin
|
||||
bool updatePositions();
|
||||
bool changed() override
|
||||
{
|
||||
bool baseClassChanged = BaseClass::changed();
|
||||
if (baseClassChanged)
|
||||
return true;
|
||||
|
||||
for (const SimpleValue<PositionCont> &posData : qAsConst(m_positionsCont))
|
||||
{
|
||||
if (posData.changed())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void resetChanged() override
|
||||
{
|
||||
BaseClass::resetChanged();
|
||||
|
||||
for (SimpleValue<PositionCont> &posData : m_positionsCont)
|
||||
posData.reset();
|
||||
}
|
||||
|
||||
bool create() override;
|
||||
bool updateViewImpl() override;
|
||||
|
||||
// logical
|
||||
const GraphicalObjectPathType m_pathType;
|
||||
//bool updatePositions();
|
||||
|
||||
private:
|
||||
// Attention: will contain 'positions' of idx == 1 and higher :
|
||||
bool hasPosCont(int idx) const;
|
||||
SimpleValue<PositionCont> &getPosCont(int idx);
|
||||
const SimpleValue<PositionCont> getPosCont(int idx) const;
|
||||
|
||||
QMap<int, SimpleValue<PositionCont> > m_positionsCont;
|
||||
// : Attention: will contain 'positions' of idx == 1 and higher
|
||||
|
||||
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace SituationMap
|
||||
|
||||
Reference in new issue
Block a user