2020-05-23 17:47:04 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vpsheet.h
|
|
|
|
** @author Ronan Le Tiec
|
|
|
|
** @date 23 5, 2020
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentina project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2020 Valentina project
|
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
2020-05-23 17:46:46 +02:00
|
|
|
#ifndef VPSHEET_H
|
|
|
|
#define VPSHEET_H
|
|
|
|
|
2020-05-23 17:47:04 +02:00
|
|
|
#include <QObject>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QMarginsF>
|
|
|
|
#include <QList>
|
2020-11-20 15:51:24 +01:00
|
|
|
#include <QComboBox>
|
2020-05-23 17:46:46 +02:00
|
|
|
|
2020-05-23 17:47:04 +02:00
|
|
|
#include "def.h"
|
|
|
|
|
|
|
|
class VPLayout;
|
2021-07-29 16:11:18 +02:00
|
|
|
class VPPiece;
|
2020-05-23 17:47:04 +02:00
|
|
|
|
|
|
|
class VPSheet : public QObject
|
2020-05-23 17:46:46 +02:00
|
|
|
{
|
2020-05-23 17:47:04 +02:00
|
|
|
Q_OBJECT
|
2020-05-23 17:46:46 +02:00
|
|
|
public:
|
2020-11-10 15:14:51 +01:00
|
|
|
explicit VPSheet(VPLayout* layout);
|
2020-05-23 17:47:04 +02:00
|
|
|
|
2021-07-29 16:11:18 +02:00
|
|
|
virtual ~VPSheet() = default;
|
2020-11-20 15:51:24 +01:00
|
|
|
|
2020-11-14 17:31:34 +01:00
|
|
|
/**
|
|
|
|
* @brief GetLayout Returns the Layout of the sheet
|
2021-04-26 08:14:48 +02:00
|
|
|
* @return Layout of the sheet
|
2020-11-14 17:31:34 +01:00
|
|
|
*/
|
2021-07-29 16:11:18 +02:00
|
|
|
auto GetLayout() -> VPLayout*;
|
2020-11-14 17:31:34 +01:00
|
|
|
|
2021-07-29 16:11:18 +02:00
|
|
|
auto GetPieces() const -> QList<VPPiece *>;
|
2020-05-23 17:47:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief GetName Returns the name of the sheet
|
|
|
|
* @return the name
|
|
|
|
*/
|
2021-07-29 16:11:18 +02:00
|
|
|
auto GetName() const -> QString;
|
2020-05-23 17:47:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief SetName Sets the name of the sheet to the given name
|
|
|
|
* @param name the new sheet's name
|
|
|
|
*/
|
|
|
|
void SetName(const QString &name);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(VPSheet)
|
|
|
|
|
|
|
|
VPLayout *m_layout;
|
|
|
|
|
|
|
|
QString m_name{};
|
2020-05-23 17:46:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VPSHEET_H
|