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

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 <QImageReader>
0010 
0011 #include "io/base.hpp"
0012 #include "io/io_registry.hpp"
0013 #include "model/shapes/image.hpp"
0014 #include "model/assets/assets.hpp"
0015 
0016 namespace glaxnimate::io::raster {
0017 
0018 
0019 class RasterFormat : public ImportExport
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     QString slug() const override { return "raster"; }
0025     QString name() const override { return i18n("Raster Image"); }
0026     QStringList extensions() const override;
0027     bool can_save() const override { return false; }
0028     bool can_open() const override { return true; }
0029     int priority() const override { return -1; }
0030 
0031 protected:
0032     bool on_open(QIODevice& dev, const QString&, model::Document* document, const QVariantMap&) override;
0033 
0034 private:
0035     static Autoreg<RasterFormat> autoreg;
0036 };
0037 
0038 
0039 } // namespace glaxnimate::io::raster
0040