File indexing completed on 2024-05-12 16:42:55

0001 /*
0002     SPDX-FileCopyrightText: 2005-2018 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KMMSTATEMENTINTERFACE_H
0008 #define KMMSTATEMENTINTERFACE_H
0009 
0010 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 // ----------------------------------------------------------------------------
0014 // KDE Includes
0015 
0016 // ----------------------------------------------------------------------------
0017 // Project Includes
0018 
0019 class MyMoneyAccount;
0020 class MyMoneyKeyValueContainer;
0021 
0022 #include "statementinterface.h"
0023 
0024 namespace KMyMoneyPlugin
0025 {
0026 
0027 /**
0028   * This class represents the implementation of the
0029   * StatementInterface.
0030   */
0031 class KMMStatementInterface : public StatementInterface
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036     explicit KMMStatementInterface(QObject* parent, const char* name = 0);
0037     ~KMMStatementInterface() {}
0038 
0039     virtual void resetMessages() const final override;
0040     virtual void showMessages(int statementCount) const final override;
0041 
0042     /**
0043       * This method imports a MyMoneyStatement into the engine
0044       */
0045     QStringList import(const MyMoneyStatement& s, bool silent = false) final override;
0046 
0047     /**
0048      * This method returns the account for a given @a key - @a value pair.
0049      * If the account is not found in the list of accounts, MyMoneyAccount()
0050      * is returned. The @a key - @a value pair can be in the account's kvp
0051      * container or the account's online settings kvp container.
0052      */
0053     MyMoneyAccount account(const QString& key, const QString& value) const final override;
0054 
0055     /**
0056      * This method stores the online parameters in @a kvps used by the plugin
0057      * with the account @a acc.
0058      */
0059     void setAccountOnlineParameters(const MyMoneyAccount&acc, const MyMoneyKeyValueContainer& kvps) const final override;
0060 };
0061 
0062 } // namespace
0063 #endif