From 4d424b32f9e6b000dbd1077b84b78db2fab8d256 Mon Sep 17 00:00:00 2001 From: Joachim Wuttke <j.wuttke@fz-juelich.de> Date: Thu, 7 Dec 2023 22:21:08 +0100 Subject: [PATCH] initialize properties --- GUI/Model/Mask/MaskItems.cpp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/GUI/Model/Mask/MaskItems.cpp b/GUI/Model/Mask/MaskItems.cpp index ccb986b05c5..25e5464855e 100644 --- a/GUI/Model/Mask/MaskItems.cpp +++ b/GUI/Model/Mask/MaskItems.cpp @@ -119,9 +119,13 @@ RectangleItem::RectangleItem() { setMaskName("RectangleMask"); m_xLow.init("lower x", "lower x coordinate", 0, 4, - RealLimits::limited(0., 4091.), "lowX"); - m_xLow.init("lower x", "lower x coordinate", 0, 4, - RealLimits::limited(0., 4091.), "lowX"); + RealLimits::limited(0., 4091.), "xLow"); + m_xUp.init("lower x", "upper x coordinate", 0, 4, + RealLimits::limited(0., 4091.), "xUp"); + m_yLow.init("lower y", "lower y coordinate", 0, 4, + RealLimits::limited(0., 4091.), "yLow"); + m_yUp.init("lower y", "upper y coordinate", 0, 4, + RealLimits::limited(0., 4091.), "yUp"); } std::unique_ptr<IShape2D> RectangleItem::createShape() const @@ -239,7 +243,13 @@ std::unique_ptr<IShape2D> RegionOfInterestItem::createShape() const /* ------------------------------------------------------------------------- */ -PolygonPointItem::PolygonPointItem() = default; +PolygonPointItem::PolygonPointItem() +{ + m_posX.init("lower x", "x coordinate", 0, 4, + RealLimits::limited(0., 4091.), "xPos"); + m_posY.init("lower y", "y coordinate", 0, 4, + RealLimits::limited(0., 4091.), "yPos"); +} void PolygonPointItem::setPosX(double val) { @@ -368,6 +378,8 @@ void PolygonItem::readFrom(QXmlStreamReader* r) VerticalLineItem::VerticalLineItem() { setMaskName("VerticalLineMask"); + m_posX.init("lower x", "x coordinate", 0, 4, + RealLimits::limited(0., 4091.), "xPos"); } std::unique_ptr<IShape2D> VerticalLineItem::createShape() const @@ -424,6 +436,8 @@ void VerticalLineItem::readFrom(QXmlStreamReader* r) HorizontalLineItem::HorizontalLineItem() { setMaskName("HorizontalLineMask"); + m_posY.init("lower y", "y coordinate", 0, 4, + RealLimits::limited(0., 4091.), "yPos"); } std::unique_ptr<IShape2D> HorizontalLineItem::createShape() const @@ -480,6 +494,16 @@ void HorizontalLineItem::readFrom(QXmlStreamReader* r) EllipseItem::EllipseItem() { setMaskName("EllipseMask"); + m_xCenter.init("x center", "x center", 0, 4, + RealLimits::limited(0., 4091.), "xCenter"); + m_yCenter.init("y center", "y center", 0, 4, + RealLimits::limited(0., 4091.), "yCenter"); + m_xRadius.init("x radius", "x radius", 0, 4, + RealLimits::limited(0., 4091.), "xRadius"); + m_yRadius.init("y radius", "y radius", 0, 4, + RealLimits::limited(0., 4091.), "yRadius"); + m_angle.init("angle", "angle", 0, 4, + RealLimits::limited(0., 360.), "angle"); } std::unique_ptr<IShape2D> EllipseItem::createShape() const -- GitLab