File indexing completed on 2024-05-12 05:07:05
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 * This class represents the implementation of the 0028 * StatementInterface. 0029 */ 0030 class KMMStatementInterface : public StatementInterface 0031 { 0032 Q_OBJECT 0033 0034 public: 0035 explicit KMMStatementInterface(QObject* parent, const char* name = 0); 0036 ~KMMStatementInterface() 0037 { 0038 } 0039 0040 virtual void resetMessages() const final override; 0041 virtual void showMessages(int statementCount) const final override; 0042 0043 /** 0044 * This method imports a MyMoneyStatement into the engine 0045 */ 0046 QStringList import(const MyMoneyStatement& s, bool silent = false) final override; 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. The @a key - @a value pair can be in the account's kvp 0052 * container or the account's online settings kvp container. 0053 */ 0054 MyMoneyAccount account(const QString& key, const QString& value) const final override; 0055 0056 /** 0057 * This method stores the online parameters in @a kvps used by the plugin 0058 * with the account @a acc. 0059 */ 0060 void setAccountOnlineParameters(const MyMoneyAccount& acc, const MyMoneyKeyValueContainer& kvps) const final override; 0061 }; 0062 0063 } // namespace 0064 #endif