Path: blob/main/src/netedit/frames/network/GNEWireFrame.h
169686 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2021-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 GNEWireFrame.h14/// @author Pablo Alvarez Lopez15/// @date Nov 202116///17// The Widget for editing wires18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/frames/GNEFrame.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNETagSelector;29class GNEAttributesEditor;30class GNESelectorParent;31class GNEConsecutiveSelector;3233// ===========================================================================34// class definitions35// ===========================================================================3637class GNEWireFrame : public GNEFrame {3839public:40/**@brief Constructor41* @brief viewParent GNEViewParent in which this GNEFrame is placed42* @brief viewNet viewNet that uses this GNEFrame43*/44GNEWireFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);4546/// @brief Destructor47~GNEWireFrame();4849/// @brief show wire frame50void show();5152/**@brief add wire element53* @param viewObjects collection of objects under cursor after click over view54* @return true if wire was successfully added55*/56bool addWire(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);5758/// @brief get consecutive lane selector59GNEConsecutiveSelector* getConsecutiveLaneSelector() const;6061/// @brief create path62bool createPath(const bool useLastRoute);6364protected:65/// @brief SumoBaseObject used for create wire66CommonXMLStructure::SumoBaseObject* myBaseWire = nullptr;6768/// @brief Tag selected in GNETagSelector69void tagSelected();7071private:72// @brief create baseWireObject73bool createBaseWireObject(const GNETagProperties* tagProperty);7475/// @brief build wire over view76bool buildWireOverView(const GNETagProperties* tagProperty);7778/// @brief item selector79GNETagSelector* myWireTagSelector = nullptr;8081/// @brief internal wire attributes82GNEAttributesEditor* myWireAttributesEditor = nullptr;8384/// @brief Select wire parent85GNESelectorParent* mySelectorWireParent = nullptr;8687/// @brief Module for select consecutive lanes88GNEConsecutiveSelector* myConsecutiveLaneSelector = nullptr;8990/// @brief Warn about experimental state91bool myWarnedExperimental = false;92};939495