2016-09-06 23:50:46 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
2017-02-23 10:33:17 +01:00
|
|
|
** @file vgrainlinedata.h
|
2016-09-06 23:50:46 +02:00
|
|
|
** @author Bojan Kverh
|
|
|
|
** @date September 06, 2016
|
|
|
|
**
|
|
|
|
** @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-2015 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 VGRAINLINEGEOMETRY_H
|
|
|
|
#define VGRAINLINEGEOMETRY_H
|
|
|
|
|
2016-09-08 22:35:32 +02:00
|
|
|
#include <QString>
|
2017-02-23 10:33:17 +01:00
|
|
|
#include <QPointF>
|
2016-09-06 23:50:46 +02:00
|
|
|
|
2017-02-23 12:26:12 +01:00
|
|
|
#include "vabstractfloatitemdata.h"
|
2017-02-23 13:04:49 +01:00
|
|
|
#include "floatitemdef.h"
|
|
|
|
|
|
|
|
class VGrainlineDataPrivate;
|
2017-02-23 12:26:12 +01:00
|
|
|
|
2016-09-06 23:50:46 +02:00
|
|
|
/**
|
2017-02-23 10:33:17 +01:00
|
|
|
* @brief The VGrainlineData class holds information about a grainline like
|
2016-09-06 23:50:46 +02:00
|
|
|
* position, size, rotation and visibility
|
|
|
|
*/
|
2017-02-23 12:26:12 +01:00
|
|
|
class VGrainlineData : public VAbstractFloatItemData
|
2016-09-06 23:50:46 +02:00
|
|
|
{
|
2016-10-25 23:00:42 +02:00
|
|
|
public:
|
2017-02-23 10:33:17 +01:00
|
|
|
VGrainlineData();
|
2017-02-23 13:04:49 +01:00
|
|
|
VGrainlineData(const VGrainlineData &data);
|
2017-04-19 12:27:17 +02:00
|
|
|
|
2017-02-23 12:26:12 +01:00
|
|
|
virtual ~VGrainlineData();
|
2016-09-06 23:50:46 +02:00
|
|
|
|
2017-04-19 12:27:17 +02:00
|
|
|
VGrainlineData &operator=(const VGrainlineData &data);
|
|
|
|
#ifdef Q_COMPILER_RVALUE_REFS
|
|
|
|
VGrainlineData &operator=(VGrainlineData &&data) Q_DECL_NOTHROW { Swap(data); return *this; }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void Swap(VGrainlineData &data) Q_DECL_NOTHROW
|
2017-04-28 08:38:09 +02:00
|
|
|
{ VAbstractFloatItemData::Swap(data); std::swap(d, data.d); }
|
2017-04-19 12:27:17 +02:00
|
|
|
|
2016-09-06 23:50:46 +02:00
|
|
|
// methods, which set and return values of different parameters
|
2017-02-23 12:26:12 +01:00
|
|
|
QString GetLength() const;
|
|
|
|
void SetLength(const QString& qsLen);
|
|
|
|
|
|
|
|
QString GetRotation() const;
|
|
|
|
void SetRotation(const QString& qsRot);
|
|
|
|
|
|
|
|
ArrowType GetArrowType() const;
|
|
|
|
void SetArrowType(ArrowType eAT);
|
2016-09-06 23:50:46 +02:00
|
|
|
|
2017-03-09 12:10:46 +01:00
|
|
|
quint32 CenterPin() const;
|
|
|
|
void SetCenterPin(quint32 centerPin);
|
|
|
|
|
2017-02-23 12:36:56 +01:00
|
|
|
quint32 TopPin() const;
|
2017-02-23 13:04:49 +01:00
|
|
|
void SetTopPin(quint32 topPin);
|
2017-02-23 12:36:56 +01:00
|
|
|
|
|
|
|
quint32 BottomPin() const;
|
2017-02-23 13:04:49 +01:00
|
|
|
void SetBottomPin(quint32 bottomPin);
|
2017-02-23 12:36:56 +01:00
|
|
|
|
2016-09-06 23:50:46 +02:00
|
|
|
private:
|
2017-02-23 13:04:49 +01:00
|
|
|
QSharedDataPointer<VGrainlineDataPrivate> d;
|
2016-09-06 23:50:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VGRAINLINEGEOMETRY_H
|
|
|
|
|