Path: blob/main/src/netedit/frames/GNEAttributesEditor.h
169678 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 GNEAttributesEditor.h14/// @author Pablo Alvarez Lopez15/// @date Feb 202516///17// pack of all GNEAttributesEditorTypes18/****************************************************************************/19#pragma once20#include <config.h>2122# include "GNEAttributesEditorType.h"2324// ===========================================================================25// class GNEAttributesEditor26// ===========================================================================2728class GNEAttributesEditor {2930public:31/// @brief constructor32GNEAttributesEditor(GNEFrame* frameParent, GNEAttributesEditorType::EditorType editorType);3334/// @brief edit attributes of the given AC (usually the edited template AC)35void showAttributesEditor(GNEAttributeCarrier* AC, const bool primaryAttributeEditor);3637/// @brief edit attributes of the given hash of ACs (usually the inspected ACs)38void showAttributesEditor(const std::unordered_set<GNEAttributeCarrier*>& ACs, const bool primaryAttributeEditor);3940/// @brief hide attribute editor41void hideAttributesEditor();4243/// @brief refresh attribute editor44void refreshAttributesEditor();4546/// @brief disable attribute editor47void disableAttributesEditor();4849/// @brief check if current edited attributes are valid50bool checkAttributes(const bool showWarning);5152/// @brief fill sumo Base object53SumoXMLAttr fillSumoBaseObject(CommonXMLStructure::SumoBaseObject* baseObject) const;5455/// @name Functions related with selecting parents (only affect the Netedit Attributes editor)56/// @{57/// @brief check if we're selecting a parent clicking over view58bool isReparenting() const;5960/// @brief check if the given AC can be a new parent61bool checkNewParent(const GNEAttributeCarrier* AC) const;6263/// @brief set new parent64void setNewParent(const GNEAttributeCarrier* AC);6566/// @brief abort selecting parent67void abortReparenting();6869/// @}7071protected:72/// @brief basic attributes editor73GNEAttributesEditorType* myBasicAttributesEditor = nullptr;7475/// @brief extended attributes editor76GNEAttributesEditorType* myExtendedAttributesEditor = nullptr;7778/// @brief flow attributes editor79GNEAttributesEditorType* myFlowAttributesEditor = nullptr;8081/// @brief geo attributes editor82GNEAttributesEditorType* myGeoAttributesEditor = nullptr;8384/// @brief parameteres attributes editor85GNEAttributesEditorType* myParametersAttributesEditor = nullptr;8687/// @brief netedit attributes editor88GNEAttributesEditorType* myNeteditAttributesEditor = nullptr;8990private:91/// @brief Invalidated copy constructor.92GNEAttributesEditor(GNEAttributesEditor*) = delete;9394/// @brief Invalidated assignment operator.95GNEAttributesEditor& operator=(GNEAttributesEditor*) = delete;96};979899