File indexing completed on 2024-06-23 05:03:16

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 SKGIMPORTPLUGINQIF_H
0007 #define SKGIMPORTPLUGINQIF_H
0008 /** @file
0009 * This file is Skrooge plugin for QIF import / export.
0010 *
0011 * @author Stephane MANKOWSKI / Guillaume DE BURE
0012 */
0013 #include "skgimportplugin.h"
0014 
0015 /**
0016  * This file is Skrooge plugin for QIF import / export.
0017  */
0018 class SKGImportPluginQif : public SKGImportPlugin
0019 {
0020     Q_OBJECT
0021     Q_INTERFACES(SKGImportPlugin)
0022 
0023 public:
0024     /**
0025      * Default constructor
0026      * @param iImporter the parent importer
0027      * @param iArg arguments
0028      */
0029     explicit SKGImportPluginQif(QObject* iImporter, const QVariantList& iArg);
0030 
0031     /**
0032      * Default Destructor
0033      */
0034     ~SKGImportPluginQif() override;
0035 
0036     /**
0037      * To know if import is possible with this plugin
0038      */
0039     bool isImportPossible() override;
0040 
0041     /**
0042      * Import a file
0043      * @return an object managing the error.
0044      *   @see SKGError
0045      */
0046     SKGError importFile() override;
0047 
0048     /**
0049      * To know if export is possible with this plugin
0050      * @return true or false
0051      */
0052     bool isExportPossible() override;
0053 
0054 
0055     /**
0056      * Export a file
0057      * @return an object managing the error.
0058      *   @see SKGError
0059      */
0060     SKGError exportFile() override;
0061 
0062     /**
0063      * Return the mime type filter
0064      * @return the mime type filter. Example: "*.csv|CSV file"
0065      */
0066     QString getMimeTypeFilter() const override;
0067 
0068 
0069 private:
0070     Q_DISABLE_COPY(SKGImportPluginQif)
0071 
0072     QMap<QString, SKGAccountObject> m_accountCache;
0073 };
0074 
0075 #endif  // SKGIMPORTPLUGINQIF_H