File indexing completed on 2024-10-27 04:39:09

0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 // SPDX-FileCopyrightText: 2018 Kevin Ottens <ervin@kde.org>
0003 
0004 /*
0005  * Adapted by Louis Schul <schul9louis@gmail.com>
0006  * in 2023 for Klevernotes
0007  */
0008 
0009 #ifndef SKETCHSERIALIZER_H
0010 #define SKETCHSERIALIZER_H
0011 
0012 #include <QObject>
0013 #include <QRect>
0014 
0015 #include "strokepainter.h"
0016 
0017 class SketchModel;
0018 
0019 class SketchSerializer : public QObject
0020 {
0021     Q_OBJECT
0022 public:
0023     using QObject::QObject;
0024 
0025     Q_INVOKABLE void serialize(SketchModel *model, const QSize &size, const QUrl &fileUrl);
0026 
0027     Q_INVOKABLE QRect getCropRect();
0028 
0029 private:
0030     StrokePainter m_strokepainter;
0031 };
0032 
0033 #endif // SKETCHSERIALIZER_H