Path: blob/main/src/netedit/dialogs/elements/GNECalibratorDialog.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 GNECalibratorDialog.h14/// @author Pablo Alvarez Lopez15/// @date March 201716///17// Dialog for edit calibrators18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/changes/GNEChange_Additional.h>23#include <netedit/changes/GNEChange_DemandElement.h>24#include <netedit/dialogs/elements/lists/GNETemplateElementList.h>25#include <netedit/elements/additional/GNEAdditional.h>26#include <netedit/elements/demand/GNEDemandElement.h>2728#include "GNETemplateElementDialog.h"2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNECalibratorDialog : public GNETemplateElementDialog<GNEAdditional> {3536public:37/// @brief Constructor38GNECalibratorDialog(GNEAdditional* calibrator);3940/// @brief destructor41~GNECalibratorDialog();4243/// @brief run internal test44void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);4546/// @name FOX-callbacks47/// @{4849/// @brief event after press accept button50long onCmdAccept(FXObject*, FXSelector, void*);5152/// @brief event after press reset button53long onCmdReset(FXObject*, FXSelector, void*);5455/// @}5657protected:58/// @brief route list59class RoutesList : public GNETemplateElementList<GNEAdditional, GNEDemandElement, GNEChange_DemandElement> {6061public:62/// @brief constructor63RoutesList(GNECalibratorDialog* rerouterDialog, FXVerticalFrame* contentFrame);6465/// @brief add new element66long addNewElement();6768/// @brief open element dialog69long openElementDialog(const size_t rowIndex);7071private:72/// @brief Invalidated copy constructor73RoutesList(const RoutesList&) = delete;7475/// @brief Invalidated assignment operator76RoutesList& operator=(const RoutesList&) = delete;77};7879/// @brief vTypes list80class VTypesList : public GNETemplateElementList<GNEAdditional, GNEDemandElement, GNEChange_DemandElement> {8182public:83/// @brief constructor84VTypesList(GNECalibratorDialog* rerouterDialog, FXVerticalFrame* contentFrame);8586/// @brief add new element87long addNewElement();8889/// @brief open element dialog90long openElementDialog(const size_t rowIndex);9192private:93/// @brief Invalidated copy constructor94VTypesList(const VTypesList&) = delete;9596/// @brief Invalidated assignment operator97VTypesList& operator=(const VTypesList&) = delete;98};99100/// @brief calibrator flows list101class CalibratorFlowsList : public GNETemplateElementList<GNEAdditional, GNEAdditional, GNEChange_Additional> {102103public:104/// @brief constructor105CalibratorFlowsList(GNECalibratorDialog* rerouterDialog, FXVerticalFrame* contentFrame,106RoutesList* routesList, VTypesList* vTypesList);107108/// @brief add new element109long addNewElement();110111/// @brief open element dialog112long openElementDialog(const size_t rowIndex);113114protected:115/// @brief pointer to routes list116RoutesList* myRoutesList = nullptr;117118/// @brief pointer to vTypes list119VTypesList* myVTypesList = nullptr;120121private:122/// @brief Invalidated copy constructor123CalibratorFlowsList(const CalibratorFlowsList&) = delete;124125/// @brief Invalidated assignment operator126CalibratorFlowsList& operator=(const CalibratorFlowsList&) = delete;127};128129/// @brief list with routes130RoutesList* myRoutes;131132/// @brief list with vTypes133VTypesList* myVTypes;134135/// @brief list with calibrator flows136CalibratorFlowsList* myCalibratorFlows;137138private:139/// @brief Invalidated copy constructor.140GNECalibratorDialog(const GNECalibratorDialog&) = delete;141142/// @brief Invalidated assignment operator.143GNECalibratorDialog& operator=(const GNECalibratorDialog&) = delete;144};145146147