File indexing completed on 2024-05-12 05:07:40

0001 /*
0002 * SPDX-FileCopyrightText: 2007-2019 Thomas Baumgart <tbaumgart@kde.org>
0003 * SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0004 *
0005 * SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KINSTITUTIONSVIEW_H
0009 #define KINSTITUTIONSVIEW_H
0010 
0011 // ----------------------------------------------------------------------------
0012 // QT Includes
0013 
0014 // ----------------------------------------------------------------------------
0015 // KDE Includes
0016 
0017 // ----------------------------------------------------------------------------
0018 // Project Includes
0019 
0020 #include "kmymoneyviewbase.h"
0021 
0022 class MyMoneyInstitution;
0023 class MyMoneyMoney;
0024 class SelectedObjects;
0025 
0026 /**
0027   * @author Thomas Baumgart
0028   */
0029 /**
0030   * This class implements the institutions hierarchical 'view'.
0031   */
0032 class KInstitutionsViewPrivate;
0033 class KInstitutionsView : public KMyMoneyViewBase
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038     explicit KInstitutionsView(QWidget *parent = nullptr);
0039     ~KInstitutionsView();
0040 
0041 public Q_SLOTS:
0042     void slotNetWorthChanged(const MyMoneyMoney &netWorth, bool isApproximate);
0043     void slotEditInstitution();
0044 
0045     void slotSettingsChanged() override;
0046     void updateActions(const SelectedObjects& selections) override;
0047 
0048 protected:
0049     bool eventFilter(QObject *watched, QEvent *event) override;
0050 
0051 private:
0052     Q_DECLARE_PRIVATE(KInstitutionsView)
0053 
0054 private Q_SLOTS:
0055     void slotNewInstitution();
0056     void slotDeleteInstitution();
0057 };
0058 
0059 #endif