1 /* 2 * Copyright (c) 2008 Cyrille Berger <cberger@cberger.net> 3 * 4 * This library is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation; version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef _KIS_XMP_IO_H_ 20 #define _KIS_XMP_IO_H_ 21 22 #include <kis_meta_data_io_backend.h> 23 24 #include <klocalizedstring.h> 25 26 class KisXMPIO : public KisMetaData::IOBackend 27 { 28 struct Private; 29 public: 30 KisXMPIO(); 31 ~KisXMPIO() override; id()32 QString id() const override { 33 return "xmp"; 34 } name()35 QString name() const override { 36 return i18n("XMP"); 37 } type()38 BackendType type() const override { 39 return Text; 40 } supportSaving()41 bool supportSaving() const override { 42 return true; 43 } 44 bool saveTo(KisMetaData::Store* store, QIODevice* ioDevice, HeaderType headerType = NoHeader) const override; canSaveAllEntries(KisMetaData::Store *)45 bool canSaveAllEntries(KisMetaData::Store*) const override { 46 return true; 47 } supportLoading()48 bool supportLoading() const override { 49 return true; 50 } 51 bool loadFrom(KisMetaData::Store* store, QIODevice* ioDevice) const override; 52 }; 53 54 #endif 55