File indexing completed on 2025-05-04 04:45:10
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 SKGIMPORTPLUGINSKG_H 0007 #define SKGIMPORTPLUGINSKG_H 0008 /** @file 0009 * This file is Skrooge plugin for SKG 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 SKG import / export. 0019 */ 0020 class SKGImportPluginSkg : 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 SKGImportPluginSkg(QObject* iImporter, const QVariantList& iArg); 0032 0033 /** 0034 * Default Destructor 0035 */ 0036 ~SKGImportPluginSkg() override; 0037 0038 /** 0039 * To know if import is possible with this plugin 0040 */ 0041 bool isImportPossible() override; 0042 0043 /** 0044 * Import a file 0045 * @return an object managing the error. 0046 * @see SKGError 0047 */ 0048 SKGError importFile() override; 0049 0050 /** 0051 * To know if export is possible with this plugin 0052 * @return true or false 0053 */ 0054 bool isExportPossible() override; 0055 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(SKGImportPluginSkg) 0073 0074 static SKGError copyParameters(const SKGObjectBase& iFrom, const SKGObjectBase& iTo); 0075 }; 0076 0077 #endif // SKGIMPORTPLUGINSKG_H