summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
Unidiff
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index a886f4a..17a8546 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -180,49 +180,49 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays)
180 //cope with selection being out of matrix limits at bottom (> NUMDAYS-1) 180 //cope with selection being out of matrix limits at bottom (> NUMDAYS-1)
181 if (mSelEnd > NUMDAYS-1) { 181 if (mSelEnd > NUMDAYS-1) {
182 for (int i = i0; i <= NUMDAYS-1; i++) { 182 for (int i = i0; i <= NUMDAYS-1; i++) {
183 selDays.append(days[i]); 183 selDays.append(days[i]);
184 } 184 }
185 for (int i = NUMDAYS; i < mSelEnd; i++) { 185 for (int i = NUMDAYS; i < mSelEnd; i++) {
186 selDays.append(days[0].addDays(i)); 186 selDays.append(days[0].addDays(i));
187 } 187 }
188 188
189 // apply normal routine to selection being entirely within matrix limits 189 // apply normal routine to selection being entirely within matrix limits
190 } else { 190 } else {
191 for (int i = i0; i <= mSelEnd; i++) { 191 for (int i = i0; i <= mSelEnd; i++) {
192 selDays.append(days[i]); 192 selDays.append(days[i]);
193 } 193 }
194 } 194 }
195} 195}
196 196
197void KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) 197void KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
198{ 198{
199 mSelStart = startdate.daysTo(start); 199 mSelStart = startdate.daysTo(start);
200 mSelEnd = startdate.daysTo(end); 200 mSelEnd = startdate.daysTo(end);
201} 201}
202void KODayMatrix::clearSelection() 202void KODayMatrix::clearSelection()
203{ 203{
204 mSelEnd = mSelStart = NOSELECTION; 204 mSelEnd = mSelStart = NOSELECTION;
205} 205}
206 206
207 207
208void KODayMatrix::recalculateToday() 208void KODayMatrix::recalculateToday()
209{ 209{
210 today = -1; 210 today = -1;
211 for (int i=0; i<NUMDAYS; i++) { 211 for (int i=0; i<NUMDAYS; i++) {
212 events[i] = 0; 212 events[i] = 0;
213 days[i] = startdate.addDays(i); 213 days[i] = startdate.addDays(i);
214 daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); 214 daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] ));
215 215
216 // if today is in the currently displayed month, hilight today 216 // if today is in the currently displayed month, hilight today
217 if (days[i].year() == QDate::currentDate().year() && 217 if (days[i].year() == QDate::currentDate().year() &&
218 days[i].month() == QDate::currentDate().month() && 218 days[i].month() == QDate::currentDate().month() &&
219 days[i].day() == QDate::currentDate().day()) { 219 days[i].day() == QDate::currentDate().day()) {
220 today = i; 220 today = i;
221 } 221 }
222 } 222 }
223 // qDebug(QString("Today is visible at %1.").arg(today)); 223 // qDebug(QString("Today is visible at %1.").arg(today));
224} 224}
225 225
226void KODayMatrix::updateView() 226void KODayMatrix::updateView()
227{ 227{
228 updateView(startdate); 228 updateView(startdate);