Path: blob/main/src/netedit/elements/moving/GNEMoveElementViewResizable.h
185790 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 GNEMoveElementViewResizable.h14/// @author Pablo Alvarez Lopez15/// @date Sep 202516///17// Class used for elements that can be moved over view and resized18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEMoveElementView.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class GNEMoveElementViewResizable : public GNEMoveElementView {2930public:31/// @brief attributes format32enum class ResizingFormat {33WIDTH_HEIGHT, /// @brief width and height34WIDTH_LENGTH, /// @brief width and length35};3637/// @brief constructor38GNEMoveElementViewResizable(GNEAttributeCarrier* element, AttributesFormat attributesFormat,39ResizingFormat resizingFormat, SumoXMLAttr posAttr,40Position& position);4142//// @brief empty destructor43~GNEMoveElementViewResizable();4445/**@brief get move operation46* @note returned GNEMoveOperation can be nullptr47*/48GNEMoveOperation* getMoveOperation() override;4950// temporal51//protected:52/// @brief shape width53PositionVector myShapeWidth;5455/// @brief shape height56PositionVector myShapeHeight;5758/// @brief variable used for moving geometry point contour up59GNEContour myMovingContourUp;6061/// @brief variable used for moving geometry point contour down62GNEContour myMovingContourDown;6364/// @brief variable used for moving geometry point contour left65GNEContour myMovingContourLeft;6667/// @brief variable used for moving geometry point contour right68GNEContour myMovingContourRight;6970private:71/// @brief check if width can be edited72const bool myEditWidth = false;7374/// @brief check if height can be edited75const bool myEditHeight = false;7677/// @brief check if length can be edited78const bool myEditLength = false;7980/// @brief set move shape81void setMoveShape(const GNEMoveResult& moveResult) override;8283/// @brief commit move shape84void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;8586/// @brief Invalidated copy constructor.87GNEMoveElementViewResizable(const GNEMoveElementViewResizable&) = delete;8889/// @brief Invalidated assignment operator.90GNEMoveElementViewResizable& operator=(const GNEMoveElementViewResizable&) = delete;91};929394