Path: blob/main/src/netedit/dialogs/fix/GNEFixNetworkElements.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 GNEFixNetworkElements.h14/// @author Pablo Alvarez Lopez15/// @date Jun 202216///17// Dialog used to fix network elements during saving18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEFixElementsDialog.h"2324// ===========================================================================25// class declarations26// ===========================================================================2728class GNENetworkElement;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEFixNetworkElements : public GNEFixElementsDialog<GNENetworkElement*> {3536public:37/// @brief groupbox for all radio buttons related with fix edges options38class FixEdgeOptions : public GNEFixElementsDialog::FixOptions {39/// @brief FOX-declaration40FXDECLARE(FixEdgeOptions)4142public:43/// @brief constructor44FixEdgeOptions(GNEFixNetworkElements* fixNetworkElementsParent);4546/// @brief select internal test solution47void selectInternalTestSolution(const std::string& solution);4849/// @brief apply selected fix option50bool applyFixOption();5152/// @name FOX-callbacks53/// @{5455/// @brief called when user select a option56long onCmdSelectOption(FXObject* obj, FXSelector, void*);5758/// @}5960protected:61/// @brief FOX needs this62FOX_CONSTRUCTOR(FixEdgeOptions)6364/// @brief Option "Remove invalid edges"65FXRadioButton* myRemoveInvalidEdges = nullptr;6667/// @brief Option "Save invalid edges"68FXRadioButton* mySaveInvalidEdges = nullptr;6970/// @brief Option "Select invalid edges and cancel"71FXRadioButton* mySelectInvalidEdges = nullptr;7273private:74/// @brief Invalidated copy constructor.75FixEdgeOptions(const FixEdgeOptions&) = delete;7677/// @brief Invalidated assignment operator.78FixEdgeOptions& operator=(const FixEdgeOptions&) = delete;79};8081/// @brief groupbox for all radio buttons related with fix crossing options82class FixCrossingOptions : public GNEFixElementsDialog::FixOptions {83/// @brief FOX-declaration84FXDECLARE(FixCrossingOptions)8586public:87/// @brief constructor88FixCrossingOptions(GNEFixNetworkElements* fixNetworkElementsParent);8990/// @brief select internal test solution91void selectInternalTestSolution(const std::string& solution);9293/// @brief apply selected fix option94bool applyFixOption();9596/// @name FOX-callbacks97/// @{9899/// @brief called when user select a option100long onCmdSelectOption(FXObject* obj, FXSelector, void*);101102/// @}103104protected:105/// @brief FOX needs this106FOX_CONSTRUCTOR(FixCrossingOptions)107108/// @brief Option "remove invalid elements"109FXRadioButton* myRemoveInvalidCrossings = nullptr;110111/// @brief Option "save invalid crossings"112FXRadioButton* mySaveInvalidCrossings = nullptr;113114/// @brief Option "Select invalid crossings and cancel"115FXRadioButton* mySelectInvalidCrossings = nullptr;116117private:118/// @brief Invalidated copy constructor.119FixCrossingOptions(const FixCrossingOptions&) = delete;120121/// @brief Invalidated assignment operator.122FixCrossingOptions& operator=(const FixCrossingOptions&) = delete;123};124125/// @brief Constructor126GNEFixNetworkElements(GNEApplicationWindow* mainWindow,127const std::vector<GNENetworkElement*>& elements);128129/// @brief destructor130~GNEFixNetworkElements();131132/// @name FOX-callbacks133/// @{134135/// @brief event when user select a option136long onCmdSelectOption(FXObject* obj, FXSelector, void*);137138/// @}139140protected:141/// @brief fix edge options142FixEdgeOptions* myFixEdgeOptions = nullptr;143144/// @brief fix crossing options145FixCrossingOptions* myFixCrossingOptions = nullptr;146147private:148/// @brief Invalidated copy constructor.149GNEFixNetworkElements(const GNEFixNetworkElements&) = delete;150151/// @brief Invalidated assignment operator.152GNEFixNetworkElements& operator=(const GNEFixNetworkElements&) = delete;153};154155156