Skip to content
Snippets Groups Projects
Commit 4d424b32 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

initialize properties

parent 1569acf3
No related branches found
No related tags found
1 merge request!2211MaskEditorToolpanel now using DoubleSpinBox (#869...)
Pipeline #122842 failed
...@@ -119,9 +119,13 @@ RectangleItem::RectangleItem() ...@@ -119,9 +119,13 @@ RectangleItem::RectangleItem()
{ {
setMaskName("RectangleMask"); setMaskName("RectangleMask");
m_xLow.init("lower x", "lower x coordinate", 0, 4, m_xLow.init("lower x", "lower x coordinate", 0, 4,
RealLimits::limited(0., 4091.), "lowX"); RealLimits::limited(0., 4091.), "xLow");
m_xLow.init("lower x", "lower x coordinate", 0, 4, m_xUp.init("lower x", "upper x coordinate", 0, 4,
RealLimits::limited(0., 4091.), "lowX"); 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 std::unique_ptr<IShape2D> RectangleItem::createShape() const
...@@ -239,7 +243,13 @@ std::unique_ptr<IShape2D> RegionOfInterestItem::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) void PolygonPointItem::setPosX(double val)
{ {
...@@ -368,6 +378,8 @@ void PolygonItem::readFrom(QXmlStreamReader* r) ...@@ -368,6 +378,8 @@ void PolygonItem::readFrom(QXmlStreamReader* r)
VerticalLineItem::VerticalLineItem() VerticalLineItem::VerticalLineItem()
{ {
setMaskName("VerticalLineMask"); setMaskName("VerticalLineMask");
m_posX.init("lower x", "x coordinate", 0, 4,
RealLimits::limited(0., 4091.), "xPos");
} }
std::unique_ptr<IShape2D> VerticalLineItem::createShape() const std::unique_ptr<IShape2D> VerticalLineItem::createShape() const
...@@ -424,6 +436,8 @@ void VerticalLineItem::readFrom(QXmlStreamReader* r) ...@@ -424,6 +436,8 @@ void VerticalLineItem::readFrom(QXmlStreamReader* r)
HorizontalLineItem::HorizontalLineItem() HorizontalLineItem::HorizontalLineItem()
{ {
setMaskName("HorizontalLineMask"); setMaskName("HorizontalLineMask");
m_posY.init("lower y", "y coordinate", 0, 4,
RealLimits::limited(0., 4091.), "yPos");
} }
std::unique_ptr<IShape2D> HorizontalLineItem::createShape() const std::unique_ptr<IShape2D> HorizontalLineItem::createShape() const
...@@ -480,6 +494,16 @@ void HorizontalLineItem::readFrom(QXmlStreamReader* r) ...@@ -480,6 +494,16 @@ void HorizontalLineItem::readFrom(QXmlStreamReader* r)
EllipseItem::EllipseItem() EllipseItem::EllipseItem()
{ {
setMaskName("EllipseMask"); 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 std::unique_ptr<IShape2D> EllipseItem::createShape() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment