2017-10-15 11:25:20 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vplacelabelitem.h
|
|
|
|
** @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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
#ifndef VPLACELABELITEM_H
|
|
|
|
#define VPLACELABELITEM_H
|
|
|
|
|
2023-07-15 09:58:28 +02:00
|
|
|
#include <QMetaType>
|
2017-10-15 11:25:20 +02:00
|
|
|
#include <QSharedDataPointer>
|
|
|
|
#include <QTypeInfo>
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
#include "vpointf.h"
|
|
|
|
|
|
|
|
class VPlaceLabelItemData;
|
|
|
|
class VContainer;
|
2019-05-08 14:19:03 +02:00
|
|
|
class QPainterPath;
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
class VPlaceLabelItem : public VPointF
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VPlaceLabelItem();
|
|
|
|
VPlaceLabelItem(const VPlaceLabelItem &item);
|
2023-07-15 09:58:28 +02:00
|
|
|
~VPlaceLabelItem() override;
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto operator=(const VPlaceLabelItem &item) -> VPlaceLabelItem &;
|
2017-10-15 11:25:20 +02:00
|
|
|
#ifdef Q_COMPILER_RVALUE_REFS
|
2023-07-13 16:49:20 +02:00
|
|
|
VPlaceLabelItem(VPlaceLabelItem &&item) noexcept;
|
2023-07-15 09:58:28 +02:00
|
|
|
auto operator=(VPlaceLabelItem &&item) noexcept -> VPlaceLabelItem &;
|
2017-10-15 11:25:20 +02:00
|
|
|
#endif
|
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetWidthFormula() const -> QString;
|
|
|
|
auto GetWidthFormula() -> QString &;
|
|
|
|
auto GetWidth() const -> qreal;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetWidth(qreal value, const QString &formula);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetHeightFormula() const -> QString;
|
|
|
|
auto GetHeightFormula() -> QString &;
|
|
|
|
auto GetHeight() const -> qreal;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetHeight(qreal value, const QString &formula);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetAngleFormula() const -> QString;
|
|
|
|
auto GetAngleFormula() -> QString &;
|
|
|
|
auto GetAngle() const -> qreal;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetAngle(qreal value, const QString &formula);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetVisibilityTrigger() const -> QString;
|
|
|
|
auto GetVisibilityTrigger() -> QString &;
|
|
|
|
auto IsVisible() const -> bool;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetVisibilityTrigger(qreal visible, const QString &formula);
|
2018-07-20 09:30:05 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetCorrectionAngle() const -> qreal;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetCorrectionAngle(qreal value);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetCenterPoint() const -> quint32;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetCenterPoint(quint32 id);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto GetLabelType() const -> PlaceLabelType;
|
2023-07-15 09:58:28 +02:00
|
|
|
void SetLabelType(PlaceLabelType type);
|
2017-10-15 11:25:20 +02:00
|
|
|
|
2023-05-03 13:07:02 +02:00
|
|
|
auto RotationMatrix() const -> QTransform;
|
|
|
|
auto Box() const -> QRectF;
|
|
|
|
|
2017-10-15 11:25:20 +02:00
|
|
|
private:
|
|
|
|
QSharedDataPointer<VPlaceLabelItemData> d;
|
|
|
|
};
|
|
|
|
|
2023-07-15 09:58:28 +02:00
|
|
|
Q_DECLARE_METATYPE(VPlaceLabelItem) // NOLINT
|
2022-08-12 17:50:13 +02:00
|
|
|
Q_DECLARE_TYPEINFO(VPlaceLabelItem, Q_MOVABLE_TYPE); // NOLINT
|
2017-10-15 11:25:20 +02:00
|
|
|
|
|
|
|
#endif // VPLACELABELITEM_H
|