File indexing completed on 2024-05-19 16:14:55

0001 /*
0002     SPDX-FileCopyrightText: 2006 Ace Jones <acejones@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "kmergetransactionsdlg.h"
0008 #include "kselecttransactionsdlg_p.h"
0009 
0010 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 #include <QPushButton>
0014 
0015 // ----------------------------------------------------------------------------
0016 // KDE Includes
0017 
0018 #include <KHelpClient>
0019 #include <KLocalizedString>
0020 
0021 // ----------------------------------------------------------------------------
0022 // Project Includes
0023 
0024 #include "ui_kselecttransactionsdlg.h"
0025 
0026 #include "register.h"
0027 
0028 KMergeTransactionsDlg::KMergeTransactionsDlg(const MyMoneyAccount& account, QWidget* parent) :
0029     KSelectTransactionsDlg(account, parent)
0030 {
0031     // setup descriptive texts
0032     setWindowTitle(i18n("Merge Transactions"));
0033     d_ptr->ui->m_description->setText(
0034         i18n("Are you sure you wish to merge these transactions?  The one you "
0035              "selected first is the top one, and its values will be used in "
0036              "the merged transaction.  Cancel and select the other transaction "
0037              "first, if you want its values to be used."));
0038 
0039     // no selection possible
0040     d_ptr->ui->m_register->setSelectionMode(QTableWidget::NoSelection);
0041 
0042     // override default and enable ok button right away
0043     d_ptr->ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
0044 }
0045 
0046 bool KMergeTransactionsDlg::eventFilter(QObject*, QEvent*)
0047 {
0048     return false;
0049 }
0050 
0051 void KMergeTransactionsDlg::slotHelp()
0052 {
0053     KHelpClient::invokeHelp("details.ledgers.match");
0054 }