1 /* 2 * Copyright 2007-2011 Thomas Baumgart <tbaumgart@kde.org> 3 * Copyright 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef KCONFIRMMANUALENTERDLG_H 20 #define KCONFIRMMANUALENTERDLG_H 21 22 // ---------------------------------------------------------------------------- 23 // QT Includes 24 25 #include <QDialog> 26 27 // ---------------------------------------------------------------------------- 28 // KDE Includes 29 30 // ---------------------------------------------------------------------------- 31 // Project Includes 32 33 class MyMoneySchedule; 34 class MyMoneyTransaction; 35 36 namespace Ui { class KConfirmManualEnterDlg; } 37 38 class KConfirmManualEnterDlg : public QDialog 39 { 40 Q_OBJECT 41 Q_DISABLE_COPY(KConfirmManualEnterDlg) 42 43 public: 44 explicit KConfirmManualEnterDlg(const MyMoneySchedule& schedule, QWidget* parent = nullptr); 45 ~KConfirmManualEnterDlg(); 46 47 typedef enum { 48 UseOriginal = 0, 49 ModifyOnce, 50 ModifyAlways 51 } Action; 52 53 /** 54 * setup the dialog for the difference between the original transaction 55 * @a to and the transaction to be entered @a tn. 56 */ 57 void loadTransactions(const MyMoneyTransaction& to, const MyMoneyTransaction& tn); 58 59 /** 60 * Returns information about what to do with the transaction 61 */ 62 Action action() const; 63 64 private: 65 Ui::KConfirmManualEnterDlg *ui; 66 }; 67 68 #endif // KCONFIRMMANUALENTERDLG_H 69