File indexing completed on 2024-05-19 05:08:20
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-License-Identifier: GPL-2.0-or-later 0010 */ 0011 #ifndef KSCHEDULEDVIEW_H 0012 #define KSCHEDULEDVIEW_H 0013 0014 // ---------------------------------------------------------------------------- 0015 // QT Includes 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 #include "kmymoneyviewbase.h" 0024 0025 class QItemSelection; 0026 class MyMoneySchedule; 0027 class MyMoneyAccount; 0028 class SelectedObjects; 0029 0030 namespace eDialogs { 0031 enum class ScheduleResultCode; 0032 } 0033 namespace eView { 0034 namespace Schedules { 0035 enum class Requester; 0036 } 0037 } 0038 0039 /** 0040 * Contains all the scheduled transactions be they bills, deposits or transfers. 0041 * Encapsulates all the operations including adding, editing and deleting. 0042 * Used by the KMyMoneyView class to show the view. 0043 * 0044 * @author Michael Edwardes 2000-2002 0045 * $Id: kscheduledview.h,v 1.33 2009/03/01 19:13:08 ipwizard Exp $ 0046 * 0047 * @short A class to encapsulate recurring transaction operations. 0048 */ 0049 0050 class KScheduledViewPrivate; 0051 class KScheduledView : public KMyMoneyViewBase 0052 { 0053 Q_OBJECT 0054 0055 public: 0056 /** 0057 * Standard constructor for QWidgets. 0058 */ 0059 explicit KScheduledView(QWidget *parent = nullptr); 0060 0061 /** 0062 * Standard destructor. 0063 */ 0064 ~KScheduledView() override; 0065 0066 // TODO: remove that function 0067 /** 0068 * ugly proxy function 0069 */ 0070 eDialogs::ScheduleResultCode enterSchedule(MyMoneySchedule& schedule, bool autoEnter, bool extendedKeys); 0071 0072 void slotSettingsChanged() override; 0073 0074 public Q_SLOTS: 0075 void slotEditSchedule(); 0076 0077 void slotEnterOverdueSchedules(const MyMoneyAccount& acc); 0078 0079 void updateActions(const SelectedObjects& selections) override; 0080 0081 Q_SIGNALS: 0082 void enterOverdueSchedulesFinished(eView::Schedules::Requester req); 0083 0084 protected: 0085 void showEvent(QShowEvent* event) override; 0086 0087 private: 0088 Q_DECLARE_PRIVATE(KScheduledView) 0089 0090 private Q_SLOTS: 0091 void slotListViewCollapsed(const QModelIndex& idx); 0092 void slotListViewExpanded(const QModelIndex& idx); 0093 0094 void slotSetSelectedItem(const QItemSelection& selected, const QItemSelection& deselected); 0095 0096 void slotNewSchedule(); 0097 void slotDeleteSchedule(); 0098 void slotDuplicateSchedule(); 0099 void slotEnterSchedule(); 0100 void slotSkipSchedule(); 0101 }; 0102 0103 #endif