Seamly2D
Code documentation
anchorpoint_tool.h
Go to the documentation of this file.
1 /***************************************************************************
2  ** @file anchorpoint_tool.h
3  ** @author Douglas S Caskey
4  ** @date Jan 3, 2023
5  **
6  ** @copyright
7  ** Copyright (C) 2017 - 2023 Seamly, LLC
8  ** https://github.com/fashionfreedom/seamly2d
9  **
10  ** @brief
11  ** Seamly2D is free software: you can redistribute it and/or modify
12  ** it under the terms of the GNU General Public License as published by
13  ** the Free Software Foundation, either version 3 of the License, or
14  ** (at your option) any later version.
15  **
16  ** Seamly2D is distributed in the hope that it will be useful,
17  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  ** GNU General Public License for more details.
20  **
21  ** You should have received a copy of the GNU General Public License
22  ** along with Seamly2D. if not, see <http://www.gnu.org/licenses/>.
23  **************************************************************************/
24 
25 /************************************************************************
26  **
27  ** @file vtoolpin.h
28  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
29  ** @date 31 1, 2017
30  **
31  ** @brief
32  ** @copyright
33  ** This source code is part of the Valentina project, a pattern making
34  ** program, whose allow create and modeling patterns of clothing.
35  ** Copyright (C) 2017 Valentina project
36  ** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
37  **
38  ** Valentina is free software: you can redistribute it and/or modify
39  ** it under the terms of the GNU General Public License as published by
40  ** the Free Software Foundation, either version 3 of the License, or
41  ** (at your option) any later version.
42  **
43  ** Valentina is distributed in the hope that it will be useful,
44  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
45  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46  ** GNU General Public License for more details.
47  **
48  ** You should have received a copy of the GNU General Public License
49  ** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
50  **
51  *************************************************************************/
52 
53 #ifndef ANCHOR_POINT_TOOL_H
54 #define ANCHOR_POINT_TOOL_H
55 
56 #include <QtGlobal>
57 
58 #include "vabstractnode.h"
59 
60 class DialogTool;
61 
63 {
64  Q_OBJECT
65 public:
67  static AnchorPointTool *Create(quint32 _id, quint32 pointId, quint32 pieceId, VAbstractPattern *doc, VContainer *data,
68  const Document &parse, const Source &typeCreation, const QString &blockName = QString(),
69  const quint32 &idTool = 0);
70 
71  static const QString ToolType;
72  virtual QString getTagName() const Q_DECL_OVERRIDE;
73 
74 public slots:
75  virtual void FullUpdateFromFile () Q_DECL_OVERRIDE {}
76  virtual void AllowHover(bool enabled) Q_DECL_OVERRIDE;
77  virtual void AllowSelecting(bool enabled) Q_DECL_OVERRIDE;
78 
79 protected:
80  virtual void AddToFile() Q_DECL_OVERRIDE;
81  virtual void ShowNode() Q_DECL_OVERRIDE {}
82  virtual void HideNode() Q_DECL_OVERRIDE {}
83 
84 private:
85  Q_DISABLE_COPY(AnchorPointTool)
86 
87  quint32 m_pieceId;
88 
89  AnchorPointTool(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 pointId,
90  quint32 pieceId, const Source &typeCreation,
91  const QString &blockName = QString(), const quint32 &idTool = 0,
92  QObject *qoParent = nullptr);
93 };
94 
95 #endif // ANCHOR_POINT_TOOL_H
virtual QString getTagName() const Q_DECL_OVERRIDE
static AnchorPointTool * Create(QSharedPointer< DialogTool > dialog, VAbstractPattern *doc, VContainer *data)
static const QString ToolType
virtual void AllowHover(bool enabled) Q_DECL_OVERRIDE
virtual void FullUpdateFromFile() Q_DECL_OVERRIDE
virtual void AddToFile() Q_DECL_OVERRIDE
AddToFile add tag with Information about tool into file.
virtual void ShowNode() Q_DECL_OVERRIDE
virtual void AllowSelecting(bool enabled) Q_DECL_OVERRIDE
virtual void HideNode() Q_DECL_OVERRIDE
The DialogTool class parent for all dialog of tools.
Definition: dialogtool.h:107
The VAbstractNode class parent class for all detail node.
Definition: vabstractnode.h:71
quint32 idTool
idTool id tool.
Definition: vabstractnode.h:97
VAbstractPattern * doc
doc dom document container
The VContainer class container of all variables.
Definition: vcontainer.h:141
VContainer data
data container with data
Definition: vdatatool.h:84
Source
Definition: def.h:106
Document