Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/dialogs/keditscheduledlg.h
Context not available. | |||||
4 | begin : Mon Sep 3 2007 | 4 | begin : Mon Sep 3 2007 | ||
---|---|---|---|---|---|
5 | copyright : (C) 2007 by Thomas Baumgart | 5 | copyright : (C) 2007 by Thomas Baumgart | ||
6 | email : Thomas Baumgart <ipwizard@users.sourceforge.net> | 6 | email : Thomas Baumgart <ipwizard@users.sourceforge.net> | ||
7 | (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||||
7 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
8 | 9 | | |||
9 | /*************************************************************************** | 10 | /*************************************************************************** | ||
Context not available. | |||||
29 | // ---------------------------------------------------------------------------- | 30 | // ---------------------------------------------------------------------------- | ||
30 | // Project Includes | 31 | // Project Includes | ||
31 | 32 | | |||
32 | #include "ui_keditscheduledlgdecl.h" | | |||
33 | | ||||
34 | class MyMoneySchedule; | 33 | class MyMoneySchedule; | ||
35 | class MyMoneyTransaction; | 34 | class MyMoneyTransaction; | ||
36 | class TransactionEditor; | 35 | class TransactionEditor; | ||
Context not available. | |||||
38 | /** | 37 | /** | ||
39 | * @author Thomas Baumgart | 38 | * @author Thomas Baumgart | ||
40 | */ | 39 | */ | ||
41 | class KEditScheduleDlgDecl : public QDialog, public Ui::KEditScheduleDlgDecl | 40 | | ||
42 | { | 41 | class KEditScheduleDlgPrivate; | ||
43 | public: | 42 | class KEditScheduleDlg : public QDialog | ||
44 | explicit KEditScheduleDlgDecl(QWidget *parent) : QDialog(parent) { | | |||
45 | setupUi(this); | | |||
46 | } | | |||
47 | }; | | |||
48 | class KEditScheduleDlg : public KEditScheduleDlgDecl | | |||
49 | { | 43 | { | ||
50 | Q_OBJECT | 44 | Q_OBJECT | ||
45 | Q_DISABLE_COPY(KEditScheduleDlg) | ||||
46 | | ||||
51 | public: | 47 | public: | ||
52 | /** | 48 | explicit KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *parent = nullptr); | ||
53 | * Standard QWidget constructor. | | |||
54 | **/ | | |||
55 | explicit KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *parent = 0); | | |||
56 | | ||||
57 | /** | | |||
58 | * Standard destructor. | | |||
59 | **/ | | |||
60 | ~KEditScheduleDlg(); | 49 | ~KEditScheduleDlg(); | ||
61 | 50 | | |||
62 | TransactionEditor* startEdit(); | 51 | TransactionEditor* startEdit(); | ||
Context not available. | |||||
66 | * | 55 | * | ||
67 | * @return MyMoneySchedule The schedule details. | 56 | * @return MyMoneySchedule The schedule details. | ||
68 | **/ | 57 | **/ | ||
69 | const MyMoneySchedule& schedule() const; | 58 | const MyMoneySchedule& schedule(); | ||
70 | 59 | | |||
71 | protected: | 60 | protected: | ||
72 | MyMoneyTransaction transaction() const; | | |||
73 | /** | 61 | /** | ||
74 | * This method adjusts @a _date according to the rules specified by | 62 | * This method adjusts @a _date according to the rules specified by | ||
75 | * the schedule's weekend option. | 63 | * the schedule's weekend option. | ||
Context not available. | |||||
77 | QDate adjustDate(const QDate& _date) const; | 65 | QDate adjustDate(const QDate& _date) const; | ||
78 | 66 | | |||
79 | /// Overridden for internal reasons. No API changes. | 67 | /// Overridden for internal reasons. No API changes. | ||
80 | bool focusNextPrevChild(bool next); | 68 | bool focusNextPrevChild(bool next) override; | ||
81 | 69 | | |||
82 | /// Overridden for internal reasons. No API changes. | 70 | /// Overridden for internal reasons. No API changes. | ||
83 | void resizeEvent(QResizeEvent* ev); | 71 | void resizeEvent(QResizeEvent* ev) override; | ||
84 | 72 | | |||
85 | private slots: | 73 | private slots: | ||
86 | void slotSetupSize(); | 74 | void slotSetupSize(); | ||
Context not available. | |||||
94 | void slotFilterPaymentType(int index); | 82 | void slotFilterPaymentType(int index); | ||
95 | 83 | | |||
96 | /// Overridden for internal reasons. No API changes. | 84 | /// Overridden for internal reasons. No API changes. | ||
97 | void accept(); | 85 | void accept() override; | ||
98 | 86 | | |||
99 | private: | 87 | private: | ||
100 | /** | 88 | KEditScheduleDlgPrivate * const d_ptr; | ||
101 | * Helper method to recalculate and update Transactions Remaining | 89 | Q_DECLARE_PRIVATE(KEditScheduleDlg) | ||
102 | * when other values are changed | | |||
103 | */ | | |||
104 | void updateTransactionsRemaining(); | | |||
105 | | ||||
106 | /// \internal d-pointer class. | | |||
107 | class Private; | | |||
108 | /// \internal d-pointer instance. | | |||
109 | Private* const d; | | |||
110 | }; | 90 | }; | ||
111 | 91 | | |||
112 | #endif | 92 | #endif | ||
Context not available. |