File indexing completed on 2024-05-12 05:06:12

0001 /*
0002     SPDX-FileCopyrightText: 2005-2018 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef STATEMENTINTERFACE_H
0007 #define STATEMENTINTERFACE_H
0008 
0009 // ----------------------------------------------------------------------------
0010 // QT Includes
0011 
0012 #include <QObject>
0013 
0014 // ----------------------------------------------------------------------------
0015 // KDE Includes
0016 
0017 // ----------------------------------------------------------------------------
0018 // Project Includes
0019 
0020 #include <kmm_plugin_export.h>
0021 
0022 class MyMoneyAccount;
0023 class MyMoneyStatement;
0024 class MyMoneyKeyValueContainer;
0025 
0026 namespace KMyMoneyPlugin {
0027 
0028 /**
0029  * This abstract class represents the interface to import statements
0030  * into the KMyMoney application
0031  */
0032 class KMM_PLUGIN_EXPORT StatementInterface : public QObject
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037     explicit StatementInterface(QObject* parent, const char* name = 0);
0038     virtual ~StatementInterface();
0039 
0040     virtual void resetMessages() const = 0;
0041     virtual void showMessages(int statementCount) const = 0;
0042 
0043     /**
0044      * This method imports a MyMoneyStatement into the engine
0045      */
0046     virtual QStringList import(const MyMoneyStatement& s, bool silent = false) = 0;
0047 
0048     /**
0049      * This method returns the account for a given @a key - @a value pair.
0050      * If the account is not found in the list of accounts, MyMoneyAccount()
0051      * is returned.
0052      */
0053     virtual MyMoneyAccount account(const QString& key, const QString& value) const = 0;
0054 
0055     /**
0056      */
0057     virtual void setAccountOnlineParameters(const MyMoneyAccount& acc, const MyMoneyKeyValueContainer& kvps) const = 0;
0058 };
0059 
0060 } // namespace
0061 #endif