-rw-r--r-- | libopie/orecurrancewidget.cpp | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index db86184..471249d 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp | |||
@@ -27,5 +27,13 @@ static QString numberPlacing( int x ); // return the proper word format for | |||
27 | static int week( const QDate &dt ); // what week in the month is dt? | 27 | static int week( const QDate &dt ); // what week in the month is dt? |
28 | 28 | ||
29 | 29 | /** | |
30 | * Constructs the Widget | ||
31 | * @param startOnMonday Does the week start on monday | ||
32 | * @param newStart The start date of the recurrence | ||
33 | * @param parent The parent widget | ||
34 | * @param name the name of object | ||
35 | * @param modal if the dialog should be modal | ||
36 | * @param fl Additional window flags | ||
37 | */ | ||
30 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | 38 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, |
31 | const QDate& newStart, | 39 | const QDate& newStart, |
@@ -44,4 +52,15 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | |||
44 | setupNone(); | 52 | setupNone(); |
45 | } | 53 | } |
54 | |||
55 | /** | ||
56 | * Different constructor | ||
57 | * @param startOnMonday Does the week start on monday? | ||
58 | * @param rp Already set ORecur object | ||
59 | * @param startDate The start date | ||
60 | * @param parent The parent widget | ||
61 | * @param name The name of the object | ||
62 | * @param modal | ||
63 | * @param fl The flags for window | ||
64 | */ | ||
46 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | 65 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, |
47 | const ORecur& rp, const QDate& startDate, | 66 | const ORecur& rp, const QDate& startDate, |
@@ -60,11 +79,26 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | |||
60 | ORecurranceWidget::~ORecurranceWidget() { | 79 | ORecurranceWidget::~ORecurranceWidget() { |
61 | } | 80 | } |
81 | |||
82 | /** | ||
83 | * set the start date | ||
84 | * @param date the new start date | ||
85 | */ | ||
62 | void ORecurranceWidget::setStartDate( const QDate& date ) { | 86 | void ORecurranceWidget::setStartDate( const QDate& date ) { |
63 | qWarning("ORecurranceWidget::setStartDate"); | 87 | qWarning("ORecurranceWidget::setStartDate"); |
64 | setRecurrence( recurrence(), date ); | 88 | setRecurrence( recurrence(), date ); |
65 | } | 89 | } |
90 | /** | ||
91 | * set the recurrence | ||
92 | * @param rp The ORecur object with the new recurrence rules | ||
93 | */ | ||
66 | void ORecurranceWidget::setRecurrence( const ORecur& rp ) { | 94 | void ORecurranceWidget::setRecurrence( const ORecur& rp ) { |
67 | setRecurrence( rp, start ); | 95 | setRecurrence( rp, start ); |
68 | } | 96 | } |
97 | |||
98 | /** | ||
99 | * overloaded method taking ORecur and a new start date | ||
100 | * @param rp Recurrence rule | ||
101 | * @param date The new start date | ||
102 | */ | ||
69 | void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { | 103 | void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { |
70 | start = date; | 104 | start = date; |
@@ -124,4 +158,9 @@ void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { | |||
124 | cmdEnd->setText( TimeString::shortDate( end ) ); | 158 | cmdEnd->setText( TimeString::shortDate( end ) ); |
125 | } | 159 | } |
160 | |||
161 | /** | ||
162 | * the user selected recurrence rule. | ||
163 | * @return The recurrence rule. | ||
164 | */ | ||
126 | ORecur ORecurranceWidget::recurrence()const { | 165 | ORecur ORecurranceWidget::recurrence()const { |
127 | QListIterator<QToolButton> it( listRTypeButtons ); | 166 | QListIterator<QToolButton> it( listRTypeButtons ); |
@@ -181,4 +220,9 @@ ORecur ORecurranceWidget::recurrence()const { | |||
181 | return rpTmp; | 220 | return rpTmp; |
182 | } | 221 | } |
222 | |||
223 | /** | ||
224 | * Return the end date of the recurrence. This is only | ||
225 | * valid if the recurrence rule does contain an enddate | ||
226 | */ | ||
183 | QDate ORecurranceWidget::endDate()const { | 227 | QDate ORecurranceWidget::endDate()const { |
184 | return end; | 228 | return end; |