Path: blob/main/src/netedit/frames/demand/GNEPersonFrame.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 GNEPersonFrame.h14/// @author Pablo Alvarez Lopez15/// @date May 201916///17// The Widget for add person 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// ===========================================================================3839class GNEPersonFrame : public GNEFrame {4041public:42/**@brief Constructor43* @brief viewParent GNEViewParent in which this GNEFrame is placed44* @brief viewNet viewNet that uses this GNEFrame45*/46GNEPersonFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);4748/// @brief Destructor49~GNEPersonFrame();5051/// @brief show Frame52void show();5354/// @brief hide Frame55void hide();5657/**@brief add vehicle element58* @param viewObjects collection of objects under cursor after click over view59* @return true if vehicle was successfully added60*/61bool addPerson(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);6263/// @brief get plan creator module64GNEPlanCreator* getPlanCreator() const;6566/// @brief get Type selectors67GNEDemandElementSelector* getTypeSelector() const;6869/// @brief get personPlan selector70GNEPlanSelector* getPlanSelector() const;7172/// @brief get attributes creator73GNEAttributesEditor* getPersonAttributesEditor() const;7475protected:76/// @brief Tag selected in GNETagSelector77void tagSelected();7879/// @brief selected demand element in DemandElementSelector80void demandElementSelected();8182/// @brief create path83bool createPath(const bool useLastRoute);8485private:86/// @brief person base object87CommonXMLStructure::SumoBaseObject* myPersonBaseObject = nullptr;8889/// @brief person tag selector (used to select diffent kind of persons)90GNETagSelector* myPersonTagSelector = nullptr;9192/// @brief Person Type selectors93GNEDemandElementSelector* myTypeSelector = nullptr;9495/// @brief personPlan selector96GNEPlanSelector* myPlanSelector = nullptr;9798/// @brief person attributes editor99GNEAttributesEditor* myPersonAttributesEditor = nullptr;100101/// @brief person plan attributes editor102GNEAttributesEditor* myPersonPlanAttributesEditor = nullptr;103104/// @brief plan creator105GNEPlanCreator* myPlanCreator = nullptr;106107/// @brief plan creator legend108GNEPlanCreatorLegend* myPlanCreatorLegend = nullptr;109110/// @brief build person and return it (note: function includes a call to begin(...), but NOT a call to end(...))111GNEDemandElement* buildPerson();112};113114115