File indexing completed on 2024-05-19 05:08:19
0001 /* 0002 SPDX-FileCopyrightText: 2000-2002 Michael Edwardes <mte@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2005 Andrea Nicolai <Andreas.Nicolai@gmx.net> 0004 SPDX-FileCopyrightText: 2006 Thomas Baumgart <ipwizard@users.sourceforge.net> 0005 SPDX-FileCopyrightText: 2000-2002 Javier Campos Morales <javi_c@users.sourceforge.net> 0006 SPDX-FileCopyrightText: 2000-2002 Felix Rodriguez <frodriguez@users.sourceforge.net> 0007 SPDX-FileCopyrightText: 2000-2002 John C <thetacoturtle@users.sourceforge.net> 0008 SPDX-FileCopyrightText: 2000-2002 Kevin Tambascio <ktambascio@users.sourceforge.net> 0009 SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0010 SPDX-License-Identifier: GPL-2.0-or-later 0011 */ 0012 0013 #ifndef KPAYEESVIEW_H 0014 #define KPAYEESVIEW_H 0015 0016 // ---------------------------------------------------------------------------- 0017 // QT Includes 0018 0019 #include <QString> 0020 #include <QModelIndexList> 0021 0022 // ---------------------------------------------------------------------------- 0023 // KDE Includes 0024 0025 // ---------------------------------------------------------------------------- 0026 // Project Includes 0027 0028 #include "kmymoneyviewbase.h" 0029 0030 struct ContactData; 0031 class MyMoneyContact; 0032 class MyMoneyPayee; 0033 class QItemSelection; 0034 0035 /** 0036 * @author Michael Edwardes, Thomas Baumgart 0037 */ 0038 0039 /** 0040 * This class represents an item in the payees list view. 0041 */ 0042 class KPayeesViewPrivate; 0043 class KPayeesView : public KMyMoneyViewBase 0044 { 0045 Q_DECLARE_PRIVATE(KPayeesView) 0046 Q_OBJECT 0047 0048 public: 0049 explicit KPayeesView(QWidget *parent = nullptr); 0050 ~KPayeesView() override; 0051 0052 void executeAction(eMenu::Action action, const SelectedObjects& selections) override; 0053 0054 void updateActions(const SelectedObjects& selections) override; 0055 0056 public Q_SLOTS: 0057 void slotHelp(); 0058 void slotSettingsChanged() override; 0059 0060 Q_SIGNALS: 0061 void transactionSelected(const QString& accountId, const QString& transactionId); 0062 0063 protected: 0064 void aboutToShow() override; 0065 void aboutToHide() override; 0066 0067 private Q_SLOTS: 0068 /** 0069 * This slot is called whenever the selection in m_payeesList 0070 * is about to change. 0071 */ 0072 void slotPayeeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); 0073 0074 /** 0075 * This slot marks the current selected payee as modified (dirty). 0076 */ 0077 void slotPayeeDataChanged(); 0078 void slotKeyListChanged(); 0079 0080 void slotRenameSinglePayee(const QModelIndex& idx, const QVariant& value); 0081 0082 /** 0083 * Updates the payee data in m_payee from the information in the 0084 * payee information widget. 0085 */ 0086 void slotUpdatePayee(); 0087 0088 void slotChooseDefaultAccount(); 0089 0090 /** 0091 * Fetches the payee data from addressbook. 0092 */ 0093 void slotSyncAddressBook(); 0094 void slotContactFetched(const ContactData &identity); 0095 0096 /** 0097 * Creates mail to payee. 0098 */ 0099 void slotSendMail(); 0100 0101 void slotNewPayee(); 0102 void slotRenamePayee(); 0103 void slotDeletePayee(); 0104 void slotMergePayee(); 0105 0106 void slotModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); 0107 0108 }; 0109 0110 #endif