Seamly2D
Code documentation
vtoolrecord.h
Go to the documentation of this file.
1
/***************************************************************************
2
* *
3
* Copyright (C) 2017 Seamly, LLC *
4
* *
5
* https://github.com/fashionfreedom/seamly2d *
6
* *
7
***************************************************************************
8
**
9
** Seamly2D is free software: you can redistribute it and/or modify
10
** it under the terms of the GNU General Public License as published by
11
** the Free Software Foundation, either version 3 of the License, or
12
** (at your option) any later version.
13
**
14
** Seamly2D is distributed in the hope that it will be useful,
15
** but WITHOUT ANY WARRANTY; without even the implied warranty of
16
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
** GNU General Public License for more details.
18
**
19
** You should have received a copy of the GNU General Public License
20
** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21
**
22
**************************************************************************
23
24
************************************************************************
25
**
26
** @file vtoolrecord.h
27
** @author Roman Telezhynskyi <dismine(at)gmail.com>
28
** @date November 15, 2013
29
**
30
** @brief
31
** @copyright
32
** This source code is part of the Valentine project, a pattern making
33
** program, whose allow create and modeling patterns of clothing.
34
** Copyright (C) 2013-2015 Seamly2D project
35
** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
36
**
37
** Seamly2D is free software: you can redistribute it and/or modify
38
** it under the terms of the GNU General Public License as published by
39
** the Free Software Foundation, either version 3 of the License, or
40
** (at your option) any later version.
41
**
42
** Seamly2D is distributed in the hope that it will be useful,
43
** but WITHOUT ANY WARRANTY; without even the implied warranty of
44
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45
** GNU General Public License for more details.
46
**
47
** You should have received a copy of the GNU General Public License
48
** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
49
**
50
*************************************************************************/
51
52
#ifndef VTOOLRECORD_H
53
#define VTOOLRECORD_H
54
55
#include <QString>
56
#include <QtGlobal>
57
58
#include "../vmisc/def.h"
59
60
/**
61
* @brief The VToolRecord class record about tool in history.
62
*/
63
class
VToolRecord
64
{
65
public
:
66
VToolRecord
();
67
VToolRecord
(
const
quint32 &
id
,
const
Tool
&
typeTool
,
const
QString &
nameDraw
);
68
bool
operator==
(
const
VToolRecord
&record)
const
;
69
VToolRecord
&
operator=
(
const
VToolRecord
&record);
70
VToolRecord
(
const
VToolRecord
&record);
71
quint32
getId
()
const
;
72
void
setId
(
const
quint32 &value);
73
Tool
getTypeTool
()
const
;
74
void
setTypeTool
(
const
Tool
&value);
75
QString
getDraftBlockName
()
const
;
76
void
setNameDraw
(
const
QString &value);
77
~VToolRecord
() Q_DECL_EQ_DEFAULT;
78
private:
79
/** @brief id tool id. */
80
quint32
id
;
81
82
/** @brief typeTool tool type. */
83
Tool
typeTool
;
84
85
/** @brief nameDraw pattern peace name. */
86
QString
nameDraw
;
87
};
88
89
//---------------------------------------------------------------------------------------------------------------------
90
/**
91
* @brief getId return tool id.
92
* @return id.
93
*/
94
inline quint32
VToolRecord
::
getId
()
const
95
{
96
return
id
;
97
}
98
99
//---------------------------------------------------------------------------------------------------------------------
100
/**
101
* @brief setId set tool id.
102
* @param value id.
103
*/
104
inline
void
VToolRecord::setId
(
const
quint32 &value)
105
{
106
id
= value;
107
}
108
109
//---------------------------------------------------------------------------------------------------------------------
110
/**
111
* @brief getTypeTool return tool type.
112
* @return tool type.
113
*/
114
inline
Tool
VToolRecord::getTypeTool
()
const
115
{
116
return
typeTool
;
117
}
118
119
//---------------------------------------------------------------------------------------------------------------------
120
/**
121
* @brief setTypeTool set tool type.
122
* @param value tool type.
123
*/
124
inline
void
VToolRecord::setTypeTool
(
const
Tool
&value)
125
{
126
typeTool
= value;
127
}
128
129
//---------------------------------------------------------------------------------------------------------------------
130
/**
131
* @brief getDraftBlockName return pattern peace name.
132
* @return pattern peace name.
133
*/
134
inline
QString
VToolRecord::getDraftBlockName
()
const
135
{
136
return
nameDraw
;
137
}
138
139
//---------------------------------------------------------------------------------------------------------------------
140
/**
141
* @brief setNameDraw set pattern peace name.
142
* @param value pattern peace name.
143
*/
144
inline
void
VToolRecord::setNameDraw
(
const
QString &value)
145
{
146
nameDraw
= value;
147
}
148
149
//---------------------------------------------------------------------------------------------------------------------
150
inline
bool
VToolRecord::operator==
(
const
VToolRecord
&record)
const
151
{
152
// Id should be enough
153
return
id
== record.
getId
()
/* && typeTool == record.getTypeTool() && nameDraw == record.getDraftBlockName()*/
;
154
}
155
156
#endif
// VTOOLRECORD_H
VToolRecord
The VToolRecord class record about tool in history.
Definition:
vtoolrecord.h:64
VToolRecord::setId
void setId(const quint32 &value)
setId set tool id.
Definition:
vtoolrecord.h:104
VToolRecord::operator==
bool operator==(const VToolRecord &record) const
Definition:
vtoolrecord.h:150
VToolRecord::operator=
VToolRecord & operator=(const VToolRecord &record)
Definition:
vtoolrecord.cpp:75
VToolRecord::nameDraw
QString nameDraw
nameDraw pattern peace name.
Definition:
vtoolrecord.h:86
VToolRecord::VToolRecord
VToolRecord()
VToolRecord default constructor.
Definition:
vtoolrecord.cpp:59
VToolRecord::getTypeTool
Tool getTypeTool() const
getTypeTool return tool type.
Definition:
vtoolrecord.h:114
VToolRecord::~VToolRecord
~VToolRecord() Q_DECL_EQ_DEFAULT
VToolRecord::typeTool
Tool typeTool
typeTool tool type.
Definition:
vtoolrecord.h:83
VToolRecord::setTypeTool
void setTypeTool(const Tool &value)
setTypeTool set tool type.
Definition:
vtoolrecord.h:124
VToolRecord::id
quint32 id
id tool id.
Definition:
vtoolrecord.h:80
VToolRecord::getId
quint32 getId() const
getId return tool id.
Definition:
vtoolrecord.h:94
VToolRecord::setNameDraw
void setNameDraw(const QString &value)
setNameDraw set pattern peace name.
Definition:
vtoolrecord.h:144
VToolRecord::getDraftBlockName
QString getDraftBlockName() const
getDraftBlockName return pattern peace name.
Definition:
vtoolrecord.h:134
Tool
Tool
Definition:
def.h:161
src
libs
ifc
xml
vtoolrecord.h
Generated by
1.9.1