Path: blob/main/src/netedit/frames/data/GNETAZRelDataFrame.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 GNETAZRelDataFrame.h14/// @author Pablo Alvarez Lopez15/// @date May 202016///17// The Widget for add TAZRelationData elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEGenericDataFrame.h"232425// ===========================================================================26// class definitions27// ===========================================================================28/**29* @class GNETAZRelDataFrame30* The Widget for setting internal attributes of additional elements31*/32class GNETAZRelDataFrame : public GNEGenericDataFrame {3334public:35// ===========================================================================36// Confirm TAZ relation37// ===========================================================================3839class ConfirmTAZRelation : public MFXGroupBoxModule {40/// @brief FOX-declaration41FXDECLARE(GNETAZRelDataFrame::ConfirmTAZRelation)4243public:44/// @brief constructor45ConfirmTAZRelation(GNETAZRelDataFrame* TAZRelDataFrame);4647/// @brief destructor48~ConfirmTAZRelation();4950/// @brief called when user press confirm TAZ Relation button51long onCmdConfirmTAZRelation(FXObject*, FXSelector, void*);5253/// @brief called when TAZ Relation button is updated54long onUpdConfirmTAZRelation(FXObject*, FXSelector, void*);5556/// @brief called when user press clear TAZ Relation button57long onCmdClearSelection(FXObject*, FXSelector, void*);5859protected:60/// @brief FOX needs this61FOX_CONSTRUCTOR(ConfirmTAZRelation)6263private:64/// @brief pointer to TAZRelDataFrame parent65GNETAZRelDataFrame* myTAZRelDataFrame = nullptr;6667/// @brief confirm TAZ Button68FXButton* myConfirmTAZButton = nullptr;6970/// @brief clear TAZ Button71FXButton* myClearTAZButton = nullptr;72};7374// ===========================================================================75// class Legend76// ===========================================================================7778class Legend : public MFXGroupBoxModule {7980public:81/// @brief constructor82Legend(GNETAZRelDataFrame* TAZRelDataFrame);8384/// @brief destructor85~Legend();8687/// @brief set labels88void setLabels(const GNETAZ* fromTAZ, const GNETAZ* toTAZ);8990private:91/// @brief from TAZ label92FXLabel* myFromTAZLabel;9394/// @brief to TAZ Label95FXLabel* myToTAZLabel;96};9798/**@brief Constructor99* @brief viewParent GNEViewParent in which this GNEFrame is placed100* @brief viewNet viewNet that uses this GNETAZRelDataFrame101*/102GNETAZRelDataFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);103104/// @brief Destructor105~GNETAZRelDataFrame();106107/// @brief set clicked TAZ108bool setTAZ(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);109110/// @brief build TAZRelation data111void buildTAZRelationData();112113/// @brief get first selected TAZ Element114GNEAdditional* getFirstTAZ() const;115116/// @brief get first selected TAZ Element117GNEAdditional* getSecondTAZ() const;118119/// @brief clear TAZ selection120void clearTAZSelection();121122protected:123/// @brief first selected TAZ Element124GNETAZ* myFirstTAZ = nullptr;125126/// @brief first selected TAZ Element127GNETAZ* mySecondTAZ = nullptr;128129/// @brief confirm TAZ Relation130GNETAZRelDataFrame::ConfirmTAZRelation* myConfirmTAZRelation = nullptr;131132/// @brief TAZRel legend133GNETAZRelDataFrame::Legend* myLegend = nullptr;134135private:136/// @brief Invalidated copy constructor.137GNETAZRelDataFrame(const GNETAZRelDataFrame&) = delete;138139/// @brief Invalidated assignment operator.140GNETAZRelDataFrame& operator=(const GNETAZRelDataFrame&) = delete;141};142143/****************************************************************************/144145146