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

0001 /*
0002     SPDX-FileCopyrightText: 2000-2002 Michael Edwardes <mte@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2000-2002 Javier Campos Morales <javi_c@users.sourceforge.net>
0004     SPDX-FileCopyrightText: 2000-2002 Felix Rodriguez <frodriguez@users.sourceforge.net>
0005     SPDX-FileCopyrightText: 2000-2002 John C <thetacoturtle@users.sourceforge.net>
0006     SPDX-FileCopyrightText: 2000-2002 Thomas Baumgart <ipwizard@users.sourceforge.net>
0007     SPDX-FileCopyrightText: 2000-2002 Kevin Tambascio <ktambascio@users.sourceforge.net>
0008     SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0009     SPDX-FileCopyrightText: 2021 Dawid Wróbel <me@dawidwrobel.com>
0010     SPDX-License-Identifier: GPL-2.0-or-later
0011 */
0012 #ifndef KHOMEVIEW_H
0013 #define KHOMEVIEW_H
0014 
0015 // ----------------------------------------------------------------------------
0016 // QT Includes
0017 
0018 // ----------------------------------------------------------------------------
0019 // KDE Includes
0020 
0021 // ----------------------------------------------------------------------------
0022 // Project Includes
0023 
0024 #include "kmymoneyviewbase.h"
0025 
0026 /**
0027   * Displays a 'home page' for the user.  Similar to concepts used in
0028   * quicken and m$-money.
0029   *
0030   * @author Michael Edwardes
0031   *
0032   * @short A view containing the home page for kmymoney.
0033 **/
0034 
0035 class KHomeViewPrivate;
0036 class KHomeView : public KMyMoneyViewBase
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041     explicit KHomeView(QWidget *parent = nullptr);
0042     ~KHomeView() override;
0043 
0044     void executeCustomAction(eView::Action action) override;
0045     void executeAction(eMenu::Action action, const SelectedObjects& selections) override;
0046     void refresh();
0047 
0048 protected:
0049     void resizeEvent(QResizeEvent* event) override;
0050     void showEvent(QShowEvent* event) override;
0051     bool eventFilter(QObject* o, QEvent* e) override;
0052 
0053 public Q_SLOTS:
0054     /**
0055       * Print the current view
0056       */
0057     void slotPrintView();
0058     void slotPrintPreviewView();
0059     void slotSettingsChanged() override;
0060     void slotDisableRefresh();
0061     void slotEnableRefresh();
0062 
0063 private:
0064     Q_DECLARE_PRIVATE(KHomeView)
0065 
0066 private Q_SLOTS:
0067     void slotOpenUrl(const QUrl &url);
0068     void slotAdjustScrollPos();
0069 };
0070 
0071 #endif