File indexing completed on 2024-05-12 16:42:03
0001 /* 0002 SPDX-FileCopyrightText: 2007-2008 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 KCATEGORYREASSIGNDLG_H 0008 #define KCATEGORYREASSIGNDLG_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 #include <QDialog> 0014 0015 // ---------------------------------------------------------------------------- 0016 // KDE Includes 0017 0018 // ---------------------------------------------------------------------------- 0019 // Project Includes 0020 0021 class MyMoneyAccount; 0022 namespace Ui { 0023 class KCategoryReassignDlg; 0024 } 0025 0026 /** 0027 * Implementation of the dialog that lets the user select a payee in order 0028 * to re-assign transactions (for instance, if payees are deleted). 0029 */ 0030 0031 class KCategoryReassignDlg : public QDialog 0032 { 0033 Q_OBJECT 0034 Q_DISABLE_COPY(KCategoryReassignDlg) 0035 0036 public: 0037 explicit KCategoryReassignDlg(QWidget* parent = nullptr); 0038 ~KCategoryReassignDlg(); 0039 0040 /** 0041 * This function sets up the dialog, lets the user select a category and returns 0042 * the id of the selected category in the list of all known income and expense accounts. 0043 * 0044 * @param category reference to MyMoneyAccount object of the category to be deleted 0045 * 0046 * @return Returns the id of the selected category in the list or QString() if 0047 * the dialog was aborted. QString() is also returned if the @a category 0048 * does not have an id. 0049 */ 0050 QString show(const MyMoneyAccount& category); 0051 0052 protected: 0053 void accept() final override; 0054 0055 private: 0056 Ui::KCategoryReassignDlg *ui; 0057 }; 0058 0059 #endif // KCATEGORYREASSIGNDLG_H