File indexing completed on 2024-05-12 16:42:03

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 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 #include <QDialog>
0014 
0015 // ----------------------------------------------------------------------------
0016 // KDE Includes
0017 
0018 // ----------------------------------------------------------------------------
0019 // Project Includes
0020 
0021 class MyMoneySchedule;
0022 class MyMoneyTransaction;
0023 
0024 namespace Ui {
0025 class KConfirmManualEnterDlg;
0026 }
0027 
0028 class KConfirmManualEnterDlg : public QDialog
0029 {
0030     Q_OBJECT
0031     Q_DISABLE_COPY(KConfirmManualEnterDlg)
0032 
0033 public:
0034     explicit KConfirmManualEnterDlg(const MyMoneySchedule& schedule, QWidget* parent = nullptr);
0035     ~KConfirmManualEnterDlg();
0036 
0037     typedef enum {
0038         UseOriginal = 0,
0039         ModifyOnce,
0040         ModifyAlways,
0041     } Action;
0042 
0043     /**
0044       * setup the dialog for the difference between the original transaction
0045       * @a to and the transaction to be entered @a tn.
0046       */
0047     void loadTransactions(const MyMoneyTransaction& to, const MyMoneyTransaction& tn);
0048 
0049     /**
0050       * Returns information about what to do with the transaction
0051       */
0052     Action action() const;
0053 
0054 private:
0055     Ui::KConfirmManualEnterDlg *ui;
0056 };
0057 
0058 #endif // KCONFIRMMANUALENTERDLG_H