File indexing completed on 2024-05-26 05:10:17

0001 /*
0002     SPDX-FileCopyrightText: 2010 Fernando Vilas <kmymoney-devel@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "summaryeditwizardpage.h"
0007 
0008 // ----------------------------------------------------------------------------
0009 // QT Includes
0010 
0011 #include <QDate>
0012 
0013 // ----------------------------------------------------------------------------
0014 // KDE Includes
0015 
0016 // ----------------------------------------------------------------------------
0017 // Project Includes
0018 
0019 #include "ui_summaryeditwizardpage.h"
0020 
0021 #include "mymoneyutils.h"
0022 
0023 SummaryEditWizardPage::SummaryEditWizardPage(QWidget *parent)
0024     : QWizardPage(parent),
0025       ui(new Ui::SummaryEditWizardPage)
0026 {
0027     ui->setupUi(this);
0028 
0029     // Register the fields with the QWizard and connect the
0030     // appropriate signals to update the "Next" button correctly
0031     registerField("affectedPayments", ui->m_affectedPayments, "text");
0032 }
0033 
0034 SummaryEditWizardPage::~SummaryEditWizardPage()
0035 {
0036     delete ui;
0037 }
0038 
0039 void SummaryEditWizardPage::initializePage()
0040 {
0041     ui->m_payment7->setText(field("payment6").toString());
0042     ui->m_additionalFees7->setText(field("additionalCost").toString());
0043     ui->m_totalPayment7->setText(field("periodicPayment").toString());
0044     ui->m_interestRate7->setText(field("interestRate6").toString());
0045     ui->m_startDateChanges->setText(MyMoneyUtils::formatDate(field("effectiveChangeDateEdit").toDate(), QLocale::LongFormat));
0046 }