valentina/src/libs/vgeometry/vplacelabelitem.h

95 lines
3.1 KiB
C
Raw Normal View History

/************************************************************************
**
** @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
** <https://gitlab.com/smart-pattern/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 VPLACELABELITEM_H
#define VPLACELABELITEM_H
2023-07-15 09:58:28 +02:00
#include <QMetaType>
#include <QSharedDataPointer>
#include <QTypeInfo>
#include <QtGlobal>
#include "vpointf.h"
class VPlaceLabelItemData;
class VContainer;
class QPainterPath;
class VPlaceLabelItem : public VPointF
{
public:
VPlaceLabelItem();
VPlaceLabelItem(const VPlaceLabelItem &item);
2023-07-15 09:58:28 +02:00
~VPlaceLabelItem() override;
2023-05-03 13:07:02 +02:00
auto operator=(const VPlaceLabelItem &item) -> VPlaceLabelItem &;
#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 &;
#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);
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);
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);
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);
2023-05-03 13:07:02 +02:00
auto GetCorrectionAngle() const -> qreal;
2023-07-15 09:58:28 +02:00
void SetCorrectionAngle(qreal value);
2023-05-03 13:07:02 +02:00
auto GetCenterPoint() const -> quint32;
2023-07-15 09:58:28 +02:00
void SetCenterPoint(quint32 id);
2023-05-03 13:07:02 +02:00
auto GetLabelType() const -> PlaceLabelType;
2023-07-15 09:58:28 +02:00
void SetLabelType(PlaceLabelType type);
2023-05-03 13:07:02 +02:00
auto RotationMatrix() const -> QTransform;
auto Box() const -> QRectF;
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
#endif // VPLACELABELITEM_H