Path: blob/main/src/utils/gui/globjects/GUIPointOfInterest.h
193689 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIPointOfInterest.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date June 200618///19// missing_desc20/****************************************************************************/21#pragma once22#include <config.h>2324#include <string>25#include <utils/shapes/PointOfInterest.h>26#include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>27#include <utils/gui/settings/GUIVisualizationSettings.h>282930// ===========================================================================31// class definitions32// ===========================================================================33/*34* @class GUIPointOfInterest35* @brief The GUI-version of a point of interest36*/37class GUIPointOfInterest : public PointOfInterest, public GUIGlObject_AbstractAdd {3839public:40/** @brief Constructor41* @param[in] id The name of the POI42* @param[in] type The (abstract) type of the POI43* @param[in] color The color of the POI44* @param[in] pos The position of the POI45* @param[in[ geo use GEO coordinates (lon/lat)46* @param[in] lane The Lane in which this POI is placed47* @param[in] posOverLane The position over Lane48* @param[in] friendlyPos enable or disable friendlyPos49* @param[in] posLat The position lateral over Lane50* @param[in] icon The icon of the POI51* @param[in] layer The layer of the POI52* @param[in] angle The rotation of the POI53* @param[in] imgFile The raster image of the shape54* @param[in] width The width of the POI image55* @param[in] height The height of the POI image56*/57GUIPointOfInterest(const std::string& id, const std::string& type, const RGBColor& color,58const Position& pos, bool geo, const std::string& lane, double posOverLane,59bool friendlyPos, double posLat, const std::string& icon, double layer, double angle,60const std::string& imgFile, double width, double height);6162/// @brief Destructor63virtual ~GUIPointOfInterest();6465/// @name inherited from GUIGlObject66//@{6768/** @brief Returns an own popup-menu69*70* @param[in] app The application needed to build the popup-menu71* @param[in] parent The parent window needed to build the popup-menu72* @return The built popup-menu73* @see GUIGlObject::getPopUpMenu74*/75GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) override;7677/** @brief Returns an own parameter window78*79* @param[in] app The application needed to build the parameter window80* @param[in] parent The parent window needed to build the parameter window81* @return The built parameter window82* @see GUIGlObject::getParameterWindow83*/84GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override;8586/// @brief return exaggeration associated with this GLObject87double getExaggeration(const GUIVisualizationSettings& s) const override;8889/** @brief Returns the boundary to which the view shall be centered in order to show the object90*91* @return The boundary the object is within92* @see GUIGlObject::getCenteringBoundary93*/94Boundary getCenteringBoundary() const override;9596/** @brief Draws the object97* @param[in] s The settings for the current view (may influence drawing)98* @see GUIGlObject::drawGL99*/100void drawGL(const GUIVisualizationSettings& s) const override;101102double getClickPriority() const override {103return getShapeLayer();104}105106/// @brief Returns the name of the object (default "")107virtual const std::string getOptionalName() const override {108return getShapeName();109}110//@}111112/// @brief check if POI can be drawn113static bool checkDraw(const GUIVisualizationSettings& s, const GUIGlObject* o);114115/// @brief set POI color116static void setPOIColor(const GUIVisualizationSettings& s, const RGBColor& shapeColor, const GUIGlObject* o, const bool forceSelectionColor);117};118119120