KMyMoney Plugin API

viewinterface.h
1/*
2 SPDX-FileCopyrightText: 2005 Thomas Baumgart <ipwizard@users.sourceforge.net>
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
28namespace KMyMoneyRegister {
29class SelectedTransactions;
30}
31
32enum class View;
33
34class MyMoneyInstitution;
35class MyMoneyAccount;
36class MyMoneySplit;
37class MyMoneyTransaction;
38class KMyMoneyViewBase;
39
40namespace 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 */
47class KMM_PLUGIN_EXPORT ViewInterface : public QObject
48{
49 Q_OBJECT
50
51public:
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
58Q_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...
void accountSelected(const MyMoneyAccount &acc)
This signal is emitted when a new account has been selected by the GUI.
void accountReconciled(const MyMoneyAccount &account, const QDate &date, const MyMoneyMoney &startingBalance, const MyMoneyMoney &endingBalance, const QStringList &transactionList)
This signal is emitted when an account has been successfully reconciled and all transactions are upda...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:13 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.