Path: blob/main/src/netedit/frames/GNEPathLegendModule.cpp
169678 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 GNEPathLegendModule.cpp14/// @author Pablo Alvarez Lopez15/// @date Mar 202216///17// Frame for path legends18/****************************************************************************/1920#include <netedit/GNEViewNet.h>21#include <netedit/frames/common/GNEInspectorFrame.h>22#include <utils/gui/div/GUIDesigns.h>2324#include "GNEPathLegendModule.h"2526// ===========================================================================27// method definitions28// ===========================================================================2930GNEPathLegendModule::GNEPathLegendModule(GNEFrame* frameParent) :31MFXGroupBoxModule(frameParent, TL("Information")) {32// declare label33FXLabel* legendLabel = nullptr;34// edge candidate35legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge candidate"), 0, GUIDesignLabel(JUSTIFY_LEFT));36legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.possible));37legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));38// last edge selected39legendLabel = new FXLabel(getCollapsableFrame(), TL(" last edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));40legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));41// edge selected42legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));43legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));44// edge conflict (vClass)45legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge conflict (vClass)"), 0, GUIDesignLabel(JUSTIFY_LEFT));46legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.special));47// edge disconnected48legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge disconnected"), 0, GUIDesignLabel(JUSTIFY_LEFT));49legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.conflict));50}515253GNEPathLegendModule::~GNEPathLegendModule() {}545556void57GNEPathLegendModule::showPathLegendModule() {58show();59}6061void62GNEPathLegendModule::hidePathLegendModule() {63hide();64}6566/****************************************************************************/676869