Path: blob/main/src/netedit/frames/GNEAttributesEditor.h
193674 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 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 get netedit attributes editor50GNEAttributesEditorType* getNeteditAttributesEditor() const;5152/// @brief check if current edited attributes are valid53bool checkAttributes(const bool showWarning);5455/// @brief fill sumo Base object56SumoXMLAttr fillSumoBaseObject(CommonXMLStructure::SumoBaseObject* baseObject) const;5758/// @name Functions related with selecting parents (only affect the Netedit Attributes editor)59/// @{60/// @brief check if we're selecting a parent clicking over view61bool isReparenting() const;6263/// @brief check if the given AC can be a new parent64bool checkNewParent(const GNEAttributeCarrier* AC) const;6566/// @brief set new parent67void setNewParent(const GNEAttributeCarrier* AC);6869/// @brief abort selecting parent70void abortReparenting();7172/// @}7374protected:75/// @brief basic attributes editor76GNEAttributesEditorType* myBasicAttributesEditor = nullptr;7778/// @brief extended attributes editor79GNEAttributesEditorType* myExtendedAttributesEditor = nullptr;8081/// @brief flow attributes editor82GNEAttributesEditorType* myFlowAttributesEditor = nullptr;8384/// @brief geo attributes editor85GNEAttributesEditorType* myGeoAttributesEditor = nullptr;8687/// @brief parameteres attributes editor88GNEAttributesEditorType* myParametersAttributesEditor = nullptr;8990/// @brief netedit attributes editor91GNEAttributesEditorType* myNeteditAttributesEditor = nullptr;9293private:94/// @brief Invalidated copy constructor.95GNEAttributesEditor(GNEAttributesEditor*) = delete;9697/// @brief Invalidated assignment operator.98GNEAttributesEditor& operator=(GNEAttributesEditor*) = delete;99};100101102