/****************************************************************************/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 GNEVClassesDialog.h14/// @author Pablo Alvarez Lopez15/// @date Feb 201716///17// Dialog for edit allow VClass attribute18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/common/SUMOVehicleClass.h>2324#include "GNEDialog.h"2526// ===========================================================================27// class definitions28// ===========================================================================2930class GNEAttributeCarrier;3132// ===========================================================================33// class definitions34// ===========================================================================3536class GNEVClassesDialog : public GNEDialog {37/// @brief FOX-declaration38FXDECLARE(GNEVClassesDialog)3940public:41/// @brief vclass row42class VClassRow : protected FXHorizontalFrame {43/// @brief FOX-declaration44FXDECLARE(VClassRow)4546public:47/// @brief Constructor48VClassRow(FXVerticalFrame* contentsFrame, SUMOVehicleClass vClass,49GUIIcon vClassIcon, const std::string& description);5051/// @brief destructor52~VClassRow();5354/// @brief get vclass in string format55const std::string& getVClassString() const;5657/// @brief set vClass button status58void setVClassButtonStatus(const bool enabled);5960/// @brief check if vClass button is enabled61bool isVClassButtonEnabled() const;6263/// @name FOX-callbacks64/// @{6566/// @brief event when user toogle the vClass button67long onCmdToggleVClass(FXObject*, FXSelector, void*);6869/// @}7071protected:72/// @brief FOX need this73FOX_CONSTRUCTOR(VClassRow)7475/// @brief vclass button76FXButton* myVClassButton = nullptr;7778/// @brief vclass in string format79const std::string myVClassString;8081private:82/// @brief Invalidated copy constructor.83VClassRow(const VClassRow&) = delete;8485/// @brief Invalidated assignment operator.86VClassRow& operator=(const VClassRow&) = delete;87};8889/// @brief Constructor90GNEVClassesDialog(GNEApplicationWindow* mainWindow, SumoXMLAttr attr,91const std::string originalVClasses);9293/// @brief destructor94~GNEVClassesDialog();9596/// @brief run internal test97void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);9899/// @brief get vClasses modified by this dialog100std::string getModifiedVClasses() const;101102/// @name FOX-callbacks103/// @{104105/// @brief event when user press select all VClasses button106long onCmdSelectAll(FXObject*, FXSelector, void*);107108/// @brief event when user press unselect all VClasses button109long onCmdUnselectAll(FXObject*, FXSelector, void*);110111/// @brief event when user press select only road button112long onCmdSelectOnlyRoad(FXObject*, FXSelector, void*);113114/// @brief event when user press select only rail button115long onCmdSelectOnlyRail(FXObject*, FXSelector, void*);116117/// @brief event after press accept button118long onCmdAccept(FXObject*, FXSelector, void*);119120/// @brief event after press cancel button121long onCmdCancel(FXObject*, FXSelector, void*);122123/// @brief event after press reset button124long onCmdReset(FXObject*, FXSelector, void*);125126/// @}127128protected:129/// @brief FOX need this130FOX_CONSTRUCTOR(GNEVClassesDialog)131132/// @brief original vClasses (used for reset)133const std::string myOriginalVClasses;134135/// @brief edited vClasses136std::string myEditedVClasses;137138/// @brief map with the buttons for every VClass139std::map<SUMOVehicleClass, VClassRow* > myVClassMap;140141private:142/// @brief Invalidated copy constructor.143GNEVClassesDialog(const GNEVClassesDialog&) = delete;144145/// @brief Invalidated assignment operator.146GNEVClassesDialog& operator=(const GNEVClassesDialog&) = delete;147};148149150