Path: blob/main/src/netedit/frames/demand/GNEContainerFrame.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 GNEContainerFrame.h14/// @author Pablo Alvarez Lopez15/// @date May 201916///17// The Widget for add container elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/frames/GNEFrame.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEAttributesEditor;29class GNEDemandElementSelector;30class GNEPlanCreator;31class GNEPlanCreatorLegend;32class GNEPlanSelector;33class GNETagSelector;3435// ===========================================================================36// class definitions37// ===========================================================================38/**39* @class GNEContainerFrame40*/41class GNEContainerFrame : public GNEFrame {4243public:44/**@brief Constructor45* @brief viewParent GNEViewParent in which this GNEFrame is placed46* @brief viewNet viewNet that uses this GNEFrame47*/48GNEContainerFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);4950/// @brief Destructor51~GNEContainerFrame();5253/// @brief show Frame54void show();5556/// @brief hide Frame57void hide();5859/**@brief add vehicle element60* @param viewObjects collection of objects under cursor after click over view61* @return true if vehicle was successfully added62*/63bool addContainer(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);6465/// @brief get plan creator module66GNEPlanCreator* getPlanCreator() const;6768/// @brief get Type selectors69GNEDemandElementSelector* getTypeSelector() const;7071/// @brief get containerPlan selector72GNEPlanSelector* getPlanSelector() const;7374/// @brief get attributes editor75GNEAttributesEditor* getContainerAttributesEditor() const;7677protected:78/// @brief Tag selected in GNETagSelector79void tagSelected();8081/// @brief selected demand element in DemandElementSelector82void demandElementSelected();8384/// @brief create path85bool createPath(const bool useLastRoute);8687private:88/// @brief container base object89CommonXMLStructure::SumoBaseObject* myContainerBaseObject = nullptr;9091/// @brief container tag selector (used to select diffent kind of containers)92GNETagSelector* myContainerTagSelector = nullptr;9394/// @brief Container Type selectors95GNEDemandElementSelector* myTypeSelector = nullptr;9697/// @brief containerPlan selector98GNEPlanSelector* myPlanSelector = nullptr;99100/// @brief attributes editor101GNEAttributesEditor* myContainerAttributesEditor = nullptr;102103/// @brief plan attributes editor104GNEAttributesEditor* myContainerPlanAttributesEditor = nullptr;105106/// @brief plan creator107GNEPlanCreator* myPlanCreator = nullptr;108109/// @brief plan creator legend110GNEPlanCreatorLegend* myPlanCreatorLegend = nullptr;111112/// @brief build container and return it (note: function includes a call to begin(...), but NOT a call to end(...))113GNEDemandElement* buildContainer();114};115116117