1 /************************************************************************ 2 ** 3 ** @file 4 ** @author Roman Telezhynskyi <dismine(at)gmail.com> 5 ** @date 23 2, 2017 6 ** 7 ** @brief 8 ** @copyright 9 ** This source code is part of the Valentina project, a pattern making 10 ** program, whose allow create and modeling patterns of clothing. 11 ** Copyright (C) 2017 Valentina project 12 ** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved. 13 ** 14 ** Valentina is free software: you can redistribute it and/or modify 15 ** it under the terms of the GNU General Public License as published by 16 ** the Free Software Foundation, either version 3 of the License, or 17 ** (at your option) any later version. 18 ** 19 ** Valentina is distributed in the hope that it will be useful, 20 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 21 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 ** GNU General Public License for more details. 23 ** 24 ** You should have received a copy of the GNU General Public License 25 ** along with Valentina. If not, see <http://www.gnu.org/licenses/>. 26 ** 27 *************************************************************************/ 28 29 #ifndef VPATTERNLABELDATA_P_H 30 #define VPATTERNLABELDATA_P_H 31 32 #include <QPointF> 33 #include <QSharedData> 34 35 #include "../vmisc/diagnostic.h" 36 #include "../vmisc/defglobal.h" 37 #include "../ifc/ifcdef.h" 38 39 QT_WARNING_PUSH 40 QT_WARNING_DISABLE_GCC("-Weffc++") 41 QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor") 42 43 // cppcheck-suppress copyCtorAndEqOperator 44 class VPatternLabelDataPrivate : public QSharedData 45 { 46 public: VPatternLabelDataPrivate()47 VPatternLabelDataPrivate() 48 : m_dLabelWidth(), 49 m_dLabelHeight(), 50 m_dLabelAngle(), 51 m_iFontSize(0), 52 m_centerPin(NULL_ID), 53 m_topLeftPin(NULL_ID), 54 m_bottomRightPin(NULL_ID) 55 {} 56 VPatternLabelDataPrivate(const VPatternLabelDataPrivate & data)57 VPatternLabelDataPrivate(const VPatternLabelDataPrivate &data) 58 : QSharedData(data), 59 m_dLabelWidth(data.m_dLabelWidth), 60 m_dLabelHeight(data.m_dLabelHeight), 61 m_dLabelAngle(data.m_dLabelAngle), 62 m_iFontSize(data.m_iFontSize), 63 m_centerPin(data.m_centerPin), 64 m_topLeftPin(data.m_topLeftPin), 65 m_bottomRightPin(data.m_bottomRightPin) 66 {} 67 68 ~VPatternLabelDataPrivate() Q_DECL_EQ_DEFAULT; 69 70 /** @brief m_dLabelWidth formula to calculate the width of label */ 71 QString m_dLabelWidth; 72 /** @brief m_dLabelHeight formula to calculate the height of label */ 73 QString m_dLabelHeight; 74 /** @brief m_dLabelAngle formula to calculate the rotation angle of label */ 75 QString m_dLabelAngle; 76 /** @brief m_iFontSize label text base font size */ 77 int m_iFontSize; 78 /** @brief m_centerPin center pin id */ 79 quint32 m_centerPin; 80 /** @brief m_topLeftPin top left corner pin id */ 81 quint32 m_topLeftPin; 82 /** @brief m_bottomRightPin bottom right corner pin id */ 83 quint32 m_bottomRightPin; 84 85 private: 86 Q_DISABLE_ASSIGN(VPatternLabelDataPrivate) 87 }; 88 89 QT_WARNING_POP 90 91 #endif // VPATTERNLABELDATA_P_H 92 93