Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/kaccountselectdlg.h
Context not available. | |||||
9 | John C <thetacoturtle@users.sourceforge.net> | 9 | John C <thetacoturtle@users.sourceforge.net> | ||
---|---|---|---|---|---|
10 | Thomas Baumgart <ipwizard@users.sourceforge.net> | 10 | Thomas Baumgart <ipwizard@users.sourceforge.net> | ||
11 | Kevin Tambascio <ktambascio@users.sourceforge.net> | 11 | Kevin Tambascio <ktambascio@users.sourceforge.net> | ||
12 | (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||||
12 | ***************************************************************************/ | 13 | ***************************************************************************/ | ||
13 | 14 | | |||
14 | /*************************************************************************** | 15 | /*************************************************************************** | ||
Context not available. | |||||
26 | // ---------------------------------------------------------------------------- | 27 | // ---------------------------------------------------------------------------- | ||
27 | // QT Includes | 28 | // QT Includes | ||
28 | 29 | | |||
29 | #include <QString> | 30 | #include <QDialog> | ||
30 | 31 | | |||
31 | // ---------------------------------------------------------------------------- | 32 | // ---------------------------------------------------------------------------- | ||
32 | // KDE Includes | 33 | // KDE Includes | ||
Context not available. | |||||
34 | // ---------------------------------------------------------------------------- | 35 | // ---------------------------------------------------------------------------- | ||
35 | // Project Includes | 36 | // Project Includes | ||
36 | 37 | | |||
37 | #include "mymoneyaccount.h" | | |||
38 | #include "kmymoneyutils.h" | | |||
39 | #include "ui_kaccountselectdlgdecl.h" | | |||
40 | | ||||
41 | /** | 38 | /** | ||
42 | * @author Thomas Baumgart | 39 | * @author Thomas Baumgart | ||
43 | */ | 40 | */ | ||
44 | 41 | | |||
42 | class MyMoneyAccount; | ||||
45 | 43 | | |||
46 | class KAccountSelectDlgDecl : public QDialog, public Ui::KAccountSelectDlgDecl | 44 | namespace eDialogs { enum Category : int; } | ||
47 | { | | |||
48 | public: | | |||
49 | KAccountSelectDlgDecl(QWidget *parent) : QDialog(parent) { | | |||
50 | setupUi(this); | | |||
51 | } | | |||
52 | }; | | |||
53 | 45 | | |||
54 | class KAccountSelectDlg : public KAccountSelectDlgDecl | 46 | class KAccountSelectDlgPrivate; | ||
47 | class KAccountSelectDlg : public QDialog | ||||
55 | { | 48 | { | ||
56 | Q_OBJECT | 49 | Q_OBJECT | ||
50 | Q_DISABLE_COPY(KAccountSelectDlg) | ||||
51 | | ||||
57 | public: | 52 | public: | ||
58 | explicit KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE type, const QString& purpose = "General", QWidget *parent = 0); | 53 | explicit KAccountSelectDlg(const eDialogs::Category type, const QString& purpose, QWidget *parent = nullptr); | ||
59 | ~KAccountSelectDlg(); | 54 | ~KAccountSelectDlg(); | ||
60 | 55 | | |||
61 | /** | 56 | /** | ||
Context not available. | |||||
92 | * | 87 | * | ||
93 | * @return QString containing the id of the selected account | 88 | * @return QString containing the id of the selected account | ||
94 | */ | 89 | */ | ||
95 | const QString& selectedAccount() const; | 90 | QString selectedAccount() const; | ||
96 | 91 | | |||
97 | /** | 92 | /** | ||
98 | * This method is used to set the mode of the dialog. Two modes | 93 | * This method is used to set the mode of the dialog. Two modes | ||
Context not available. | |||||
120 | * @retval false Dialog was left using the 'Skip' button | 115 | * @retval false Dialog was left using the 'Skip' button | ||
121 | * @retval true Dialog was left using the 'Abort' button | 116 | * @retval true Dialog was left using the 'Abort' button | ||
122 | */ | 117 | */ | ||
123 | bool aborted() const { | 118 | bool aborted() const; | ||
124 | return m_aborted; | 119 | | ||
125 | }; | 120 | void hideQifEntry(); | ||
126 | 121 | | |||
127 | public slots: | 122 | public slots: | ||
128 | /** | 123 | /** | ||
129 | * Reimplemented from QDialog | 124 | * Reimplemented from QDialog | ||
130 | */ | 125 | */ | ||
131 | int exec(); | 126 | int exec() override; | ||
132 | 127 | | |||
133 | protected slots: | 128 | protected slots: | ||
134 | /** | 129 | /** | ||
Context not available. | |||||
154 | void slotReloadWidget(); | 149 | void slotReloadWidget(); | ||
155 | 150 | | |||
156 | private: | 151 | private: | ||
157 | QString m_purpose; | 152 | KAccountSelectDlgPrivate * const d_ptr; | ||
158 | MyMoneyAccount m_account; | 153 | Q_DECLARE_PRIVATE(KAccountSelectDlg) | ||
159 | int m_mode; // 0 - select or create, 1 - create only | | |||
160 | KMyMoneyUtils::categoryTypeE m_accountType; | | |||
161 | bool m_aborted; | | |||
162 | }; | 154 | }; | ||
163 | 155 | | |||
164 | #endif | 156 | #endif | ||
Context not available. |