File indexing completed on 2024-05-19 05:06:50
0001 /* 0002 SPDX-FileCopyrightText: 2007-2011 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KCONFIRMMANUALENTERDLG_H 0008 #define KCONFIRMMANUALENTERDLG_H 0009 0010 #include "kmm_base_dialogs_export.h" 0011 0012 // ---------------------------------------------------------------------------- 0013 // QT Includes 0014 0015 #include <QDialog> 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 class MyMoneySchedule; 0024 class MyMoneyTransaction; 0025 0026 namespace Ui { 0027 class KConfirmManualEnterDlg; 0028 } 0029 0030 class KMM_BASE_DIALOGS_EXPORT KConfirmManualEnterDlg : public QDialog 0031 { 0032 Q_OBJECT 0033 Q_DISABLE_COPY(KConfirmManualEnterDlg) 0034 0035 public: 0036 explicit KConfirmManualEnterDlg(const MyMoneySchedule& schedule, QWidget* parent = nullptr); 0037 ~KConfirmManualEnterDlg(); 0038 0039 typedef enum { 0040 UseOriginal = 0, 0041 ModifyOnce, 0042 ModifyAlways, 0043 } Action; 0044 0045 /** 0046 * setup the dialog for the difference between the original transaction 0047 * @a to and the transaction to be entered @a tn. 0048 */ 0049 void loadTransactions(const MyMoneyTransaction& to, const MyMoneyTransaction& tn); 0050 0051 /** 0052 * Returns information about what to do with the transaction 0053 */ 0054 Action action() const; 0055 0056 private: 0057 Ui::KConfirmManualEnterDlg *ui; 0058 }; 0059 0060 #endif // KCONFIRMMANUALENTERDLG_H