File indexing completed on 2025-01-05 04:01:13
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 #include "io/io_registry.hpp" 0011 0012 namespace glaxnimate::io::avd { 0013 0014 0015 class AvdFormat : public ImportExport 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 QString slug() const override { return "avd"; } 0021 QString name() const override { return i18n("Android Vector Drawable"); } 0022 QStringList extensions() const override { return {"xml"}; } 0023 bool can_save() const override { return true; } 0024 bool can_open() const override { return true; } 0025 0026 protected: 0027 bool on_open(QIODevice& file, const QString&, model::Document* document, const QVariantMap& options) override; 0028 bool on_save(QIODevice & file, const QString & filename, model::Composition* comp, const QVariantMap & setting_values) override; 0029 0030 private: 0031 static Autoreg<AvdFormat> autoreg; 0032 }; 0033 0034 0035 } // namespace glaxnimate::io::avd 0036 0037