2007-12-01 10:47:15 +00:00
|
|
|
/*
|
2025-01-04 13:37:40 +01:00
|
|
|
Copyright 2006-2025 The QElectroTech Team
|
2020-10-17 20:25:30 +02:00
|
|
|
This file is part of QElectroTech.
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QElectroTech 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 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QElectroTech 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.
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
2007-12-01 10:47:15 +00:00
|
|
|
*/
|
2007-06-30 17:41:07 +00:00
|
|
|
#include "partellipse.h"
|
2020-12-09 15:28:43 +01:00
|
|
|
|
2020-12-10 18:44:03 +01:00
|
|
|
#include "../../QPropertyUndoCommand/qpropertyundocommand.h"
|
|
|
|
#include "../../QetGraphicsItemModeler/qetgraphicshandleritem.h"
|
|
|
|
#include "../../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
|
|
|
|
#include "../elementscene.h"
|
2007-06-30 17:41:07 +00:00
|
|
|
|
2007-12-05 21:16:01 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::PartEllipse
|
|
|
|
Constructor
|
|
|
|
@param editor : QETElementEditor of this part
|
|
|
|
@param parent : parent item
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2015-02-09 08:57:40 +00:00
|
|
|
PartEllipse::PartEllipse(QETElementEditor *editor, QGraphicsItem *parent) :
|
2020-10-17 20:25:30 +02:00
|
|
|
AbstractPartEllipse(editor, parent),
|
|
|
|
m_undo_command(nullptr)
|
2015-02-09 08:57:40 +00:00
|
|
|
{}
|
2007-06-30 17:41:07 +00:00
|
|
|
|
2015-02-09 08:57:40 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::~PartEllipse
|
|
|
|
Destructor
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
PartEllipse::~PartEllipse()
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if(m_undo_command) delete m_undo_command;
|
|
|
|
removeHandler();
|
2015-07-20 17:45:37 +00:00
|
|
|
}
|
2007-12-05 21:16:01 +00:00
|
|
|
|
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::paint
|
|
|
|
Draw this ellpise
|
|
|
|
@param painter
|
|
|
|
@param options
|
|
|
|
@param widget
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2015-02-09 08:57:40 +00:00
|
|
|
void PartEllipse::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget)
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
Q_UNUSED(widget);
|
|
|
|
applyStylesToQPainter(*painter);
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QPen t = painter -> pen();
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
|
|
|
|
t.setCosmetic(options && options -> levelOfDetail < 1.0);
|
2020-10-03 15:48:40 +02:00
|
|
|
#else
|
|
|
|
#if TODO_LIST
|
|
|
|
#pragma message("@TODO remove code for QT 6 or later")
|
|
|
|
#endif
|
2020-10-17 20:25:30 +02:00
|
|
|
t.setCosmetic(options && options -> levelOfDetailFromTransform(painter->worldTransform()) < 1.0);
|
2020-10-03 15:48:40 +02:00
|
|
|
#endif
|
2020-10-17 20:25:30 +02:00
|
|
|
if (isSelected())
|
|
|
|
t.setColor(Qt::red);
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
painter -> setPen(t);
|
|
|
|
painter -> drawEllipse(rect());
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_hovered)
|
|
|
|
drawShadowShape(painter);
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
if (isSelected())
|
|
|
|
drawCross(m_rect.center(), painter);
|
2007-06-30 17:41:07 +00:00
|
|
|
}
|
|
|
|
|
2007-12-05 21:16:01 +00:00
|
|
|
/**
|
2021-03-11 19:52:50 +01:00
|
|
|
@brief PartEllipse::toXml
|
2020-10-17 20:25:30 +02:00
|
|
|
Export this ellipse in xml
|
2021-03-11 19:52:50 +01:00
|
|
|
@param xml_document : Xml document to use for create the xml element.
|
2020-10-17 20:25:30 +02:00
|
|
|
@return : an xml element that describe this ellipse
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2021-03-11 19:52:50 +01:00
|
|
|
const QDomElement PartEllipse::toXml(QDomDocument &xml_document) const
|
2015-02-09 08:57:40 +00:00
|
|
|
{
|
2021-03-11 19:52:50 +01:00
|
|
|
QDomElement xml_element;
|
|
|
|
if (qFuzzyCompare(rect().width(), rect().height()))
|
|
|
|
{
|
2025-02-09 12:33:24 +01:00
|
|
|
double w = qRound(rect().width() * 100.0) / 100.0;
|
2021-03-11 19:52:50 +01:00
|
|
|
xml_element = xml_document.createElement("circle");
|
2025-02-09 12:33:24 +01:00
|
|
|
xml_element.setAttribute("diameter", QString("%1").arg(w));
|
2021-03-11 19:52:50 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2025-02-09 12:33:24 +01:00
|
|
|
double w = qRound(rect().width() * 100.0) / 100.0;
|
|
|
|
double h = qRound(rect().height() * 100.0) / 100.0;
|
2021-03-11 19:52:50 +01:00
|
|
|
xml_element = xml_document.createElement("ellipse");
|
2025-02-09 12:33:24 +01:00
|
|
|
xml_element.setAttribute("width", QString("%1").arg(w));
|
|
|
|
xml_element.setAttribute("height", QString("%1").arg(h));
|
2021-03-11 19:52:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QPointF top_left(sceneTopLeft());
|
2025-02-09 12:33:24 +01:00
|
|
|
double x = qRound(top_left.x() * 100.0) / 100.0;
|
|
|
|
double y = qRound(top_left.y() * 100.0) / 100.0;
|
|
|
|
xml_element.setAttribute("x", QString("%1").arg(x));
|
|
|
|
xml_element.setAttribute("y", QString("%1").arg(y));
|
2021-03-11 19:52:50 +01:00
|
|
|
|
|
|
|
stylesToXml(xml_element);
|
|
|
|
|
|
|
|
return(xml_element);
|
2007-06-30 17:41:07 +00:00
|
|
|
}
|
|
|
|
|
2007-12-05 21:16:01 +00:00
|
|
|
/**
|
2021-03-11 19:52:50 +01:00
|
|
|
@brief PartEllipse::fromXml
|
2020-10-17 20:25:30 +02:00
|
|
|
Import the properties of this ellipse from a xml element.
|
|
|
|
@param qde : Xml document to use.
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2021-03-11 19:52:50 +01:00
|
|
|
void PartEllipse::fromXml(const QDomElement &qde)
|
2015-02-09 08:57:40 +00:00
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
stylesFromXml(qde);
|
2021-03-11 19:52:50 +01:00
|
|
|
qreal width, height;
|
2020-10-16 11:45:17 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
if (qde.tagName() == "ellipse")
|
|
|
|
{
|
2021-03-11 19:52:50 +01:00
|
|
|
width = qde.attribute("width", "0").toDouble();
|
|
|
|
height = qde.attribute("height", "0").toDouble();
|
2020-10-17 20:25:30 +02:00
|
|
|
}
|
2021-03-11 19:52:50 +01:00
|
|
|
else
|
|
|
|
width = height = qde.attribute("diameter", "0").toDouble();
|
2020-10-17 20:25:30 +02:00
|
|
|
|
2021-03-11 19:52:50 +01:00
|
|
|
m_rect = QRectF(mapFromScene(qde.attribute("x", "0").toDouble(),
|
|
|
|
qde.attribute("y", "0").toDouble()),
|
|
|
|
QSizeF(width, height));
|
2013-02-08 22:05:12 +00:00
|
|
|
}
|
|
|
|
|
2008-01-07 19:40:08 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::shape
|
|
|
|
@return the shape of this item
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2015-02-09 08:57:40 +00:00
|
|
|
QPainterPath PartEllipse::shape() const
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
QPainterPath shape;
|
|
|
|
shape.addEllipse(m_rect);
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QPainterPathStroker pps;
|
|
|
|
pps.setWidth(m_hovered? penWeight()+SHADOWS_HEIGHT : penWeight());
|
|
|
|
shape = pps.createStroke(shape);
|
2015-07-20 17:45:37 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
return shape;
|
2015-07-20 17:45:37 +00:00
|
|
|
}
|
|
|
|
|
2015-07-21 12:29:43 +00:00
|
|
|
QPainterPath PartEllipse::shadowShape() const
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
QPainterPath shape;
|
|
|
|
shape.addEllipse(m_rect);
|
2015-07-21 12:29:43 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QPainterPathStroker pps;
|
|
|
|
pps.setWidth(penWeight());
|
2015-07-21 12:29:43 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
return (pps.createStroke(shape));
|
2015-07-21 12:29:43 +00:00
|
|
|
}
|
|
|
|
|
2017-08-02 15:26:14 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::mouseReleaseEvent
|
|
|
|
Handle mouse release event
|
|
|
|
@param event
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if (event->button() == Qt::LeftButton && event->buttonDownPos(Qt::LeftButton) == event->pos())
|
|
|
|
switchResizeMode();
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
CustomElementGraphicPart::mouseReleaseEvent(event);
|
2017-08-02 15:26:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::itemChange
|
|
|
|
@param change
|
|
|
|
@param value
|
|
|
|
@return
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
QVariant PartEllipse::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
|
2015-08-03 17:26:57 +00:00
|
|
|
{
|
2022-08-13 12:40:59 +02:00
|
|
|
if (change == ItemPositionHasChanged)
|
2020-10-17 20:25:30 +02:00
|
|
|
{
|
|
|
|
adjusteHandlerPos();
|
|
|
|
}
|
|
|
|
else if (change == ItemSceneChange)
|
|
|
|
{
|
|
|
|
setSelected(false); //This item is removed from scene, then we deselect this, and so, the handlers is also removed.
|
|
|
|
}
|
|
|
|
|
|
|
|
return QGraphicsItem::itemChange(change, value);
|
2015-08-03 17:26:57 +00:00
|
|
|
}
|
|
|
|
|
2015-07-20 17:45:37 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::sceneEventFilter
|
|
|
|
@param watched
|
|
|
|
@param event
|
|
|
|
@return
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
bool PartEllipse::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
2015-07-20 17:45:37 +00:00
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
//Watched must be an handler
|
|
|
|
if(watched->type() == QetGraphicsHandlerItem::Type)
|
|
|
|
{
|
|
|
|
QetGraphicsHandlerItem *qghi = qgraphicsitem_cast<QetGraphicsHandlerItem *>(watched);
|
|
|
|
|
|
|
|
if(m_handler_vector.contains(qghi)) //Handler must be in m_vector_index, then we can start resize
|
|
|
|
{
|
|
|
|
m_vector_index = m_handler_vector.indexOf(qghi);
|
|
|
|
if (m_vector_index != -1)
|
|
|
|
{
|
|
|
|
if(event->type() == QEvent::GraphicsSceneMousePress) //Click
|
|
|
|
{
|
|
|
|
handlerMousePressEvent(qghi, static_cast<QGraphicsSceneMouseEvent *>(event));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else if(event->type() == QEvent::GraphicsSceneMouseMove) //Move
|
|
|
|
{
|
|
|
|
handlerMouseMoveEvent(qghi, static_cast<QGraphicsSceneMouseEvent *>(event));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else if (event->type() == QEvent::GraphicsSceneMouseRelease) //Release
|
|
|
|
{
|
|
|
|
handlerMouseReleaseEvent(qghi, static_cast<QGraphicsSceneMouseEvent *>(event));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2017-08-02 15:26:14 +00:00
|
|
|
}
|
2015-08-03 17:26:57 +00:00
|
|
|
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::switchResizeMode()
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_resize_mode == 1)
|
|
|
|
{
|
|
|
|
m_resize_mode = 2;
|
2025-02-14 15:52:23 +01:00
|
|
|
for (QetGraphicsHandlerItem* qghi : std::as_const(m_handler_vector))
|
2020-10-17 20:25:30 +02:00
|
|
|
qghi->setColor(Qt::darkGreen);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_resize_mode = 1;
|
2025-02-14 15:52:23 +01:00
|
|
|
for (QetGraphicsHandlerItem* qghi : std::as_const(m_handler_vector))
|
2020-10-17 20:25:30 +02:00
|
|
|
qghi->setColor(Qt::blue);
|
|
|
|
}
|
2015-07-20 17:45:37 +00:00
|
|
|
}
|
2015-02-09 08:57:40 +00:00
|
|
|
|
2015-07-20 17:45:37 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::adjusteHandlerPos
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::adjusteHandlerPos()
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_handler_vector.isEmpty())
|
|
|
|
return;
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QVector <QPointF> points_vector = QetGraphicsHandlerUtility::pointsForRect(m_rect);
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_handler_vector.size() == points_vector.size())
|
|
|
|
{
|
|
|
|
points_vector = mapToScene(points_vector);
|
|
|
|
for (int i = 0 ; i < points_vector.size() ; ++i)
|
|
|
|
m_handler_vector.at(i)->setPos(points_vector.at(i));
|
|
|
|
}
|
2015-07-20 17:45:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::handlerMousePressEvent
|
|
|
|
@param qghi
|
|
|
|
@param event
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
|
2015-07-20 17:45:37 +00:00
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
Q_UNUSED(qghi);
|
|
|
|
Q_UNUSED(event);
|
2015-08-03 17:26:57 +00:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
m_undo_command = new QPropertyUndoCommand(this, "rect", QVariant(m_rect));
|
|
|
|
m_undo_command->setText(tr("Modifier un rectangle"));
|
|
|
|
m_undo_command->enableAnimation();
|
|
|
|
return;
|
2017-08-02 15:26:14 +00:00
|
|
|
}
|
2015-07-20 17:45:37 +00:00
|
|
|
|
2017-08-02 15:26:14 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::handlerMouseMoveEvent
|
|
|
|
@param qghi
|
|
|
|
@param event
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
Q_UNUSED(qghi);
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
QPointF new_pos = event->scenePos();
|
|
|
|
if (event->modifiers() != Qt::ControlModifier)
|
|
|
|
new_pos = elementScene()->snapToGrid(event->scenePos());
|
|
|
|
new_pos = mapFromScene(new_pos);
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_resize_mode == 1)
|
|
|
|
setRect(QetGraphicsHandlerUtility::rectForPosAtIndex(m_rect, new_pos, m_vector_index));
|
|
|
|
else
|
|
|
|
setRect(QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(m_rect, new_pos, m_vector_index));
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
adjusteHandlerPos();
|
2008-01-07 19:40:08 +00:00
|
|
|
}
|
2016-07-19 17:12:30 +00:00
|
|
|
|
2017-08-02 15:26:14 +00:00
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::handlerMouseReleaseEvent
|
|
|
|
@param qghi
|
|
|
|
@param event
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
|
2016-07-19 17:12:30 +00:00
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
Q_UNUSED(qghi);
|
|
|
|
Q_UNUSED(event);
|
2020-10-03 15:48:40 +02:00
|
|
|
|
2020-10-17 20:25:30 +02:00
|
|
|
m_undo_command->setNewValue(QVariant(m_rect));
|
|
|
|
elementScene()->undoStack().push(m_undo_command);
|
|
|
|
m_undo_command = nullptr;
|
|
|
|
m_vector_index = -1;
|
2017-08-02 15:26:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::addHandler
|
|
|
|
Add handlers for this item
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::addHandler()
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if (m_handler_vector.isEmpty() && scene())
|
|
|
|
{
|
|
|
|
m_handler_vector = QetGraphicsHandlerItem::handlerForPoint(mapToScene(QetGraphicsHandlerUtility::pointsForRect(m_rect)));
|
|
|
|
|
2025-02-14 15:52:23 +01:00
|
|
|
for (QetGraphicsHandlerItem* handler : std::as_const(m_handler_vector))
|
2020-10-17 20:25:30 +02:00
|
|
|
{
|
|
|
|
QColor color = Qt::blue;
|
|
|
|
if (m_resize_mode == 2)
|
|
|
|
color = Qt::darkGreen;
|
|
|
|
|
|
|
|
handler->setColor(color);
|
|
|
|
scene()->addItem(handler);
|
|
|
|
handler->installSceneEventFilter(this);
|
|
|
|
handler->setZValue(this->zValue()+1);
|
|
|
|
}
|
|
|
|
}
|
2017-08-02 15:26:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-10-17 20:25:30 +02:00
|
|
|
@brief PartEllipse::removeHandler
|
|
|
|
Remove the handlers of this item
|
2020-08-16 11:19:36 +02:00
|
|
|
*/
|
2017-08-02 15:26:14 +00:00
|
|
|
void PartEllipse::removeHandler()
|
|
|
|
{
|
2020-10-17 20:25:30 +02:00
|
|
|
if (!m_handler_vector.isEmpty())
|
|
|
|
{
|
|
|
|
qDeleteAll(m_handler_vector);
|
|
|
|
m_handler_vector.clear();
|
|
|
|
}
|
2016-07-19 17:12:30 +00:00
|
|
|
}
|