2013-12-18 12:13:32 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vsimplesplinepath.h
|
2014-04-30 07:38:52 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2013-12-18 12:13:32 +01:00
|
|
|
** @date 17 12, 2013
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentine project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2013 Valentina project
|
|
|
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
|
|
|
**
|
|
|
|
** 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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef VSIMPLESPLINEPATH_H
|
|
|
|
#define VSIMPLESPLINEPATH_H
|
|
|
|
|
|
|
|
#include <QGraphicsPathItem>
|
|
|
|
#include "../tools/vabstracttool.h"
|
|
|
|
|
2014-01-27 13:27:26 +01:00
|
|
|
/**
|
|
|
|
* @brief The VSimpleSplinePath class for simple spline path. This object used when we cut spline path and want show
|
|
|
|
* peaces.
|
|
|
|
*/
|
2013-12-18 12:13:32 +01:00
|
|
|
class VSimpleSplinePath : public VAbstractTool, public QGraphicsPathItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-02-25 15:40:24 +01:00
|
|
|
VSimpleSplinePath(VPattern *doc, VContainer *data, quint32 id, qreal *factor);
|
2014-07-30 10:58:40 +02:00
|
|
|
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
2013-12-18 12:13:32 +01:00
|
|
|
protected:
|
|
|
|
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
|
|
|
|
virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event );
|
|
|
|
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
|
|
|
|
private:
|
2013-12-21 12:36:51 +01:00
|
|
|
Q_DISABLE_COPY(VSimpleSplinePath)
|
2014-06-13 19:02:41 +02:00
|
|
|
/** @brief factor scale factor. */
|
2013-12-18 12:13:32 +01:00
|
|
|
qreal *factor;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VSIMPLESPLINEPATH_H
|