/** * @RDE_HEADER@ * Interface * $Id$ * $HeadURL$ * $Author$ */ #pragma once // Own #include "jump_point_model.h" #include "situation_map_export.h" #include #include #include // #include #include // Qt #include //---------------------------------------------------------------------------- namespace SituationMap { //Forward: class Map; namespace RB { class RubberbandBase; } //---------------------------------------------------------------------------- // JumpPointWidget //---------------------------------------------------------------------------- class SITUATIONMAP_EXPORT JumpPointWidget : public QWidget { Q_OBJECT using BaseClass = QWidget; public: explicit JumpPointWidget(const QString &layername, Map *map, const QString &debugInfo); virtual ~JumpPointWidget(); QStringList names(); QVector jumpPoints(); int count() const; bool contains(const QString &name); signals: void newName(const QString &name, const QPointF &coordGeo); public Q_SLOTS: void onGetPosition(); void onRubberbandApply(RB::RubberbandBase *rb); void askUserForName(const QPointF &coordGeo); void onName(const QString &name, const QPointF & coordGeo); void onJumpPointHovered(const QString &name, bool enter); void onTableViewClicked(const QModelIndex &index); void onTableViewSelectionChanged(const QModelIndex &index); bool addJumpPoint(const QString &name, const Point3D &originGeo, double mapScale = -1); bool addJumpPoint(const QString &name, const QPointF &originGeo, double mapScale = -1); bool centerMapToJumpPoint(const QString &name); bool removeJumpPoint(const QString &name); void removeJumpPointSelections(); bool setJumpPointSelected(const QString &name, bool selected = true); void onCustomContextMenuRequested(const QPoint &globalPos, const QModelIndex &indexSrc); void onRemoveAction(); void cleanup(); protected: bool event(QEvent *event) override; private: class Private; /** * The private d-pointer to not break BC when changing internals of this class */ Private *d = nullptr; LOGGER_T m_logger; ///< Interface of the Logging-Facility }; } // namespace SituationMap