Diffstat (limited to 'core/pim/datebook/repeatentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/repeatentry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/datebook/repeatentry.cpp b/core/pim/datebook/repeatentry.cpp index 7cf36da..04c3cf3 100644 --- a/core/pim/datebook/repeatentry.cpp +++ b/core/pim/datebook/repeatentry.cpp | |||
@@ -314,98 +314,98 @@ void RepeatEntry::setupWeekly() | |||
314 | lblFreq->setText( tr("week(s)") ); | 314 | lblFreq->setText( tr("week(s)") ); |
315 | lblVar2->show(); | 315 | lblVar2->show(); |
316 | showRepeatStuff(); | 316 | showRepeatStuff(); |
317 | setupRepeatLabel( 1 ); | 317 | setupRepeatLabel( 1 ); |
318 | } | 318 | } |
319 | 319 | ||
320 | void RepeatEntry::setupMonthly() | 320 | void RepeatEntry::setupMonthly() |
321 | { | 321 | { |
322 | hideExtras(); | 322 | hideExtras(); |
323 | lblWeekVar->hide(); | 323 | lblWeekVar->hide(); |
324 | fraExtra->setTitle( tr("Repeat By") ); | 324 | fraExtra->setTitle( tr("Repeat By") ); |
325 | fraExtra->setExclusive( TRUE ); | 325 | fraExtra->setExclusive( TRUE ); |
326 | fraExtra->show(); | 326 | fraExtra->show(); |
327 | cmdExtra1->setText( tr("Day") ); | 327 | cmdExtra1->setText( tr("Day") ); |
328 | cmdExtra1->show(); | 328 | cmdExtra1->show(); |
329 | cmdExtra2->setText( tr("Date") ); | 329 | cmdExtra2->setText( tr("Date") ); |
330 | cmdExtra2->show(); | 330 | cmdExtra2->show(); |
331 | spinFreq->setValue( 1 ); | 331 | spinFreq->setValue( 1 ); |
332 | lblFreq->setText( tr("month(s)") ); | 332 | lblFreq->setText( tr("month(s)") ); |
333 | lblVar2->show(); | 333 | lblVar2->show(); |
334 | showRepeatStuff(); | 334 | showRepeatStuff(); |
335 | setupRepeatLabel( 1 ); | 335 | setupRepeatLabel( 1 ); |
336 | } | 336 | } |
337 | 337 | ||
338 | void RepeatEntry::setupYearly() | 338 | void RepeatEntry::setupYearly() |
339 | { | 339 | { |
340 | hideExtras(); | 340 | hideExtras(); |
341 | lblWeekVar->hide(); | 341 | lblWeekVar->hide(); |
342 | spinFreq->setValue( 1 ); | 342 | spinFreq->setValue( 1 ); |
343 | lblFreq->setText( tr("year(s)") ); | 343 | lblFreq->setText( tr("year(s)") ); |
344 | lblFreq->show(); | 344 | lblFreq->show(); |
345 | lblFreq->show(); | 345 | lblFreq->show(); |
346 | showRepeatStuff(); | 346 | showRepeatStuff(); |
347 | lblVar2->show(); | 347 | lblVar2->show(); |
348 | QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) ); | 348 | QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) ); |
349 | lblRepeat->setText( strEvery ); | 349 | lblRepeat->setText( strEvery ); |
350 | setupRepeatLabel( 1 ); | 350 | setupRepeatLabel( 1 ); |
351 | 351 | ||
352 | } | 352 | } |
353 | 353 | ||
354 | void RepeatEntry::init() | 354 | void RepeatEntry::init() |
355 | { | 355 | { |
356 | QPopupMenu *m1 = new QPopupMenu( this ); | 356 | QPopupMenu *m1 = new QPopupMenu( this ); |
357 | repeatPicker = new DateBookMonth( m1, 0, TRUE ); | 357 | repeatPicker = new DateBookMonth( m1, 0, TRUE ); |
358 | m1->insertItem( repeatPicker ); | 358 | m1->insertItem( repeatPicker ); |
359 | cmdEnd->setPopup( m1 ); | 359 | cmdEnd->setPopup( m1 ); |
360 | cmdEnd->setPopupDelay( 0 ); | 360 | cmdEnd->setPopupDelay( 0 ); |
361 | 361 | ||
362 | QObject::connect( repeatPicker, SIGNAL(dateClicked(int, int, int)), | 362 | QObject::connect( repeatPicker, SIGNAL(dateClicked(int,int,int)), |
363 | this, SLOT(endDateChanged(int, int, int)) ); | 363 | this, SLOT(endDateChanged(int,int,int)) ); |
364 | QObject::connect( qApp, SIGNAL(weekChanged(bool)), | 364 | QObject::connect( qApp, SIGNAL(weekChanged(bool)), |
365 | this, SLOT(slotChangeStartOfWeek(bool)) ); | 365 | this, SLOT(slotChangeStartOfWeek(bool)) ); |
366 | 366 | ||
367 | listRTypeButtons.setAutoDelete( TRUE ); | 367 | listRTypeButtons.setAutoDelete( TRUE ); |
368 | listRTypeButtons.append( cmdNone ); | 368 | listRTypeButtons.append( cmdNone ); |
369 | listRTypeButtons.append( cmdDay ); | 369 | listRTypeButtons.append( cmdDay ); |
370 | listRTypeButtons.append( cmdWeek ); | 370 | listRTypeButtons.append( cmdWeek ); |
371 | listRTypeButtons.append( cmdMonth ); | 371 | listRTypeButtons.append( cmdMonth ); |
372 | listRTypeButtons.append( cmdYear ); | 372 | listRTypeButtons.append( cmdYear ); |
373 | 373 | ||
374 | listExtra.setAutoDelete( TRUE ); | 374 | listExtra.setAutoDelete( TRUE ); |
375 | listExtra.append( cmdExtra1 ); | 375 | listExtra.append( cmdExtra1 ); |
376 | listExtra.append( cmdExtra2 ); | 376 | listExtra.append( cmdExtra2 ); |
377 | listExtra.append( cmdExtra3 ); | 377 | listExtra.append( cmdExtra3 ); |
378 | listExtra.append( cmdExtra4 ); | 378 | listExtra.append( cmdExtra4 ); |
379 | listExtra.append( cmdExtra5 ); | 379 | listExtra.append( cmdExtra5 ); |
380 | listExtra.append( cmdExtra6 ); | 380 | listExtra.append( cmdExtra6 ); |
381 | listExtra.append( cmdExtra7 ); | 381 | listExtra.append( cmdExtra7 ); |
382 | } | 382 | } |
383 | 383 | ||
384 | void RepeatEntry::slotNoEnd( bool unused ) | 384 | void RepeatEntry::slotNoEnd( bool unused ) |
385 | { | 385 | { |
386 | // if the item was toggled, then go ahead and set it to the maximum date | 386 | // if the item was toggled, then go ahead and set it to the maximum date |
387 | if ( unused ) { | 387 | if ( unused ) { |
388 | end.setYMD( 3000, 12, 31 ); | 388 | end.setYMD( 3000, 12, 31 ); |
389 | cmdEnd->setText( RepeatEntryBase::tr("No End Date") ); | 389 | cmdEnd->setText( RepeatEntryBase::tr("No End Date") ); |
390 | } else { | 390 | } else { |
391 | end = start; | 391 | end = start; |
392 | cmdEnd->setText( TimeString::shortDate(end) ); | 392 | cmdEnd->setText( TimeString::shortDate(end) ); |
393 | } | 393 | } |
394 | } | 394 | } |
395 | 395 | ||
396 | void RepeatEntry::endDateChanged( int y, int m, int d ) | 396 | void RepeatEntry::endDateChanged( int y, int m, int d ) |
397 | { | 397 | { |
398 | end.setYMD( y, m, d ); | 398 | end.setYMD( y, m, d ); |
399 | if ( end < start ) | 399 | if ( end < start ) |
400 | end = start; | 400 | end = start; |
401 | cmdEnd->setText( TimeString::shortDate( end ) ); | 401 | cmdEnd->setText( TimeString::shortDate( end ) ); |
402 | repeatPicker->setDate( end.year(), end.month(), end.day() ); | 402 | repeatPicker->setDate( end.year(), end.month(), end.day() ); |
403 | } | 403 | } |
404 | 404 | ||
405 | void RepeatEntry::setupRepeatLabel( const QString &s ) | 405 | void RepeatEntry::setupRepeatLabel( const QString &s ) |
406 | { | 406 | { |
407 | lblVar1->setText( s ); | 407 | lblVar1->setText( s ); |
408 | } | 408 | } |
409 | 409 | ||
410 | void RepeatEntry::setupRepeatLabel( int x ) | 410 | void RepeatEntry::setupRepeatLabel( int x ) |
411 | { | 411 | { |