KMyMoney Plugin API

viewinterface.h
1 /*
2  SPDX-FileCopyrightText: 2005 Thomas Baumgart <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 // krazy:excludeall=dpointer
7 
8 #ifndef VIEWINTERFACE_H
9 #define VIEWINTERFACE_H
10 
11 // ----------------------------------------------------------------------------
12 // QT Includes
13 
14 #include <QObject>
15 
16 // ----------------------------------------------------------------------------
17 // KDE Includes
18 
19 // ----------------------------------------------------------------------------
20 // Project Includes
21 
22 #include "mymoneysplit.h"
23 #include "mymoneytransaction.h"
24 
25 #include "icons.h"
26 #include <kmm_plugin_export.h>
27 
28 namespace KMyMoneyRegister {
29 class SelectedTransactions;
30 }
31 
32 enum class View;
33 
34 class MyMoneyInstitution;
35 class MyMoneyAccount;
36 class MyMoneySplit;
37 class MyMoneyTransaction;
38 class KMyMoneyViewBase;
39 
40 namespace KMyMoneyPlugin {
41 
42 /**
43  * This abstract class represents the ViewInterface to
44  * add new view pages to the JanusWidget of KMyMoney. It
45  * also gives access to the account context menu.
46  */
47 class KMM_PLUGIN_EXPORT ViewInterface : public QObject
48 {
49  Q_OBJECT
50 
51 public:
52  explicit ViewInterface(QObject* parent, const char* name = 0);
53  virtual ~ViewInterface();
54 
55  virtual void addView(KMyMoneyViewBase* view, const QString& name, View idView, Icons::Icon icon) = 0;
56  virtual void removeView(View idView) = 0;
57 
58 Q_SIGNALS:
59  /**
60  * This signal is emitted when a new account has been selected by
61  * the GUI. If no account is selected or the selection is removed,
62  * @a account is identical to MyMoneyAccount(). This signal is used
63  * by plugins to get information about changes.
64  */
65  void accountSelected(const MyMoneyAccount& acc);
66 
67  /**
68  * This signal is emitted when an account has been successfully reconciled
69  * and all transactions are updated in the engine. It can be used by plugins
70  * to create reconciliation reports.
71  *
72  * @param account the account data
73  * @param date the reconciliation date as provided through the dialog
74  * @param startingBalance the starting balance as provided through the dialog
75  * @param endingBalance the ending balance as provided through the dialog
76  * @param transactionList reference to QStringList of JournalEntryIds
77  */
78  void accountReconciled(const MyMoneyAccount& account,
79  const QDate& date,
80  const MyMoneyMoney& startingBalance,
81  const MyMoneyMoney& endingBalance,
82  const QStringList& transactionList);
83 
84  void viewStateChanged(bool);
85 };
86 
87 } // namespace
88 #endif
This abstract class represents the ViewInterface to add new view pages to the JanusWidget of KMyMoney...
Definition: viewinterface.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 19 2021 23:23:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.