File indexing completed on 2024-05-12 16:43:40

0001 /*
0002     SPDX-FileCopyrightText: 2008 Thomas Baumgart <ipwizard@users.sourceforge.net>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef IMPORTINTERFACE_H
0007 #define IMPORTINTERFACE_H
0008 
0009 // ----------------------------------------------------------------------------
0010 // QT Includes
0011 
0012 #include <QObject>
0013 #include <QString>
0014 #include <QUrl>
0015 #include <QFileDialog>
0016 
0017 // ----------------------------------------------------------------------------
0018 // KDE Includes
0019 
0020 // ----------------------------------------------------------------------------
0021 // Project Includes
0022 
0023 #include <kmm_plugin_export.h>
0024 
0025 namespace KMyMoneyPlugin
0026 {
0027 
0028 /**
0029   * This abstract class represents the ImportInterface to
0030   * add new importers to KMyMoney.
0031   */
0032 class KMM_PLUGIN_EXPORT ImportInterface : public QObject
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037     explicit ImportInterface(QObject* parent, const char* name = 0);
0038     virtual ~ImportInterface();
0039 
0040     /**
0041      * This method is provided by KMyMoney to select a file to
0042      * be imported. A caption for the dialog can be provided via
0043      * @a title, a specific directory to be started with as @a path.
0044      * Which files are selectable is controlled via the contents
0045      * of @a mask. @a mode controls the behavior of the dialog. In case
0046      * the importer requires additional information, it can provide
0047      * a widget to ask for them. If none are required, pass 0.
0048      *
0049      * @note In case you create a widget and pass it to selectFile()
0050      * you are responsible to delete the widget. It will not be deleted
0051      * automatically during the destruction of the dialog.
0052      */
0053     virtual QUrl selectFile(const QString& title, const QString& path, const QString& mask, QFileDialog::FileMode mode, QWidget *widget) const = 0;
0054 
0055 Q_SIGNALS:
0056 };
0057 
0058 } // namespace
0059 #endif