/** * @RDE_HEADER@ * Interface of AbstractMapObject * $Id$ * $HeadURL$ * $Author$ */ #pragma once // Own #include "situation_map_export.h" // Qt #include //---------------------------------------------------------------------------- namespace SituationMap { class Map; /** * @brief The OverlayHandler class handles overlays produced by the PlanEditor. */ class SITUATIONMAP_EXPORT OverlayHandler { public: OverlayHandler() = default; ///< Contructor virtual ~OverlayHandler() = default; ///< Destructor static OverlayHandler *create(Map *map); /*! \name Adding / Updating */ //@{ /** * @brief Add an Overlay. * @param key to associate the overlay with. Should not be less than 0. * @param name to use (displayname) * @param overlayContent to insert. * @param isSnapshot to ensure correct layer order. * @return True on success, otherwise false. */ virtual bool setOverlay(int key, const QString &name, const QByteArray &overlayContent, bool isSnapshot = false) = 0; virtual QByteArray content(int key) const = 0; virtual double minScale(int key) const = 0; virtual bool setMinScale(int key, double minScale) = 0; virtual double maxScale(int key) const = 0; virtual bool setMaxScale(int key, double maxScale) = 0; virtual double opacity(int key) const = 0; virtual bool setOpacity(int key, double opacity) = 0; //@} virtual bool reorderOverlays(const QVector &orderOfIds) = 0; /*! \name Visibility */ //@{ virtual bool setOverlayVisibility(int key, bool visibility) = 0; virtual bool overlayVisibility(int key) const = 0; //@} /*! \name Removing */ //@{ /** * @brief Remove an Overlay * @param key to be remove() * @return True on success, otherwise false. */ virtual bool removeOverlay(int key) = 0; virtual int removeAllOverlays() = 0; //@} /*! \name Retrieving */ //@{ virtual int overlayCount() const = 0; virtual QList overlays() const = 0; virtual bool containsOverlay(int key) const = 0; // QString getOverlay(int key); //@} }; } // namespace SituationMap