Seamly2D
Code documentation
pieces_widget.h
Go to the documentation of this file.
1
/***************************************************************************
2
** @file pieces_widget.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 vwidgetdetails.h
28
** @author Roman Telezhynskyi <dismine(at)gmail.com>
29
** @date 25 6, 2016
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) 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 PIECES_WIDGET_H
54
#define PIECES_WIDGET_H
55
56
#include <QWidget>
57
#include <QTableWidgetItem>
58
59
class
VAbstractPattern
;
60
class
VContainer
;
61
class
VPiece
;
62
63
namespace
Ui
64
{
65
class
PiecesWidget
;
66
}
67
68
class
PiecesWidget
:
public
QWidget
69
{
70
Q_OBJECT
71
72
public
:
73
explicit
PiecesWidget
(
VContainer
*data,
VAbstractPattern
*doc, QWidget *parent =
nullptr
);
74
virtual
~PiecesWidget
();
75
76
signals:
77
void
Highlight
(quint32
id
);
78
79
public
slots:
80
void
togglePiece
(quint32
id
);
81
void
updateList
();
82
void
selectPiece
(quint32
id
);
83
84
private
slots:
85
void
cellClicked
(
int
row,
int
column);
86
void
cellDoubleClicked
(
int
row,
int
column);
87
void
showContextMenu
(
const
QPoint &pos);
88
89
private
:
90
Q_DISABLE_COPY(
PiecesWidget
)
91
Ui
::
PiecesWidget
*
ui
;
92
VAbstractPattern
*
m_doc
;
93
VContainer
*
m_data
;
94
95
void
fillTable
(const
QHash
<quint32,
VPiece
> *details);
96
void
toggleInLayoutPieces
(
bool
inLayout);
97
void
toggleLockedPieces
(
bool
lock);
98
};
99
100
#endif
// PIECES_WIDGET_H
PiecesWidget
Definition:
pieces_widget.h:69
PiecesWidget::fillTable
void fillTable(const QHash< quint32, VPiece > *details)
Definition:
pieces_widget.cpp:233
PiecesWidget::cellClicked
void cellClicked(int row, int column)
Definition:
pieces_widget.cpp:161
PiecesWidget::showContextMenu
void showContextMenu(const QPoint &pos)
Definition:
pieces_widget.cpp:368
PiecesWidget::toggleLockedPieces
void toggleLockedPieces(bool lock)
Definition:
pieces_widget.cpp:336
PiecesWidget::togglePiece
void togglePiece(quint32 id)
Definition:
pieces_widget.cpp:96
PiecesWidget::Highlight
void Highlight(quint32 id)
PiecesWidget::selectPiece
void selectPiece(quint32 id)
Definition:
pieces_widget.cpp:145
PiecesWidget::updateList
void updateList()
Definition:
pieces_widget.cpp:138
PiecesWidget::toggleInLayoutPieces
void toggleInLayoutPieces(bool inLayout)
Definition:
pieces_widget.cpp:311
PiecesWidget::m_doc
VAbstractPattern * m_doc
Definition:
pieces_widget.h:92
PiecesWidget::~PiecesWidget
virtual ~PiecesWidget()
Definition:
pieces_widget.cpp:90
PiecesWidget::PiecesWidget
PiecesWidget(VContainer *data, VAbstractPattern *doc, QWidget *parent=nullptr)
Definition:
pieces_widget.cpp:72
PiecesWidget::cellDoubleClicked
void cellDoubleClicked(int row, int column)
Definition:
pieces_widget.cpp:197
PiecesWidget::m_data
VContainer * m_data
Definition:
pieces_widget.h:93
PiecesWidget::ui
Ui::PiecesWidget * ui
Definition:
pieces_widget.h:91
QHash
Definition:
visualization.cpp:62
VAbstractPattern
Definition:
vabstractpattern.h:113
VContainer
The VContainer class container of all variables.
Definition:
vcontainer.h:141
VPiece
Definition:
vpiece.h:88
Ui
Definition:
calculator_dialog.h:38
src
app
seamly2d
dialogs
pieces_widget.h
Generated by
1.9.1