2014-08-20 16:05:19 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
2015-05-07 14:31:53 +02:00
|
|
|
** @file vgeometrydef.h
|
2014-08-20 16:05:19 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2015-05-07 14:31:53 +02:00
|
|
|
** @date 7 5, 2015
|
2014-08-20 16:05:19 +02:00
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2014-08-20 16:05:19 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2015-05-07 14:31:53 +02:00
|
|
|
** Copyright (C) 2015 Valentina project
|
2014-08-20 16:05:19 +02:00
|
|
|
** <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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
2015-05-07 14:31:53 +02:00
|
|
|
#ifndef VGEOMETRYDEF_H
|
|
|
|
#define VGEOMETRYDEF_H
|
2014-08-20 16:05:19 +02:00
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
#include <QVector>
|
|
|
|
#include <QPolygonF>
|
2019-05-27 13:54:44 +02:00
|
|
|
#include <QTransform>
|
|
|
|
|
|
|
|
#include "../ifc/ifcdef.h"
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
enum class GOType : char
|
|
|
|
{
|
|
|
|
Point,
|
|
|
|
Arc,
|
|
|
|
EllipticalArc,
|
|
|
|
Spline,
|
|
|
|
SplinePath,
|
|
|
|
CubicBezier,
|
|
|
|
CubicBezierPath,
|
|
|
|
PlaceLabel,
|
|
|
|
Unknown
|
|
|
|
};
|
2015-05-07 14:31:53 +02:00
|
|
|
enum class SplinePointPosition : char { FirstPoint, LastPoint };
|
2014-08-23 08:18:07 +02:00
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
// Keep synchronized with XSD schema
|
|
|
|
enum class PlaceLabelType : unsigned char
|
|
|
|
{
|
|
|
|
Segment= 0,
|
|
|
|
Rectangle = 1,
|
|
|
|
Cross = 2,
|
|
|
|
Tshaped = 3,
|
|
|
|
Doubletree = 4,
|
|
|
|
Corner = 5,
|
|
|
|
Triangle = 6,
|
|
|
|
Hshaped = 7,
|
2019-04-23 16:42:09 +02:00
|
|
|
Button = 8,
|
|
|
|
Circle = 9
|
2017-10-15 11:25:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef QVector<QPolygonF> PlaceLabelImg;
|
|
|
|
|
|
|
|
struct VLayoutPlaceLabel
|
|
|
|
{
|
|
|
|
VLayoutPlaceLabel()
|
|
|
|
: center(),
|
|
|
|
type(PlaceLabelType::Button),
|
|
|
|
shape()
|
|
|
|
{}
|
|
|
|
|
|
|
|
QPointF center;
|
|
|
|
PlaceLabelType type;
|
|
|
|
PlaceLabelImg shape;
|
2019-05-27 13:54:44 +02:00
|
|
|
QTransform rotationMatrix{};
|
|
|
|
QRectF box{};
|
2017-10-15 11:25:20 +02:00
|
|
|
};
|
2019-05-27 13:57:36 +02:00
|
|
|
Q_DECLARE_METATYPE(VLayoutPlaceLabel)
|
|
|
|
|
|
|
|
struct VLayoutPassmark
|
|
|
|
{
|
|
|
|
QVector<QLineF> lines{};
|
|
|
|
PassmarkLineType type{PassmarkLineType::OneLine};
|
|
|
|
QLineF baseLine{};
|
|
|
|
bool isBuiltIn{false};
|
|
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(VLayoutPassmark)
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2015-05-07 14:31:53 +02:00
|
|
|
#endif // VGEOMETRYDEF_H
|