2017-10-15 11:25:20 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vplacelabelitem.cpp
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 15 10, 2017
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentina project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2017 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2017-10-15 11:25:20 +02:00
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
#include "vplacelabelitem.h"
|
|
|
|
#include "vplacelabelitem_p.h"
|
|
|
|
#include "../vpatterndb/vcontainer.h"
|
2017-10-23 11:33:54 +02:00
|
|
|
#include "varc.h"
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2018-12-11 11:55:03 +01:00
|
|
|
#include <qnumeric.h>
|
2017-10-15 11:25:20 +02:00
|
|
|
#include <QPolygonF>
|
|
|
|
#include <QTransform>
|
2020-07-10 19:15:19 +02:00
|
|
|
#include <QPainterPath>
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPlaceLabelItem::VPlaceLabelItem()
|
|
|
|
: VPointF(), d(new VPlaceLabelItemData)
|
|
|
|
{
|
|
|
|
setType(GOType::PlaceLabel);
|
|
|
|
setMode(Draw::Modeling);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPlaceLabelItem::VPlaceLabelItem(const VPlaceLabelItem &item)
|
|
|
|
: VPointF(item), d(item.d)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPlaceLabelItem::~VPlaceLabelItem()
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString VPlaceLabelItem::GetWidthFormula() const
|
|
|
|
{
|
|
|
|
return d->width;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString &VPlaceLabelItem::GetWidthFormula()
|
|
|
|
{
|
|
|
|
return d->width;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
qreal VPlaceLabelItem::GetWidth() const
|
|
|
|
{
|
|
|
|
return d->wValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetWidth(qreal value, const QString &formula)
|
|
|
|
{
|
|
|
|
d->wValue = value;
|
|
|
|
d->width = formula;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString VPlaceLabelItem::GetHeightFormula() const
|
|
|
|
{
|
|
|
|
return d->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString &VPlaceLabelItem::GetHeightFormula()
|
|
|
|
{
|
|
|
|
return d->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
qreal VPlaceLabelItem::GetHeight() const
|
|
|
|
{
|
|
|
|
return d->hValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetHeight(qreal value, const QString &formula)
|
|
|
|
{
|
|
|
|
d->hValue = value;
|
|
|
|
d->height = formula;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString VPlaceLabelItem::GetAngleFormula() const
|
|
|
|
{
|
|
|
|
return d->angle;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString &VPlaceLabelItem::GetAngleFormula()
|
|
|
|
{
|
|
|
|
return d->angle;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
qreal VPlaceLabelItem::GetAngle() const
|
|
|
|
{
|
|
|
|
return d->aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetAngle(qreal value, const QString &formula)
|
|
|
|
{
|
|
|
|
d->aValue = value;
|
|
|
|
d->angle = formula;
|
|
|
|
}
|
|
|
|
|
2018-07-20 09:30:05 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString VPlaceLabelItem::GetVisibilityTrigger() const
|
|
|
|
{
|
|
|
|
return d->visibilityTrigger;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QString &VPlaceLabelItem::GetVisibilityTrigger()
|
|
|
|
{
|
|
|
|
return d->visibilityTrigger;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool VPlaceLabelItem::IsVisible() const
|
|
|
|
{
|
|
|
|
bool visible = true;
|
|
|
|
|
|
|
|
if (qIsInf(d->isVisible) || qIsNaN(d->isVisible))
|
|
|
|
{
|
|
|
|
qWarning() << QObject::tr("Visibility trigger contains error and will be ignored");
|
|
|
|
}
|
|
|
|
else if (qFuzzyIsNull(d->isVisible))
|
|
|
|
{
|
|
|
|
visible = false;
|
|
|
|
}
|
|
|
|
return visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetVisibilityTrigger(qreal visible, const QString &formula)
|
|
|
|
{
|
|
|
|
d->visibilityTrigger = formula;
|
|
|
|
d->isVisible = visible;
|
|
|
|
}
|
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
qreal VPlaceLabelItem::GetCorrectionAngle() const
|
|
|
|
{
|
|
|
|
return d->correctionAngle;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetCorrectionAngle(qreal value)
|
|
|
|
{
|
|
|
|
d->correctionAngle = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
quint32 VPlaceLabelItem::GetCenterPoint() const
|
|
|
|
{
|
|
|
|
return d->centerPoint;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetCenterPoint(quint32 id)
|
|
|
|
{
|
|
|
|
d->centerPoint = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
PlaceLabelType VPlaceLabelItem::GetLabelType() const
|
|
|
|
{
|
|
|
|
return d->type;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void VPlaceLabelItem::SetLabelType(PlaceLabelType type)
|
|
|
|
{
|
|
|
|
d->type = type;
|
|
|
|
}
|
|
|
|
|
2019-05-27 13:54:44 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QTransform VPlaceLabelItem::RotationMatrix() const
|
|
|
|
{
|
|
|
|
QTransform t;
|
|
|
|
t.translate(x(), y());
|
|
|
|
t.rotate(-d->aValue-d->correctionAngle);
|
|
|
|
t.translate(-x(), -y());
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QRectF VPlaceLabelItem::Box() const
|
|
|
|
{
|
|
|
|
return QRectF(0, 0, d->wValue, d->hValue);
|
|
|
|
}
|
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPlaceLabelItem &VPlaceLabelItem::operator=(const VPlaceLabelItem &item)
|
|
|
|
{
|
|
|
|
if ( &item == this )
|
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
VPointF::operator=(item);
|
|
|
|
d = item.d;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2019-12-30 12:00:57 +01:00
|
|
|
#ifdef Q_COMPILER_RVALUE_REFS
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2019-12-30 16:13:18 +01:00
|
|
|
VPlaceLabelItem::VPlaceLabelItem(const VPlaceLabelItem &&item) Q_DECL_NOTHROW
|
|
|
|
: VPointF(item), d(item.d)
|
|
|
|
{}
|
2019-12-30 12:00:57 +01:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2019-12-30 16:13:18 +01:00
|
|
|
VPlaceLabelItem &VPlaceLabelItem::operator=(VPlaceLabelItem &&item) Q_DECL_NOTHROW
|
2019-12-30 12:00:57 +01:00
|
|
|
{
|
2019-12-30 16:13:18 +01:00
|
|
|
VPointF::operator=(item);
|
2019-12-30 12:00:57 +01:00
|
|
|
std::swap(d, item.d);
|
2019-12-30 16:13:18 +01:00
|
|
|
return *this;
|
2019-12-30 12:00:57 +01:00
|
|
|
}
|
2019-12-30 16:13:18 +01:00
|
|
|
#endif
|
2019-12-30 12:00:57 +01:00
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2017-10-24 11:02:47 +02:00
|
|
|
PlaceLabelImg VPlaceLabelItem::LabelShape() const
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2019-05-27 13:54:44 +02:00
|
|
|
QTransform t = RotationMatrix();
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto SegmentShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
|
|
|
QPolygonF shape;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape << QPointF(x(), y() - d->hValue/2.0) << QPointF(x(), y() + d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto RectangleShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-24 11:02:47 +02:00
|
|
|
QRectF rect(QPointF(x() - d->wValue/2.0, y() - d->hValue/2.0),
|
|
|
|
QPointF(x() + d->wValue/2.0, y() + d->hValue/2.0));
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape;
|
|
|
|
shape << rect.topLeft() << rect.topRight() << rect.bottomRight() << rect.bottomLeft() << rect.topLeft();
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto CrossShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
|
|
|
QPolygonF shape1;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape1 << QPointF(x(), y() - d->hValue/2.0)
|
|
|
|
<< QPointF(x(), y() + d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape2;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape2 << QPointF(x() - d->wValue/2.0, y())
|
|
|
|
<< QPointF(x() + d->wValue/2.0, y());
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto TshapedShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-24 11:02:47 +02:00
|
|
|
QPointF center2(x(), y() + d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape1;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape1 << QPointF(x(), y()) << center2;
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape2;
|
|
|
|
shape2 << QPointF(center2.x() - d->wValue/2.0, center2.y())
|
|
|
|
<< QPointF(center2.x() + d->wValue/2.0, center2.y());
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto DoubletreeShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-24 11:02:47 +02:00
|
|
|
QRectF rect(QPointF(x() - d->wValue/2.0, y() - d->hValue/2.0),
|
|
|
|
QPointF(x() + d->wValue/2.0, y() + d->hValue/2.0));
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape1;
|
|
|
|
shape1 << rect.topLeft() << rect.bottomRight();
|
|
|
|
|
|
|
|
QPolygonF shape2;
|
|
|
|
shape2 << rect.topRight() << rect.bottomLeft();
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto CornerShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
|
|
|
QPolygonF shape1;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape1 << QPointF(x(), y()) << QPointF(x(), y() + d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape2;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape2 << QPointF(x() - d->wValue/2.0, y()) << QPointF(x(), y());
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto TriangleShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-24 11:02:47 +02:00
|
|
|
QRectF rect(QPointF(x() - d->wValue/2.0, y() - d->hValue/2.0),
|
|
|
|
QPointF(x() + d->wValue/2.0, y() + d->hValue/2.0));
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape;
|
|
|
|
shape << rect.topLeft() << rect.topRight() << rect.bottomRight() << rect.topLeft();
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto HshapedShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-24 11:02:47 +02:00
|
|
|
const QPointF center1 (x(), y() - d->hValue/2.0);
|
|
|
|
const QPointF center2 (x(), y() + d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape1;
|
|
|
|
shape1 << center1 << center2;
|
|
|
|
|
|
|
|
QPolygonF shape2;
|
|
|
|
shape2 << QPointF(center1.x() - d->wValue/2.0, center1.y())
|
|
|
|
<< QPointF(center1.x() + d->wValue/2.0, center1.y());
|
|
|
|
|
|
|
|
QPolygonF shape3;
|
|
|
|
shape3 << QPointF(center2.x() - d->wValue/2.0, center2.y())
|
|
|
|
<< QPointF(center2.x() + d->wValue/2.0, center2.y());
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2), t.map(shape3)});
|
|
|
|
};
|
|
|
|
|
2017-10-24 11:02:47 +02:00
|
|
|
auto ButtonShape = [t, this]()
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2017-10-23 11:33:54 +02:00
|
|
|
const qreal radius = qMin(d->wValue/2.0, d->hValue/2.0);
|
2017-10-15 11:25:20 +02:00
|
|
|
QPolygonF shape1;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape1 << QPointF(x(), y() - radius)
|
|
|
|
<< QPointF(x(), y() + radius);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
QPolygonF shape2;
|
2017-10-24 11:02:47 +02:00
|
|
|
shape2 << QPointF(x() - radius, y())
|
|
|
|
<< QPointF(x() + radius, y());
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
const qreal circleSize = 0.85;
|
2017-10-24 11:02:47 +02:00
|
|
|
VArc arc(*this, radius*circleSize, 0, 360);
|
2017-10-23 11:33:54 +02:00
|
|
|
arc.SetApproximationScale(10);
|
|
|
|
QPolygonF shape3(arc.GetPoints());
|
2017-10-15 11:25:20 +02:00
|
|
|
if (not shape3.isClosed() && not shape3.isEmpty())
|
|
|
|
{
|
2022-01-29 15:06:01 +01:00
|
|
|
shape3 << ConstFirst<QPointF>(shape3);
|
2017-10-15 11:25:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(shape1), t.map(shape2), t.map(shape3)});
|
|
|
|
};
|
|
|
|
|
2019-04-23 16:42:09 +02:00
|
|
|
auto CircleShape = [t, this]()
|
|
|
|
{
|
|
|
|
const qreal radius = qMin(d->wValue/2.0, d->hValue/2.0);
|
|
|
|
VArc arc(*this, radius, 0, 360);
|
|
|
|
arc.SetApproximationScale(10);
|
|
|
|
QPolygonF circle(arc.GetPoints());
|
|
|
|
if (not circle.isClosed() && not circle.isEmpty())
|
|
|
|
{
|
2022-01-29 15:06:01 +01:00
|
|
|
circle << ConstFirst<QPointF>(circle);
|
2019-04-23 16:42:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return PlaceLabelImg({t.map(circle)});
|
|
|
|
};
|
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
2019-05-08 14:19:03 +02:00
|
|
|
switch(d->type)
|
|
|
|
{
|
|
|
|
case PlaceLabelType::Segment:
|
|
|
|
return SegmentShape();
|
|
|
|
case PlaceLabelType::Rectangle:
|
|
|
|
return RectangleShape();
|
|
|
|
case PlaceLabelType::Cross:
|
|
|
|
return CrossShape();
|
|
|
|
case PlaceLabelType::Tshaped:
|
|
|
|
return TshapedShape();
|
|
|
|
case PlaceLabelType::Doubletree:
|
|
|
|
return DoubletreeShape();
|
|
|
|
case PlaceLabelType::Corner:
|
|
|
|
return CornerShape();
|
|
|
|
case PlaceLabelType::Triangle:
|
|
|
|
return TriangleShape();
|
|
|
|
case PlaceLabelType::Hshaped:
|
|
|
|
return HshapedShape();
|
|
|
|
case PlaceLabelType::Button:
|
|
|
|
return ButtonShape();
|
|
|
|
case PlaceLabelType::Circle:
|
|
|
|
return CircleShape();
|
|
|
|
}
|
2022-08-08 14:25:14 +02:00
|
|
|
// cppcheck-suppress unknownMacro
|
2019-05-08 14:19:03 +02:00
|
|
|
QT_WARNING_POP
|
|
|
|
|
|
|
|
return PlaceLabelImg();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QPainterPath VPlaceLabelItem::LabelShapePath() const
|
|
|
|
{
|
|
|
|
return LabelShapePath(LabelShape());
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
QPainterPath VPlaceLabelItem::LabelShapePath(const PlaceLabelImg &shape)
|
|
|
|
{
|
|
|
|
QPainterPath path;
|
2022-01-29 15:06:01 +01:00
|
|
|
for (const auto &p : shape)
|
2019-05-08 14:19:03 +02:00
|
|
|
{
|
|
|
|
if (not p.isEmpty())
|
2017-10-15 11:25:20 +02:00
|
|
|
{
|
2022-01-29 15:06:01 +01:00
|
|
|
path.moveTo(ConstFirst<QPointF>(p));
|
2019-05-08 14:19:03 +02:00
|
|
|
path.addPolygon(p);
|
2017-10-15 11:25:20 +02:00
|
|
|
}
|
2019-05-08 14:19:03 +02:00
|
|
|
}
|
|
|
|
return path;
|
2017-10-15 11:25:20 +02:00
|
|
|
}
|