Path: blob/main/src/netedit/frames/network/GNEAdditionalFrame.h
169686 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 GNEAdditionalFrame.h14/// @author Pablo Alvarez Lopez15/// @date Dec 201516///17// The Widget for add additional elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/frames/GNEFrame.h>23#include <netedit/GNEViewNetHelper.h>2425// ===========================================================================26// class declaration27// ===========================================================================2829class GNEAttributesEditor;30class GNEConsecutiveSelector;31class GNESelectorParent;32class GNETagSelector;33class GNEViewObjectSelector;3435// ===========================================================================36// class definitions37// ===========================================================================3839class GNEAdditionalFrame : public GNEFrame {4041public:42// ===========================================================================43// class EdgeTypeSelector44// ===========================================================================4546class E2MultilaneLegendModule : public MFXGroupBoxModule {4748public:49/// @brief constructor50E2MultilaneLegendModule(GNEFrame* frameParent);5152/// @brief destructor53~E2MultilaneLegendModule();5455/// @brief show Legend modul56void showE2MultilaneLegend();5758/// @brief hide Legend modul59void hideE2MultilaneLegend();60};6162// ===========================================================================63// class HelpCreationModule64// ===========================================================================6566class HelpCreationModule : public MFXGroupBoxModule {6768public:69/// @brief constructor70HelpCreationModule(GNEFrame* frameParent);7172/// @brief destructor73~HelpCreationModule();7475/// @brief show Legend modul76void showHelpCreationModule(SumoXMLTag XMLTag);7778/// @brief hide Legend modul79void hideHelpCreationModule();8081private:82/// @brief add translated string83std::string addTLString(const std::string& str);8485/// @brief help label86FXLabel* myHelpLabel = nullptr;8788/// @brief map with tags and their associated help89std::map<SumoXMLTag, std::string> myHelpMap;90};9192/**@brief Constructor93* @brief viewParent GNEViewParent in which this GNEFrame is placed94* @brief viewNet viewNet that uses this GNEFrame95*/96GNEAdditionalFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);9798/// @brief Destructor99~GNEAdditionalFrame();100101/// @brief show Frame102void show();103104/**@brief add additional element105* @param viewObjects collection of objects under cursor after click over view106* @return true if additional was successfully added107*/108bool addAdditional(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);109110/// @brief get additional tag selector111GNETagSelector* getAdditionalTagSelector() const;112113/// @brief get consecutive lane selector114GNEConsecutiveSelector* getConsecutiveLaneSelector() const;115116/// @brief get attribtues editor117GNEAttributesEditor* getAttributesEditor() const;118119/// @brief get module for select view objects120GNEViewObjectSelector* getViewObjetsSelector() const;121122/// @brief create path123bool createPath(const bool useLastRoute);124125protected:126/// @brief SumoBaseObject used for create additional127CommonXMLStructure::SumoBaseObject* myBaseAdditional = nullptr;128129/// @brief Tag selected in GNETagSelector130void tagSelected();131132/// @brief last clicked position133Position myLastClickedPosition;134135private:136// @brief reste base additional object137void resetBaseAdditionalObject();138139// @brief init baseAdditionalObject140bool initBaseAdditionalObject(const GNETagProperties* tagProperty, const GNEViewNetHelper::ViewObjectsSelector& viewObjects);141142/// @brief item selector143GNETagSelector* myAdditionalTagSelector = nullptr;144145/// @brief additional attributes editor146GNEAttributesEditor* myAdditionalAttributesEditor = nullptr;147148/// @brief Module for select a single parent additional149GNESelectorParent* mySelectorAdditionalParent = nullptr;150151/// @brief Module for select view objects152GNEViewObjectSelector* myViewObjetsSelector = nullptr;153154/// @brief Module for select consecutive lanes155GNEConsecutiveSelector* myConsecutiveLaneSelector = nullptr;156157/// @brief Module for show additional help legend158HelpCreationModule* myHelpCreationModule = nullptr;159160/// @brief Module for show E2 Detector legend161E2MultilaneLegendModule* myE2MultilaneLegendModule = nullptr;162};163164165