File indexing completed on 2024-06-16 04:47:18

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 SKGIMPORTPLUGINAFB120_H
0007 #define SKGIMPORTPLUGINAFB120_H
0008 /** @file
0009 * This file is Skrooge plugin for AFB120 import / export.
0010 *
0011 * @author Stephane MANKOWSKI / Guillaume DE BURE
0012 */
0013 #include "skgimportplugin.h"
0014 
0015 /**
0016  * This file is Skrooge plugin for AFB120 import / export.
0017  */
0018 class SKGImportPluginAFB120 : 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 the arguments
0028      */
0029     explicit SKGImportPluginAFB120(QObject* iImporter, const QVariantList& iArg);
0030 
0031     /**
0032      * Default Destructor
0033      */
0034     ~SKGImportPluginAFB120() 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      * Return the mime type filter
0050      * @return the mime type filter. Example: "*.csv|CSV file"
0051      */
0052     QString getMimeTypeFilter() const override;
0053 
0054 
0055 private:
0056     Q_DISABLE_COPY(SKGImportPluginAFB120)
0057 
0058     double toAmount(const QString& iAmount, int iNbDecimal);
0059 };
0060 
0061 #endif  // SKGIMPORTPLUGINAFB120_H