File indexing completed on 2024-05-19 05:06:54
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 <QFileDialog> 0013 #include <QObject> 0014 #include <QString> 0015 #include <QUrl> 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 #include <kmm_plugin_export.h> 0024 0025 namespace KMyMoneyPlugin { 0026 0027 /** 0028 * This abstract class represents the ImportInterface to 0029 * add new importers to KMyMoney. 0030 */ 0031 class KMM_PLUGIN_EXPORT ImportInterface : public QObject 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 explicit ImportInterface(QObject* parent, const char* name = 0); 0037 virtual ~ImportInterface(); 0038 0039 /** 0040 * This method is provided by KMyMoney to select a file to 0041 * be imported. A caption for the dialog can be provided via 0042 * @a title, a specific directory to be started with as @a path. 0043 * Which files are selectable is controlled via the contents 0044 * of @a mask. @a mode controls the behavior of the dialog. In case 0045 * the importer requires additional information, it can provide 0046 * a widget to ask for them. If none are required, pass 0. 0047 * 0048 * @note In case you create a widget and pass it to selectFile() 0049 * you are responsible to delete the widget. It will not be deleted 0050 * automatically during the destruction of the dialog. 0051 */ 0052 virtual QUrl selectFile(const QString& title, const QString& path, const QString& mask, QFileDialog::FileMode mode, QWidget* widget) const = 0; 0053 0054 Q_SIGNALS: 0055 }; 0056 0057 } // namespace 0058 #endif