Path: blob/main/src/netedit/frames/demand/GNEStopFrame.h
193741 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 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>23#include <netedit/frames/common/GNEGroupBoxModule.h>2425// ===========================================================================26// class declaration27// ===========================================================================2829class GNEAttributesEditor;30class GNEDemandElementSelector;31class GNETagSelector;32class MFXDynamicLabel;3334// ===========================================================================35// class definitions36// ===========================================================================3738class GNEStopFrame : public GNEFrame {3940public:4142// ===========================================================================43// class HelpCreation44// ===========================================================================4546class HelpCreation : public GNEGroupBoxModule {4748public:49/// @brief constructor50HelpCreation(GNEStopFrame* StopFrameParent);5152/// @brief destructor53~HelpCreation();5455/// @brief show HelpCreation56void showHelpCreation();5758/// @brief hide HelpCreation59void hideHelpCreation();6061/// @brief update HelpCreation62void updateHelpCreation();6364private:65/// @brief pointer to Stop Frame Parent66GNEStopFrame* myStopFrameParent;6768/// @brief Label with creation information69MFXDynamicLabel* myInformationLabel;70};7172/**@brief Constructor73* @brief viewParent GNEViewParent in which this GNEFrame is placed74* @brief viewNet viewNet that uses this GNEFrame75*/76GNEStopFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);7778/// @brief Destructor79~GNEStopFrame();8081/// @brief show Frame82void show();8384/**@brief add Stop element85* @param viewObjects collection of objects under cursor after click over view86* @param mouseButtonKeyPressed key pressed during click87* @return true if Stop was successfully added88*/89bool addStop(const GNEViewNetHelper::ViewObjectsSelector& viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed& mouseButtonKeyPressed);9091/// @brief get stop parameters92bool getStopParameter(const SumoXMLTag stopTag, const GNELane* lane, const GNEAdditional* stoppingPlace);9394/// @brief get stop parent selector95GNEDemandElementSelector* getStopParentSelector() const;9697protected:98/// @brief Tag selected in GNETagSelector99void tagSelected();100101/// @brief selected demand element in DemandElementSelector102void demandElementSelected();103104/// @brief last clicked position105Position myLastClickedPosition;106107private:108/// @brief stop parent base object109CommonXMLStructure::SumoBaseObject* myStopParentBaseObject = nullptr;110111/// @brief plan parameters112CommonXMLStructure::PlanParameters myPlanParameters;113114/// @brief Stop parent selectors115GNEDemandElementSelector* myStopParentSelector = nullptr;116117/// @brief stop tag selector selector (used to select diffent kind of Stops)118GNETagSelector* myStopTagSelector = nullptr;119120/// @brief attributes editor121GNEAttributesEditor* myAttributesEditor = nullptr;122123/// @brief Help creation124HelpCreation* myHelpCreation = nullptr;125};126127128