KMyMoney Plugin API

importinterface.h
1/*
2 SPDX-FileCopyrightText: 2008 Thomas Baumgart <ipwizard@users.sourceforge.net>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#ifndef IMPORTINTERFACE_H
7#define IMPORTINTERFACE_H
8
9// ----------------------------------------------------------------------------
10// QT Includes
11
12#include <QFileDialog>
13#include <QObject>
14#include <QString>
15#include <QUrl>
16
17// ----------------------------------------------------------------------------
18// KDE Includes
19
20// ----------------------------------------------------------------------------
21// Project Includes
22
23#include <kmm_plugin_export.h>
24
25namespace KMyMoneyPlugin {
26
27/**
28 * This abstract class represents the ImportInterface to
29 * add new importers to KMyMoney.
30 */
31class KMM_PLUGIN_EXPORT ImportInterface : public QObject
32{
34
35public:
36 explicit ImportInterface(QObject* parent, const char* name = nullptr);
37 virtual ~ImportInterface();
38
39 /**
40 * This method is provided by KMyMoney to select a file to
41 * be imported. A caption for the dialog can be provided via
42 * @a title, @a recentDirId if not empty is an identifier to be used
43 * to load and store the selected directory in KRecentDirs.
44 *
45 * Which files are selectable is controlled via the contents
46 * of @a mask. @a mode controls the behavior of the dialog. In case
47 * the importer requires additional information, it can provide
48 * a widget to ask for them. If none are required, pass 0.
49 *
50 * @note In case you create a widget and pass it to selectFile()
51 * you are responsible to delete the widget. It will not be deleted
52 * automatically during the destruction of the dialog.
53 */
54 virtual QUrl selectFile(const QString& title, const QString& recentDirId, const QString& mask, QFileDialog::FileMode mode, QWidget* widget) const = 0;
55
57};
58
59} // namespace
60#endif
virtual QUrl selectFile(const QString &title, const QString &recentDirId, const QString &mask, QFileDialog::FileMode mode, QWidget *widget) const =0
This method is provided by KMyMoney to select a file to be imported.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.