valentina/src/app/puzzle/vpsheet.h

89 lines
2.2 KiB
C
Raw Normal View History

/************************************************************************
**
** @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
#include <QObject>
#include <QSizeF>
#include <QMarginsF>
#include <QList>
2020-11-20 15:51:24 +01:00
#include <QComboBox>
2021-07-31 11:21:07 +02:00
#include <QUuid>
2020-05-23 17:46:46 +02:00
#include "def.h"
class VPLayout;
2021-07-29 16:11:18 +02:00
class VPPiece;
class VPSheet : public QObject
2020-05-23 17:46:46 +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);
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
* @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 *>;
/**
* @brief GetName Returns the name of the sheet
* @return the name
*/
2021-07-29 16:11:18 +02:00
auto GetName() const -> QString;
/**
* @brief SetName Sets the name of the sheet to the given name
* @param name the new sheet's name
*/
void SetName(const QString &name);
2021-07-31 11:21:07 +02:00
auto Uuid() const -> const QUuid &;
bool IsVisible() const;
void SetVisible(bool visible);
private:
Q_DISABLE_COPY(VPSheet)
VPLayout *m_layout;
QString m_name{};
2021-07-31 11:21:07 +02:00
QUuid m_uuid{QUuid::createUuid()};
bool m_visible{true};
2020-05-23 17:46:46 +02:00
};
#endif // VPSHEET_H