File indexing completed on 2024-05-12 16:44:16
0001 /* 0002 SPDX-FileCopyrightText: 2006 Thomas Baumgart <ipwizard@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 #ifndef KNEWUSERWIZARD_H 0008 #define KNEWUSERWIZARD_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 #include <QList> 0014 0015 // ---------------------------------------------------------------------------- 0016 // Project Includes 0017 0018 #include "kmymoneywizard.h" 0019 #include "mymoneysecurity.h" 0020 class MyMoneyPayee; 0021 class MyMoneyInstitution; 0022 class MyMoneyAccount; 0023 class MyMoneyMoney; 0024 class MyMoneyTemplate; 0025 0026 /** 0027 * @author Thomas Baumgart 0028 */ 0029 namespace NewUserWizard 0030 { 0031 extern int stepCount; 0032 0033 /** 0034 * @author Thomas Baumgart 0035 * 0036 * This class implements the new user wizard which is used to gather 0037 * some initial information from the user who creates a new KMyMoney 0038 * 'file'. 0039 */ 0040 class WizardPrivate; 0041 class Wizard : public KMyMoneyWizard 0042 { 0043 friend class IntroPage; 0044 friend class GeneralPage; 0045 friend class CurrencyPage; 0046 friend class AccountPage; 0047 friend class CategoriesPage; 0048 friend class PreferencePage; 0049 0050 Q_OBJECT 0051 Q_DISABLE_COPY(Wizard) 0052 0053 public: 0054 explicit Wizard(QWidget *parent = nullptr, bool modal = false, Qt::WindowFlags flags = 0); 0055 ~Wizard() override; 0056 /** 0057 * Returns the personal information of the user (e.g. name, address, etc.) 0058 */ 0059 MyMoneyPayee user() const; 0060 0061 /** 0062 * Returns the information about an institution if entered by 0063 * the user. If the name field is empty, then he did not enter 0064 * such information. 0065 */ 0066 MyMoneyInstitution institution() const; 0067 0068 /** 0069 * Returns the information about a checking account if entered by 0070 * the user. If the name field is empty, then he did not enter 0071 * such information. 0072 */ 0073 MyMoneyAccount account() const; 0074 0075 /** 0076 * Returns the opening balance value provided by the user. not enter 0077 */ 0078 MyMoneyMoney openingBalance() const; 0079 0080 /** 0081 * Returns the security to be used as base currency. 0082 */ 0083 MyMoneySecurity baseCurrency() const; 0084 0085 /** 0086 * Returns a list of templates including accounts to be created 0087 */ 0088 QList<MyMoneyTemplate> templates() const; 0089 0090 /** 0091 * True if the settings dialog should be launched after the wizard is finished. 0092 */ 0093 bool startSettingsAfterFinished() const; 0094 0095 private: 0096 Q_DECLARE_PRIVATE(Wizard) 0097 }; 0098 0099 } // namespace 0100 0101 0102 #endif