1 /* 2 * Flare Tiled Plugin 3 * Copyright 2010, Jaderamiso <jaderamiso@gmail.com> 4 * Copyright 2011, Stefan Beller <stefanbeller@googlemail.com> 5 * 6 * This file is part of Tiled. 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by the Free 10 * Software Foundation; either version 2 of the License, or (at your option) 11 * any later version. 12 * 13 * This program is distributed in the hope that it will be useful, but WITHOUT 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 16 * more details. 17 * 18 * You should have received a copy of the GNU General Public License along with 19 * this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #pragma once 23 24 #include "flare_global.h" 25 26 #include "mapformat.h" 27 28 #include <QObject> 29 #include <QMap> 30 31 namespace Flare { 32 33 class FLARESHARED_EXPORT FlarePlugin : public Tiled::MapFormat 34 { 35 Q_OBJECT 36 Q_INTERFACES(Tiled::MapFormat) 37 Q_PLUGIN_METADATA(IID "org.mapeditor.MapFormat" FILE "plugin.json") 38 39 public: 40 FlarePlugin(); 41 42 std::unique_ptr<Tiled::Map> read(const QString &fileName) override; 43 bool supportsFile(const QString &fileName) const override; 44 45 bool write(const Tiled::Map *map, const QString &fileName, Options options) override; 46 QString nameFilter() const override; 47 QString shortName() const override; 48 QString errorString() const override; 49 50 private: 51 QString mError; 52 }; 53 54 } // namespace Flare 55