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

0001 /*
0002     SPDX-FileCopyrightText: 2007 Thomas Baumgart <ipwizard@users.sourceforge.net>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KINSTITUTION_H
0007 #define KINSTITUTION_H
0008 
0009 // ----------------------------------------------------------------------------
0010 // QT Includes
0011 
0012 #include <QWidget>
0013 
0014 // ----------------------------------------------------------------------------
0015 // KDE Includes
0016 
0017 // ----------------------------------------------------------------------------
0018 // Project Includes
0019 
0020 #include "wizardpage.h"
0021 
0022 class MyMoneyInstitution;
0023 
0024 namespace NewAccountWizard
0025 {
0026 class Wizard;
0027 
0028 class InstitutionPagePrivate;
0029 class InstitutionPage : public QWidget, public WizardPage<Wizard>
0030 {
0031     Q_OBJECT
0032     Q_DISABLE_COPY(InstitutionPage)
0033 
0034 public:
0035     explicit InstitutionPage(Wizard* parent);
0036     ~InstitutionPage() override;
0037     KMyMoneyWizardPage* nextPage() const override;
0038 
0039     QWidget* initialFocusWidget() const override;
0040 
0041     /**
0042     * Returns the information about an institution if entered by
0043     * the user. If the id field is empty, then he did not enter
0044     * such information.
0045     */
0046     const MyMoneyInstitution& institution() const;
0047 
0048     void selectExistingInstitution(const QString& id);
0049 
0050 private Q_SLOTS:
0051     void slotLoadWidgets();
0052     void slotNewInstitution();
0053     void slotSelectInstitution(int index);
0054 
0055 private:
0056     Q_DECLARE_PRIVATE_D(WizardPage<Wizard>::d_ptr, InstitutionPage)
0057     friend class Wizard;
0058     friend class AccountSummaryPage;
0059     friend class BrokeragePage;
0060 };
0061 } // namespace
0062 
0063 #endif