Seamly2D
Code documentation
addpiece.h
Go to the documentation of this file.
1
/***************************************************************************
2
** @file addpiece.h
3
** @author Douglas S Caskey
4
** @date Dec 11, 2022
5
**
6
** @copyright
7
** Copyright (C) 2017 - 2022 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
28
** @author Roman Telezhynskyi <dismine(at)gmail.com>
29
** @date 6 11, 2016
30
**
31
** @brief
32
** @copyright
33
** This source code is part of the Valentine project, a pattern making
34
** program, whose allow create and modeling patterns of clothing.
35
** Copyright (C) 2016 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 ADDPIECE_H
54
#define ADDPIECE_H
55
56
#include <qcompilerdetection.h>
57
#include <QDomElement>
58
#include <QMetaObject>
59
#include <QObject>
60
#include <QString>
61
#include <QtGlobal>
62
63
#include "../tools/pattern_piece_tool.h"
64
#include "
vpiece.h
"
65
#include "
vundocommand.h
"
66
67
class
AddPiece
:
public
VUndoCommand
68
{
69
Q_OBJECT
70
public
:
71
AddPiece
(
const
QDomElement &
xml
,
VAbstractPattern
*
doc
,
const
VPiece
&piece,
72
const
QString &blockName = QString(), QUndoCommand *parent =
nullptr
);
73
virtual
~AddPiece
();
74
virtual
void
undo
() Q_DECL_OVERRIDE;
// cppcheck-suppress unusedFunction
75
virtual
void
redo
() Q_DECL_OVERRIDE;
// cppcheck-suppress unusedFunction
76
77
private
:
78
Q_DISABLE_COPY(
AddPiece
)
79
80
VPiece
m_piece
;
81
QString
m_blockName
;
82
83
QDomElement
getPiecesElement
() const;
84
};
85
86
#endif
// ADDPIECE_H
AddPiece
Definition:
addpiece.h:68
AddPiece::undo
virtual void undo() Q_DECL_OVERRIDE
Definition:
addpiece.cpp:73
AddPiece::getPiecesElement
QDomElement getPiecesElement() const
Definition:
addpiece.cpp:127
AddPiece::m_piece
VPiece m_piece
Definition:
addpiece.h:80
AddPiece::~AddPiece
virtual ~AddPiece()
Definition:
addpiece.cpp:69
AddPiece::redo
virtual void redo() Q_DECL_OVERRIDE
Definition:
addpiece.cpp:109
AddPiece::m_blockName
QString m_blockName
Definition:
addpiece.h:81
AddPiece::AddPiece
AddPiece(const QDomElement &xml, VAbstractPattern *doc, const VPiece &piece, const QString &blockName=QString(), QUndoCommand *parent=nullptr)
Definition:
addpiece.cpp:58
VAbstractPattern
Definition:
vabstractpattern.h:113
VPiece
Definition:
vpiece.h:88
VUndoCommand
Definition:
vundocommand.h:93
VUndoCommand::xml
QDomElement xml
Definition:
vundocommand.h:105
VUndoCommand::doc
VAbstractPattern * doc
Definition:
vundocommand.h:106
vpiece.h
vundocommand.h
src
libs
vtools
undocommands
addpiece.h
Generated by
1.9.1