File indexing completed on 2025-02-02 04:57:03
0001 /*************************************************************************** 0002 * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr 0003 * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 ***************************************************************************/ 0006 #ifndef SKGIMPORTPLUGINXML_H 0007 #define SKGIMPORTPLUGINXML_H 0008 /** @file 0009 * This file is Skrooge plugin for XML import / export. 0010 * 0011 * @author Stephane MANKOWSKI / Guillaume DE BURE 0012 */ 0013 #include "skgimportplugin.h" 0014 0015 class SKGObjectBase; 0016 0017 /** 0018 * This file is Skrooge plugin for XML import / export. 0019 */ 0020 class SKGImportPluginXml : public SKGImportPlugin 0021 { 0022 Q_OBJECT 0023 Q_INTERFACES(SKGImportPlugin) 0024 0025 public: 0026 /** 0027 * Default constructor 0028 * @param iImporter the parent importer 0029 * @param iArg the arguments 0030 */ 0031 explicit SKGImportPluginXml(QObject* iImporter, const QVariantList& iArg); 0032 0033 /** 0034 * Default Destructor 0035 */ 0036 ~SKGImportPluginXml() override; 0037 0038 /** 0039 * To know if import is possible with this plugin 0040 * @return true or false 0041 */ 0042 bool isImportPossible() override; 0043 0044 /** 0045 * Import a file 0046 * @return an object managing the error. 0047 * @see SKGError 0048 */ 0049 SKGError importFile() override; 0050 0051 /** 0052 * To know if export is possible with this plugin 0053 * @return true or false 0054 */ 0055 bool isExportPossible() override; 0056 0057 /** 0058 * Export a file 0059 * @return an object managing the error. 0060 * @see SKGError 0061 */ 0062 SKGError exportFile() override; 0063 0064 /** 0065 * Return the mime type filter 0066 * @return the mime type filter. Example: "*.csv|CSV file" 0067 */ 0068 QString getMimeTypeFilter() const override; 0069 0070 0071 private: 0072 Q_DISABLE_COPY(SKGImportPluginXml) 0073 }; 0074 0075 #endif // SKGIMPORTPLUGINXML_H