1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2021 S. MANKOWSKI stephane@mankowski.fr
3  * SPDX-FileCopyrightText: 2021 G. DE BURE support@mankowski.fr
4  * SPDX-License-Identifier: GPL-3.0-or-later
5  ***************************************************************************/
6 #ifndef SKGIMPORTPLUGINSKG_H
7 #define SKGIMPORTPLUGINSKG_H
8 /** @file
9 * This file is Skrooge plugin for SKG import / export.
10 *
11 * @author Stephane MANKOWSKI / Guillaume DE BURE
12 */
13 #include "skgimportplugin.h"
14 
15 class SKGObjectBase;
16 
17 /**
18  * This file is Skrooge plugin for SKG import / export.
19  */
20 class SKGImportPluginSkg : public SKGImportPlugin
21 {
22     Q_OBJECT
23     Q_INTERFACES(SKGImportPlugin)
24 
25 public:
26     /**
27      * Default constructor
28      * @param iImporter the parent importer
29      * @param iArg the arguments
30      */
31     explicit SKGImportPluginSkg(QObject* iImporter, const QVariantList& iArg);
32 
33     /**
34      * Default Destructor
35      */
36     ~SKGImportPluginSkg() override;
37 
38     /**
39      * To know if import is possible with this plugin
40      */
41     bool isImportPossible() override;
42 
43     /**
44      * Import a file
45      * @return an object managing the error.
46      *   @see SKGError
47      */
48     SKGError importFile() override;
49 
50     /**
51      * To know if export is possible with this plugin
52      * @return true or false
53      */
54     bool isExportPossible() override;
55 
56 
57     /**
58      * Export a file
59      * @return an object managing the error.
60      *   @see SKGError
61      */
62     SKGError exportFile() override;
63 
64     /**
65      * Return the mime type filter
66      * @return the mime type filter. Example: "*.csv|CSV file"
67      */
68     QString getMimeTypeFilter() const override;
69 
70 
71 private:
72     Q_DISABLE_COPY(SKGImportPluginSkg)
73 
74     static SKGError copyParameters(const SKGObjectBase& iFrom, const SKGObjectBase& iTo);
75 };
76 
77 #endif  // SKGIMPORTPLUGINSKG_H
78