Path: blob/main/src/netedit/frames/demand/GNEStopFrame.h
169684 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 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 GNEStopFrame.h14/// @author Pablo Alvarez Lopez15/// @date March 201916///17// The Widget for add Stops elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/frames/GNEFrame.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEAttributesEditor;29class GNEDemandElementSelector;30class GNETagSelector;31class MFXDynamicLabel;3233// ===========================================================================34// class definitions35// ===========================================================================3637class GNEStopFrame : public GNEFrame {3839public:4041// ===========================================================================42// class HelpCreation43// ===========================================================================4445class HelpCreation : public MFXGroupBoxModule {4647public:48/// @brief constructor49HelpCreation(GNEStopFrame* StopFrameParent);5051/// @brief destructor52~HelpCreation();5354/// @brief show HelpCreation55void showHelpCreation();5657/// @brief hide HelpCreation58void hideHelpCreation();5960/// @brief update HelpCreation61void updateHelpCreation();6263private:64/// @brief pointer to Stop Frame Parent65GNEStopFrame* myStopFrameParent;6667/// @brief Label with creation information68MFXDynamicLabel* myInformationLabel;69};7071/**@brief Constructor72* @brief viewParent GNEViewParent in which this GNEFrame is placed73* @brief viewNet viewNet that uses this GNEFrame74*/75GNEStopFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);7677/// @brief Destructor78~GNEStopFrame();7980/// @brief show Frame81void show();8283/**@brief add Stop element84* @param viewObjects collection of objects under cursor after click over view85* @param mouseButtonKeyPressed key pressed during click86* @return true if Stop was successfully added87*/88bool addStop(const GNEViewNetHelper::ViewObjectsSelector& viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed& mouseButtonKeyPressed);8990/// @brief get stop parameters91bool getStopParameter(const SumoXMLTag stopTag, const GNELane* lane, const GNEAdditional* stoppingPlace);9293/// @brief get stop parent selector94GNEDemandElementSelector* getStopParentSelector() const;9596protected:97/// @brief Tag selected in GNETagSelector98void tagSelected();99100/// @brief selected demand element in DemandElementSelector101void demandElementSelected();102103/// @brief last clicked position104Position myLastClickedPosition;105106private:107/// @brief stop parent base object108CommonXMLStructure::SumoBaseObject* myStopParentBaseObject = nullptr;109110/// @brief plan parameters111CommonXMLStructure::PlanParameters myPlanParameters;112113/// @brief Stop parent selectors114GNEDemandElementSelector* myStopParentSelector = nullptr;115116/// @brief stop tag selector selector (used to select diffent kind of Stops)117GNETagSelector* myStopTagSelector = nullptr;118119/// @brief attributes editor120GNEAttributesEditor* myAttributesEditor = nullptr;121122/// @brief Help creation123HelpCreation* myHelpCreation = nullptr;124};125126127