File indexing completed on 2024-12-15 04:00:59

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #ifndef DOCUMENT_OPENER_HPP
0008 #define DOCUMENT_OPENER_HPP
0009 
0010 
0011 #include <QWidget>
0012 
0013 #include "model/document.hpp"
0014 
0015 namespace glaxnimate::android {
0016 
0017 
0018 class DocumentOpener
0019 {
0020 public:
0021     DocumentOpener(QWidget* widget_parent);
0022     ~DocumentOpener();
0023 
0024     bool save(const QUrl& url, model::Composition* composition, io::Options& options) const;
0025 
0026     std::unique_ptr<model::Document> open(const QUrl& url) const;
0027 
0028     std::unique_ptr<model::Document> from_raster(const QByteArray& data);
0029 
0030 private:
0031     class Private;
0032     std::unique_ptr<Private> d;
0033 };
0034 
0035 } // namespace glaxnimate::android
0036 
0037 #endif // DOCUMENT_OPENER_HPP