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