File indexing completed on 2025-01-05 04:01:15

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "io/base.hpp"
0010 
0011 namespace glaxnimate::io::lottie {
0012 
0013 
0014 class LottieHtmlFormat : public ImportExport
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     QString slug() const override { return "lottie_html"; }
0020     QString name() const override { return i18n("Lottie HTML Preview"); }
0021     QStringList extensions() const override { return {"html", "htm"}; }
0022     bool can_save() const override { return true; }
0023     bool can_open() const override { return false; }
0024 
0025     static QByteArray html_head(ImportExport* ie, model::Composition* comp, const QString& extra);
0026 
0027 private:
0028     bool on_save(QIODevice& file, const QString& filename,
0029                  model::Composition* comp, const QVariantMap& setting_values) override;
0030 };
0031 
0032 
0033 } // namespace glaxnimate::io::lottie
0034