Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/wizards/newaccountwizard/kloandetailspage.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | kloandetailspage.h | ||||
3 | ------------------- | ||||
4 | begin : Tue Sep 25 2007 | ||||
5 | copyright : (C) 2007 Thomas Baumgart | ||||
6 | email : Thomas Baumgart <ipwizard@users.sourceforge.net> | ||||
7 | ***************************************************************************/ | ||||
8 | | ||||
9 | /*************************************************************************** | ||||
10 | * * | ||||
11 | * This program is free software; you can redistribute it and/or modify * | ||||
12 | * it under the terms of the GNU General Public License as published by * | ||||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||||
14 | * (at your option) any later version. * | ||||
15 | * * | ||||
16 | ***************************************************************************/ | ||||
17 | | ||||
18 | #ifndef KNEWACCOUNTWIZARDLOANDETAILSPAGE_H | ||||
19 | #define KNEWACCOUNTWIZARDLOANDETAILSPAGE_H | ||||
20 | | ||||
21 | // ---------------------------------------------------------------------------- | ||||
22 | // QT Includes | ||||
23 | | ||||
24 | #include <QWidget> | ||||
25 | | ||||
26 | // ---------------------------------------------------------------------------- | ||||
27 | // KDE Includes | ||||
28 | | ||||
29 | // ---------------------------------------------------------------------------- | ||||
30 | // Project Includes | ||||
31 | | ||||
32 | #include "wizardpage.h" | ||||
33 | | ||||
34 | namespace NewAccountWizard | ||||
35 | { | ||||
36 | class Wizard; | ||||
37 | | ||||
38 | class LoanDetailsPagePrivate; | ||||
39 | class LoanDetailsPage : public QWidget, public WizardPage<Wizard> | ||||
40 | { | ||||
41 | Q_OBJECT | ||||
42 | Q_DISABLE_COPY(LoanDetailsPage) | ||||
43 | | ||||
44 | public: | ||||
45 | explicit LoanDetailsPage(Wizard* parent); | ||||
46 | ~LoanDetailsPage() override; | ||||
47 | | ||||
48 | void enterPage(void); | ||||
49 | KMyMoneyWizardPage* nextPage(void) const; | ||||
50 | virtual bool isComplete(void) const; | ||||
51 | | ||||
52 | QWidget* initialFocusWidget(void) const override; | ||||
53 | | ||||
54 | /** | ||||
55 | * This method returns the number of payments depending on | ||||
56 | * the settings of m_termAmount and m_termUnit widgets | ||||
57 | */ | ||||
58 | int term(void) const; | ||||
59 | | ||||
60 | private: | ||||
61 | /** | ||||
62 | * This method is used to update the term widgets | ||||
63 | * according to the length of the given @a term. | ||||
64 | * The term is also converted into a string and returned. | ||||
65 | */ | ||||
66 | QString updateTermWidgets(const double term); | ||||
67 | | ||||
68 | private slots: | ||||
69 | void slotValuesChanged(void); | ||||
70 | void slotCalculate(void); | ||||
71 | | ||||
72 | private: | ||||
73 | Q_DECLARE_PRIVATE_D(WizardPage<Wizard>::d_ptr, LoanDetailsPage) | ||||
74 | friend class Wizard; | ||||
75 | friend class AccountSummaryPage; | ||||
76 | friend class LoanPaymentPage; | ||||
77 | }; | ||||
78 | } // namespace | ||||
79 | | ||||
80 | #endif |