author | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
commit | 3ec18dd19fdf4eb7e763b8022f90de83249facfd (patch) (unidiff) | |
tree | abc6c8568c33b70afd8abc46ae9495e5d862cba1 /korganizer | |
parent | c643664ae97e757afda1012dc998b49e6cc2d575 (diff) | |
download | kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.zip kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.gz kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 |
4 files changed, 22 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e31a6e1..28b17a5 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -416,129 +416,131 @@ void CalendarView::init() | |||
416 | SLOT( updateView() ) ); | 416 | SLOT( updateView() ) ); |
417 | } else { | 417 | } else { |
418 | mResourceView = 0; | 418 | mResourceView = 0; |
419 | } | 419 | } |
420 | #endif | 420 | #endif |
421 | QWidget *rightBox = new QWidget( mPanner ); | 421 | QWidget *rightBox = new QWidget( mPanner ); |
422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
423 | 423 | ||
424 | mRightFrame = new QWidgetStack( rightBox ); | 424 | mRightFrame = new QWidgetStack( rightBox ); |
425 | rightLayout->addWidget( mRightFrame, 1 ); | 425 | rightLayout->addWidget( mRightFrame, 1 ); |
426 | 426 | ||
427 | mLeftFrame = mLeftSplitter; | 427 | mLeftFrame = mLeftSplitter; |
428 | #else | 428 | #else |
429 | //QWidget *mainBox = new QWidget( this ); | 429 | //QWidget *mainBox = new QWidget( this ); |
430 | //QWidget *leftFrame = new QWidget( mainBox ); | 430 | //QWidget *leftFrame = new QWidget( mainBox ); |
431 | //QBoxLayout * mainBoxLayout; | 431 | //QBoxLayout * mainBoxLayout; |
432 | if ( KOPrefs::instance()->mVerticalScreen ) { | 432 | if ( KOPrefs::instance()->mVerticalScreen ) { |
433 | //mainBoxLayout = new QVBoxLayout(mainBox); | 433 | //mainBoxLayout = new QVBoxLayout(mainBox); |
434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); | 435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); |
436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; | 437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; |
438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
439 | } else { | 439 | } else { |
440 | //mainBoxLayout = new QHBoxLayout(mainBox); | 440 | //mainBoxLayout = new QHBoxLayout(mainBox); |
441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); | 441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); |
442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); | 443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); |
444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); | 444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); |
445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
446 | } | 446 | } |
447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | 447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); |
448 | //QBoxLayout * leftFrameLayout; | 448 | //QBoxLayout * leftFrameLayout; |
449 | topLayout->addWidget( mMainFrame ); | 449 | topLayout->addWidget( mMainFrame ); |
450 | #ifdef DESKTOP_VERSION | 450 | #ifdef DESKTOP_VERSION |
451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); | 451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); |
452 | topLayout->addWidget( mDateScrollBar ); | 452 | topLayout->addWidget( mDateScrollBar ); |
453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); | 453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); |
454 | if ( QApplication::desktop()->width() < 800 ) | 454 | if ( QApplication::desktop()->width() < 800 ) |
455 | mDateScrollBar->hide(); | 455 | mDateScrollBar->hide(); |
456 | #endif | 456 | #endif |
457 | //mainBoxLayout->addWidget (mLeftFrame); | 457 | //mainBoxLayout->addWidget (mLeftFrame); |
458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
459 | "CalendarView::DateNavigator" ); | 459 | "CalendarView::DateNavigator" ); |
460 | #if 0 | 460 | #if 0 |
461 | // FIXME | 461 | // FIXME |
462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
463 | "CalendarView::DateNavigator", QDate::currentDate()); | 463 | "CalendarView::DateNavigator", QDate::currentDate()); |
464 | #endif | 464 | #endif |
465 | // mDateNavigator->blockSignals( true ); | 465 | // mDateNavigator->blockSignals( true ); |
466 | //leftFrameLayout->addWidget( mDateNavigator ); | 466 | //leftFrameLayout->addWidget( mDateNavigator ); |
467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | 469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); |
470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); | 470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); |
471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); | 472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); |
473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); | 474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); |
475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); | 478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); |
479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
480 | connect( mCalEditView, SIGNAL( requestCalendarInfo( int ) ),this, SLOT( displayCalendarInfo( int ) ) ); | ||
480 | 481 | ||
482 | |||
481 | mTodoList->setNavigator( mNavigator ); | 483 | mTodoList->setNavigator( mNavigator ); |
482 | #if 0 | 484 | #if 0 |
483 | if ( QApplication::desktop()->width() < 480 ) { | 485 | if ( QApplication::desktop()->width() < 480 ) { |
484 | leftFrameLayout->addWidget(mFilterView); | 486 | leftFrameLayout->addWidget(mFilterView); |
485 | leftFrameLayout->addWidget(mTodoList, 2 ); | 487 | leftFrameLayout->addWidget(mTodoList, 2 ); |
486 | 488 | ||
487 | } else { | 489 | } else { |
488 | leftFrameLayout->addWidget(mTodoList,2 ); | 490 | leftFrameLayout->addWidget(mTodoList,2 ); |
489 | leftFrameLayout->addWidget(mFilterView ); | 491 | leftFrameLayout->addWidget(mFilterView ); |
490 | } | 492 | } |
491 | #endif | 493 | #endif |
492 | mFilterView->hide(); | 494 | mFilterView->hide(); |
493 | mCalEditView->hide(); | 495 | mCalEditView->hide(); |
494 | QWidget *rightBox = new QWidget( mMainFrame ); | 496 | QWidget *rightBox = new QWidget( mMainFrame ); |
495 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 497 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
496 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 498 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
497 | mRightFrame = new QWidgetStack( rightBox ); | 499 | mRightFrame = new QWidgetStack( rightBox ); |
498 | rightLayout->addWidget( mRightFrame, 10 ); | 500 | rightLayout->addWidget( mRightFrame, 10 ); |
499 | 501 | ||
500 | //mLeftFrame = (QWidget *)leftFrame; | 502 | //mLeftFrame = (QWidget *)leftFrame; |
501 | if ( KOPrefs::instance()->mVerticalScreen ) { | 503 | if ( KOPrefs::instance()->mVerticalScreen ) { |
502 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 504 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
503 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 505 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
504 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 506 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
505 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 507 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
506 | } else { | 508 | } else { |
507 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 509 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
508 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 510 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
509 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 511 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
510 | } | 512 | } |
511 | if ( !KOPrefs::instance()->mShowDateNavigator) | 513 | if ( !KOPrefs::instance()->mShowDateNavigator) |
512 | mDateNavigator->hide(); | 514 | mDateNavigator->hide(); |
513 | //qDebug("Calendarview Size %d %d ", width(), height()); | 515 | //qDebug("Calendarview Size %d %d ", width(), height()); |
514 | #endif | 516 | #endif |
515 | 517 | ||
516 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 518 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
517 | SLOT( showDates( const KCal::DateList & ) ) ); | 519 | SLOT( showDates( const KCal::DateList & ) ) ); |
518 | 520 | ||
519 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 521 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
520 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 522 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
521 | 523 | ||
522 | 524 | ||
523 | 525 | ||
524 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), | 526 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), |
525 | mViewManager, SLOT( showMonth( const QDate & ) ) ); | 527 | mViewManager, SLOT( showMonth( const QDate & ) ) ); |
526 | 528 | ||
527 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 529 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
528 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 530 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
529 | 531 | ||
530 | connect( mDateNavigator, SIGNAL( goPrevYear() ), | 532 | connect( mDateNavigator, SIGNAL( goPrevYear() ), |
531 | mNavigator, SLOT( selectPreviousYear() ) ); | 533 | mNavigator, SLOT( selectPreviousYear() ) ); |
532 | connect( mDateNavigator, SIGNAL( goNextYear() ), | 534 | connect( mDateNavigator, SIGNAL( goNextYear() ), |
533 | mNavigator, SLOT( selectNextYear() ) ); | 535 | mNavigator, SLOT( selectNextYear() ) ); |
534 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), | 536 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), |
535 | mNavigator, SLOT( selectPreviousMonth() ) ); | 537 | mNavigator, SLOT( selectPreviousMonth() ) ); |
536 | connect( mDateNavigator, SIGNAL( goNextMonth() ), | 538 | connect( mDateNavigator, SIGNAL( goNextMonth() ), |
537 | mNavigator, SLOT( selectNextMonth() ) ); | 539 | mNavigator, SLOT( selectNextMonth() ) ); |
538 | 540 | ||
539 | connect( mDateNavigator, SIGNAL( goPrevious() ), | 541 | connect( mDateNavigator, SIGNAL( goPrevious() ), |
540 | mNavigator, SLOT( selectPrevious() ) ); | 542 | mNavigator, SLOT( selectPrevious() ) ); |
541 | connect( mDateNavigator, SIGNAL( goNext() ), | 543 | connect( mDateNavigator, SIGNAL( goNext() ), |
542 | mNavigator, SLOT( selectNext() ) ); | 544 | mNavigator, SLOT( selectNext() ) ); |
543 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 545 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
544 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 546 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
@@ -5097,64 +5099,78 @@ void CalendarView::resetFocus() | |||
5097 | if ( mViewerCallerIsSearchDialog ) { | 5099 | if ( mViewerCallerIsSearchDialog ) { |
5098 | if ( mDialogManager->getSearchDialog()->isVisible() ){ | 5100 | if ( mDialogManager->getSearchDialog()->isVisible() ){ |
5099 | mDialogManager->getSearchDialog()->raise(); | 5101 | mDialogManager->getSearchDialog()->raise(); |
5100 | mDialogManager->getSearchDialog()->setActiveWindow(); | 5102 | mDialogManager->getSearchDialog()->setActiveWindow(); |
5101 | mDialogManager->getSearchDialog()->listview()->resetFocus(); | 5103 | mDialogManager->getSearchDialog()->listview()->resetFocus(); |
5102 | } else | 5104 | } else |
5103 | mViewerCallerIsSearchDialog = false; | 5105 | mViewerCallerIsSearchDialog = false; |
5104 | } | 5106 | } |
5105 | if ( !mViewerCallerIsSearchDialog ) { | 5107 | if ( !mViewerCallerIsSearchDialog ) { |
5106 | //mViewManager->currentView()->setFocus(); | 5108 | //mViewManager->currentView()->setFocus(); |
5107 | //qDebug("sssssssssssssssset focus "); | 5109 | //qDebug("sssssssssssssssset focus "); |
5108 | topLevelWidget()->raise(); | 5110 | topLevelWidget()->raise(); |
5109 | setActiveWindow(); | 5111 | setActiveWindow(); |
5110 | //setFocus(); | 5112 | //setFocus(); |
5111 | } | 5113 | } |
5112 | mViewerCallerIsSearchDialog = false; | 5114 | mViewerCallerIsSearchDialog = false; |
5113 | } | 5115 | } |
5114 | 5116 | ||
5115 | void CalendarView::showNextAlarms() | 5117 | void CalendarView::showNextAlarms() |
5116 | { | 5118 | { |
5117 | QString message; | 5119 | QString message; |
5118 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); | 5120 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); |
5119 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { | 5121 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { |
5120 | QString sum = mCalendar->nextSummary(); | 5122 | QString sum = mCalendar->nextSummary(); |
5121 | QDateTime nextA = mNextAlarmDateTime; | 5123 | QDateTime nextA = mNextAlarmDateTime; |
5122 | QDateTime cur = QDateTime::currentDateTime(); | 5124 | QDateTime cur = QDateTime::currentDateTime(); |
5123 | int secs = cur.secsTo( nextA ); | 5125 | int secs = cur.secsTo( nextA ); |
5124 | int min = secs /60; | 5126 | int min = secs /60; |
5125 | int hours = min /60; | 5127 | int hours = min /60; |
5126 | min = min % 60; | 5128 | min = min % 60; |
5127 | int days = hours /24; | 5129 | int days = hours /24; |
5128 | hours = hours % 24; | 5130 | hours = hours % 24; |
5129 | 5131 | ||
5130 | //message = i18n("The next alarm is in:\n"); | 5132 | //message = i18n("The next alarm is in:\n"); |
5131 | if ( days > 1 ) | 5133 | if ( days > 1 ) |
5132 | message += i18n("%1 days\n").arg( days ); | 5134 | message += i18n("%1 days\n").arg( days ); |
5133 | else if ( days == 1 ) | 5135 | else if ( days == 1 ) |
5134 | message += i18n("1 day\n"); | 5136 | message += i18n("1 day\n"); |
5135 | if ( hours > 1 ) | 5137 | if ( hours > 1 ) |
5136 | message += i18n("%1 hours\n").arg( hours ); | 5138 | message += i18n("%1 hours\n").arg( hours ); |
5137 | else if ( hours == 1 ) | 5139 | else if ( hours == 1 ) |
5138 | message += i18n("1 hour\n"); | 5140 | message += i18n("1 hour\n"); |
5139 | if ( min > 1 ) | 5141 | if ( min > 1 ) |
5140 | message += i18n("%1 minutes\n").arg( min ); | 5142 | message += i18n("%1 minutes\n").arg( min ); |
5141 | else if ( min == 1 ) | 5143 | else if ( min == 1 ) |
5142 | message += i18n("1 minute\n"); | 5144 | message += i18n("1 minute\n"); |
5143 | if ( message.isEmpty() ) | 5145 | if ( message.isEmpty() ) |
5144 | message = i18n("The next alarm is in\nless than one minute!"); | 5146 | message = i18n("The next alarm is in\nless than one minute!"); |
5145 | else | 5147 | else |
5146 | message = i18n("The next alarm is in:\n") + message; | 5148 | message = i18n("The next alarm is in:\n") + message; |
5147 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; | 5149 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; |
5148 | } else { | 5150 | } else { |
5149 | message = i18n("There is no next alarm."); | 5151 | message = i18n("There is no next alarm."); |
5150 | 5152 | ||
5151 | } | 5153 | } |
5152 | #ifdef DESKTOP_VERSION | 5154 | #ifdef DESKTOP_VERSION |
5153 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 5155 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
5154 | message += i18n("\nThe internal alarm notification is disabled!\n"); | 5156 | message += i18n("\nThe internal alarm notification is disabled!\n"); |
5155 | message += i18n("Enable it in the settings menu, TAB alarm."); | 5157 | message += i18n("Enable it in the settings menu, TAB alarm."); |
5156 | } | 5158 | } |
5157 | 5159 | ||
5158 | #endif | 5160 | #endif |
5159 | KMessageBox::information( this, message); | 5161 | KMessageBox::information( this, message); |
5160 | } | 5162 | } |
5163 | |||
5164 | void CalendarView::displayCalendarInfo( int id ) | ||
5165 | { | ||
5166 | int e, t,j; | ||
5167 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | ||
5168 | QString name = kkf->mName; | ||
5169 | mCalendar->getIncidenceCount( id, e, t, j ); | ||
5170 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | ||
5171 | QString mess = i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file); | ||
5172 | mess += i18n("<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>").arg( e ).arg( t ).arg( j ); | ||
5173 | KMessageBox::information( this, mess ); | ||
5174 | |||
5175 | |||
5176 | } | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8670832..0924f07 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -140,128 +140,129 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | 141 | void mergeFile( QString fn ); |
142 | 142 | ||
143 | signals: | 143 | signals: |
144 | void save (); | 144 | void save (); |
145 | void saveStopTimer (); | 145 | void saveStopTimer (); |
146 | void tempDisableBR(bool); | 146 | void tempDisableBR(bool); |
147 | /** This todo has been modified */ | 147 | /** This todo has been modified */ |
148 | void todoModified(Todo *, int); | 148 | void todoModified(Todo *, int); |
149 | 149 | ||
150 | /** when change is made to options dialog, the topwidget will catch this | 150 | /** when change is made to options dialog, the topwidget will catch this |
151 | * and emit this signal which notifies all widgets which have registered | 151 | * and emit this signal which notifies all widgets which have registered |
152 | * for notification to update their settings. */ | 152 | * for notification to update their settings. */ |
153 | void configChanged(); | 153 | void configChanged(); |
154 | /** emitted when the topwidget is closing down, so that any attached | 154 | /** emitted when the topwidget is closing down, so that any attached |
155 | child windows can also close. */ | 155 | child windows can also close. */ |
156 | void closingDown(); | 156 | void closingDown(); |
157 | /** emitted right before we die */ | 157 | /** emitted right before we die */ |
158 | void closed(QWidget *); | 158 | void closed(QWidget *); |
159 | 159 | ||
160 | /** Emitted when state of modified flag changes */ | 160 | /** Emitted when state of modified flag changes */ |
161 | void modifiedChanged(bool); | 161 | void modifiedChanged(bool); |
162 | void signalmodified(); | 162 | void signalmodified(); |
163 | 163 | ||
164 | /** Emitted when state of read-only flag changes */ | 164 | /** Emitted when state of read-only flag changes */ |
165 | void readOnlyChanged(bool); | 165 | void readOnlyChanged(bool); |
166 | 166 | ||
167 | /** Emitted when the unit of navigation changes */ | 167 | /** Emitted when the unit of navigation changes */ |
168 | void changeNavStringPrev(const QString &); | 168 | void changeNavStringPrev(const QString &); |
169 | void changeNavStringNext(const QString &); | 169 | void changeNavStringNext(const QString &); |
170 | 170 | ||
171 | /** Emitted when state of events selection has changed and user is organizer*/ | 171 | /** Emitted when state of events selection has changed and user is organizer*/ |
172 | void organizerEventsSelected(bool); | 172 | void organizerEventsSelected(bool); |
173 | /** Emitted when state of events selection has changed and user is attendee*/ | 173 | /** Emitted when state of events selection has changed and user is attendee*/ |
174 | void groupEventsSelected(bool); | 174 | void groupEventsSelected(bool); |
175 | /** | 175 | /** |
176 | Emitted when an incidence gets selected. If the selection is cleared the | 176 | Emitted when an incidence gets selected. If the selection is cleared the |
177 | signal is emitted with 0 as argument. | 177 | signal is emitted with 0 as argument. |
178 | */ | 178 | */ |
179 | void incidenceSelected( Incidence * ); | 179 | void incidenceSelected( Incidence * ); |
180 | /** Emitted, when a todoitem is selected or deselected. */ | 180 | /** Emitted, when a todoitem is selected or deselected. */ |
181 | void todoSelected( bool ); | 181 | void todoSelected( bool ); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Emitted, when clipboard content changes. Parameter indicates if paste | 184 | Emitted, when clipboard content changes. Parameter indicates if paste |
185 | is possible or not. | 185 | is possible or not. |
186 | */ | 186 | */ |
187 | void pasteEnabled(bool); | 187 | void pasteEnabled(bool); |
188 | 188 | ||
189 | /** Emitted, when the number of incoming messages has changed. */ | 189 | /** Emitted, when the number of incoming messages has changed. */ |
190 | void numIncomingChanged(int); | 190 | void numIncomingChanged(int); |
191 | 191 | ||
192 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
193 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
194 | 194 | ||
195 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
196 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
197 | 197 | ||
198 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
199 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
200 | void filtersUpdated(); | 200 | void filtersUpdated(); |
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void displayCalendarInfo( int id ); | ||
204 | void nextConflict( bool all, bool allday ); | 205 | void nextConflict( bool all, bool allday ); |
205 | void conflictAll(); | 206 | void conflictAll(); |
206 | void conflictAllday(); | 207 | void conflictAllday(); |
207 | void conflictNotAll(); | 208 | void conflictNotAll(); |
208 | void setCalReadOnly( int id, bool readO ); | 209 | void setCalReadOnly( int id, bool readO ); |
209 | void checkAlarms(); | 210 | void checkAlarms(); |
210 | void checkFiles(); | 211 | void checkFiles(); |
211 | void slotprintSelInc(); | 212 | void slotprintSelInc(); |
212 | void showNextAlarms(); | 213 | void showNextAlarms(); |
213 | void showOpenError(); | 214 | void showOpenError(); |
214 | void watchSavedFile(); | 215 | void watchSavedFile(); |
215 | void recheckTimerAlarm(); | 216 | void recheckTimerAlarm(); |
216 | void checkNextTimerAlarm(); | 217 | void checkNextTimerAlarm(); |
217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 218 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 219 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 220 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
220 | 221 | ||
221 | /** options dialog made a changed to the configuration. we catch this | 222 | /** options dialog made a changed to the configuration. we catch this |
222 | * and notify all widgets which need to update their configuration. */ | 223 | * and notify all widgets which need to update their configuration. */ |
223 | void updateConfig(); | 224 | void updateConfig(); |
224 | 225 | ||
225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 226 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
226 | const QStringList& anniversaryList, const QStringList& realNameList, | 227 | const QStringList& anniversaryList, const QStringList& realNameList, |
227 | const QStringList& emailList, const QStringList& assembledNameList, | 228 | const QStringList& emailList, const QStringList& assembledNameList, |
228 | const QStringList& uidList); | 229 | const QStringList& uidList); |
229 | 230 | ||
230 | /** | 231 | /** |
231 | Load calendar from file \a filename. If \a merge is true, load | 232 | Load calendar from file \a filename. If \a merge is true, load |
232 | calendar into existing one, if it is false, clear calendar, before | 233 | calendar into existing one, if it is false, clear calendar, before |
233 | loading. Return true, if calendar could be successfully loaded. | 234 | loading. Return true, if calendar could be successfully loaded. |
234 | */ | 235 | */ |
235 | bool openCalendar(QString filename, bool merge=false); | 236 | bool openCalendar(QString filename, bool merge=false); |
236 | bool loadCalendars(); | 237 | bool loadCalendars(); |
237 | bool saveCalendars(); | 238 | bool saveCalendars(); |
238 | bool restoreCalendarSettings(); | 239 | bool restoreCalendarSettings(); |
239 | bool addCalendar( KopiCalendarFile * ); | 240 | bool addCalendar( KopiCalendarFile * ); |
240 | void addCalendarId( int id ); | 241 | void addCalendarId( int id ); |
241 | bool syncCalendar(QString filename,int mode = 0 ); | 242 | bool syncCalendar(QString filename,int mode = 0 ); |
242 | 243 | ||
243 | /** | 244 | /** |
244 | Save calendar data to file. Return true if calendar could be | 245 | Save calendar data to file. Return true if calendar could be |
245 | successfully saved. | 246 | successfully saved. |
246 | */ | 247 | */ |
247 | bool saveCalendar(QString filename); | 248 | bool saveCalendar(QString filename); |
248 | 249 | ||
249 | /** | 250 | /** |
250 | Close calendar. Clear calendar data and reset views to display an empty | 251 | Close calendar. Clear calendar data and reset views to display an empty |
251 | calendar. | 252 | calendar. |
252 | */ | 253 | */ |
253 | void closeCalendar(); | 254 | void closeCalendar(); |
254 | 255 | ||
255 | /** Archive old events of calendar */ | 256 | /** Archive old events of calendar */ |
256 | void archiveCalendar(); | 257 | void archiveCalendar(); |
257 | 258 | ||
258 | void showIncidence(); | 259 | void showIncidence(); |
259 | void editIncidence(); | 260 | void editIncidence(); |
260 | void editIncidenceDescription(); | 261 | void editIncidenceDescription(); |
261 | void deleteIncidence(); | 262 | void deleteIncidence(); |
262 | void cloneIncidence(); | 263 | void cloneIncidence(); |
263 | void moveIncidence(); | 264 | void moveIncidence(); |
264 | void beamIncidence(); | 265 | void beamIncidence(); |
265 | void toggleCancelIncidence(); | 266 | void toggleCancelIncidence(); |
266 | 267 | ||
267 | /** create an editeventwin with supplied date/time, and if bool is true, | 268 | /** create an editeventwin with supplied date/time, and if bool is true, |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ef25fd0..ee9c9f6 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -169,130 +169,132 @@ void KOCalEditView::selectReadOnly(int id ,bool b ) | |||
169 | if ( !b ){ | 169 | if ( !b ){ |
170 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 170 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
171 | while ( kkf ) { | 171 | while ( kkf ) { |
172 | if (kkf->isReadOnly && kkf->isStandard ) { | 172 | if (kkf->isReadOnly && kkf->isStandard ) { |
173 | selectStdCal( id ); | 173 | selectStdCal( id ); |
174 | break; | 174 | break; |
175 | } | 175 | } |
176 | kkf = KOPrefs::instance()->mCalendars.next(); | 176 | kkf = KOPrefs::instance()->mCalendars.next(); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | mStdandardB.at(id-1)->setEnabled( !b ); | 180 | mStdandardB.at(id-1)->setEnabled( !b ); |
181 | emit needsUpdate(); | 181 | emit needsUpdate(); |
182 | 182 | ||
183 | } | 183 | } |
184 | void KOCalEditView::findNewStandard() | 184 | void KOCalEditView::findNewStandard() |
185 | { | 185 | { |
186 | bool found = false; | 186 | bool found = false; |
187 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 187 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
188 | while ( kkf ) { | 188 | while ( kkf ) { |
189 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { | 189 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { |
190 | found = true; | 190 | found = true; |
191 | selectStdCal( kkf->mCalNumber ); | 191 | selectStdCal( kkf->mCalNumber ); |
192 | break; | 192 | break; |
193 | } | 193 | } |
194 | kkf = KOPrefs::instance()->mCalendars.next(); | 194 | kkf = KOPrefs::instance()->mCalendars.next(); |
195 | } | 195 | } |
196 | if ( !found ) { | 196 | if ( !found ) { |
197 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), | 197 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), |
198 | i18n("Houston, we have a problem!") ); | 198 | i18n("Houston, we have a problem!") ); |
199 | 199 | ||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | void KOCalEditView::setColor( const QColor& c, int id ) | 203 | void KOCalEditView::setColor( const QColor& c, int id ) |
204 | { | 204 | { |
205 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; | 205 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; |
206 | emit needsUpdate(); | 206 | emit needsUpdate(); |
207 | } | 207 | } |
208 | void KOCalEditView::deleteCal( int id ) | 208 | void KOCalEditView::deleteCal( int id ) |
209 | { | 209 | { |
210 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | 210 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); |
211 | QString name = kkf->mName; | 211 | QString name = kkf->mName; |
212 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | 212 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); |
213 | if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; | 213 | if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; |
214 | bool findnewstd = kkf->isStandard; | 214 | bool findnewstd = kkf->isStandard; |
215 | emit removeCalendar ( id ); | 215 | emit removeCalendar ( id ); |
216 | KOPrefs::instance()->mCalendars.remove ( kkf ); | 216 | KOPrefs::instance()->mCalendars.remove ( kkf ); |
217 | if ( findnewstd ) findNewStandard(); | 217 | if ( findnewstd ) findNewStandard(); |
218 | emit needsUpdate(); | 218 | emit needsUpdate(); |
219 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 219 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
220 | } | 220 | } |
221 | void KOCalEditView::infoCal( int id ) | 221 | void KOCalEditView::infoCal( int id ) |
222 | { | 222 | { |
223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; | 223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; |
224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); | 224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); |
225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { | 225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { |
226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { | 226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { |
227 | emit calendarAdded( id ); | 227 | emit calendarAdded( id ); |
228 | emit needsUpdate(); | 228 | emit needsUpdate(); |
229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | 230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | else | 233 | else { |
234 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); | 234 | emit requestCalendarInfo( id ); |
235 | |||
236 | } | ||
235 | } | 237 | } |
236 | void KOCalEditView::readConfig() | 238 | void KOCalEditView::readConfig() |
237 | { | 239 | { |
238 | 240 | ||
239 | mStdandardB.clear(); | 241 | mStdandardB.clear(); |
240 | mEnabledB.clear(); | 242 | mEnabledB.clear(); |
241 | mAlarmB.clear(); | 243 | mAlarmB.clear(); |
242 | mROB.clear(); | 244 | mROB.clear(); |
243 | 245 | ||
244 | if ( mw ) delete mw; | 246 | if ( mw ) delete mw; |
245 | mw = new QWidget ( viewport() ); | 247 | mw = new QWidget ( viewport() ); |
246 | addChild(mw); | 248 | addChild(mw); |
247 | int ii = 0; | 249 | int ii = 0; |
248 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 250 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
249 | mainLayout->setMargin( 2 ); | 251 | mainLayout->setMargin( 2 ); |
250 | mainLayout->setSpacing( 2 ); | 252 | mainLayout->setSpacing( 2 ); |
251 | QPushButton * addButT = new QPushButton ( mw ); | 253 | QPushButton * addButT = new QPushButton ( mw ); |
252 | addButT->setFocusPolicy(NoFocus); | 254 | addButT->setFocusPolicy(NoFocus); |
253 | mainLayout->addWidget( addButT,0,0 ); | 255 | mainLayout->addWidget( addButT,0,0 ); |
254 | addButT->setText( "D"); | 256 | addButT->setText( "D"); |
255 | connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); | 257 | connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); |
256 | QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); | 258 | QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); |
257 | //addBut->setPixmap ( SmallIcon("greenhook16")); | 259 | //addBut->setPixmap ( SmallIcon("greenhook16")); |
258 | QPushButton *addBut = new QPushButton ( mw ); | 260 | QPushButton *addBut = new QPushButton ( mw ); |
259 | addBut->setFocusPolicy(NoFocus); | 261 | addBut->setFocusPolicy(NoFocus); |
260 | mainLayout->addWidget( addBut,0,++ii ); | 262 | mainLayout->addWidget( addBut,0,++ii ); |
261 | addBut->setPixmap ( SmallIcon("eye")); | 263 | addBut->setPixmap ( SmallIcon("eye")); |
262 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); | 264 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); |
263 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 265 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
264 | int max = addBut->sizeHint().height(); | 266 | int max = addBut->sizeHint().height(); |
265 | addBut->setMaximumWidth( max ); | 267 | addBut->setMaximumWidth( max ); |
266 | addButT->setFixedSize( QSize( max, max ) ); | 268 | addButT->setFixedSize( QSize( max, max ) ); |
267 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); | 269 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |
268 | mainLayout->addWidget( lab,0,++ii ); | 270 | mainLayout->addWidget( lab,0,++ii ); |
269 | QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); | 271 | QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); |
270 | //lab = new QLabel ( i18n(" "), mw ); | 272 | //lab = new QLabel ( i18n(" "), mw ); |
271 | //mainLayout->addWidget( lab,0,++ii ); | 273 | //mainLayout->addWidget( lab,0,++ii ); |
272 | //lab->setFixedWidth( 1 ); | 274 | //lab->setFixedWidth( 1 ); |
273 | addBut = new QPushButton ( mw ); | 275 | addBut = new QPushButton ( mw ); |
274 | addBut->setFocusPolicy(NoFocus); | 276 | addBut->setFocusPolicy(NoFocus); |
275 | mainLayout->addWidget( addBut,0,++ii ); | 277 | mainLayout->addWidget( addBut,0,++ii ); |
276 | addBut->setPixmap ( SmallIcon("bell")); | 278 | addBut->setPixmap ( SmallIcon("bell")); |
277 | QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); | 279 | QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); |
278 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 280 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
279 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 281 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
280 | 282 | ||
281 | addBut = new QPushButton ( mw ); | 283 | addBut = new QPushButton ( mw ); |
282 | addBut->setFocusPolicy(NoFocus); | 284 | addBut->setFocusPolicy(NoFocus); |
283 | mainLayout->addWidget( addBut,0,++ii ); | 285 | mainLayout->addWidget( addBut,0,++ii ); |
284 | addBut->setPixmap ( SmallIcon("pencil")); | 286 | addBut->setPixmap ( SmallIcon("pencil")); |
285 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); | 287 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); |
286 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 288 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
287 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 289 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
288 | lab = new QLabel ( "", mw ); | 290 | lab = new QLabel ( "", mw ); |
289 | mainLayout->addWidget( lab,0,++ii ); | 291 | mainLayout->addWidget( lab,0,++ii ); |
290 | 292 | ||
291 | addBut = new QPushButton ( mw ); | 293 | addBut = new QPushButton ( mw ); |
292 | addBut->setFocusPolicy(NoFocus); | 294 | addBut->setFocusPolicy(NoFocus); |
293 | mainLayout->addWidget( addBut,0,++ii ); | 295 | mainLayout->addWidget( addBut,0,++ii ); |
294 | addBut->setPixmap ( SmallIcon("plus")); | 296 | addBut->setPixmap ( SmallIcon("plus")); |
295 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | 297 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); |
296 | QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); | 298 | QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); |
297 | lab = new QLabel ( " ", mw ); | 299 | lab = new QLabel ( " ", mw ); |
298 | mainLayout->addWidget( lab,0,++ii ); | 300 | mainLayout->addWidget( lab,0,++ii ); |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d534dbf..0dd423a 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -179,78 +179,79 @@ private: | |||
179 | } | 179 | } |
180 | 180 | ||
181 | private slots : | 181 | private slots : |
182 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber); } | 182 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber); } |
183 | }; | 183 | }; |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | class KOFilterView : public KOFilterView_base | 187 | class KOFilterView : public KOFilterView_base |
188 | { | 188 | { |
189 | Q_OBJECT | 189 | Q_OBJECT |
190 | public: | 190 | public: |
191 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | 191 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); |
192 | ~KOFilterView(); | 192 | ~KOFilterView(); |
193 | 193 | ||
194 | void updateFilters(); | 194 | void updateFilters(); |
195 | 195 | ||
196 | bool filtersEnabled(); | 196 | bool filtersEnabled(); |
197 | void setFiltersEnabled(bool); | 197 | void setFiltersEnabled(bool); |
198 | CalFilter *selectedFilter(); | 198 | CalFilter *selectedFilter(); |
199 | void setSelectedFilter(QString); | 199 | void setSelectedFilter(QString); |
200 | void setSelectedFilter( int ); | 200 | void setSelectedFilter( int ); |
201 | 201 | ||
202 | signals: | 202 | signals: |
203 | void filterChanged(); | 203 | void filterChanged(); |
204 | void editFilters(); | 204 | void editFilters(); |
205 | 205 | ||
206 | private: | 206 | private: |
207 | QPtrList<CalFilter> *mFilters; | 207 | QPtrList<CalFilter> *mFilters; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | class KOCalEditView : public QScrollView | 210 | class KOCalEditView : public QScrollView |
211 | { | 211 | { |
212 | Q_OBJECT | 212 | Q_OBJECT |
213 | public: | 213 | public: |
214 | KOCalEditView( QWidget* parent=0,const char* name=0); | 214 | KOCalEditView( QWidget* parent=0,const char* name=0); |
215 | ~KOCalEditView(); | 215 | ~KOCalEditView(); |
216 | int addCalendar( QString calName, QString fileName, bool ask = true ); | 216 | int addCalendar( QString calName, QString fileName, bool ask = true ); |
217 | int getBirtdayID(); | 217 | int getBirtdayID(); |
218 | public slots: | 218 | public slots: |
219 | void addCal(); | 219 | void addCal(); |
220 | void enableAll(); | 220 | void enableAll(); |
221 | void enableAlarm(); | 221 | void enableAlarm(); |
222 | void disableRO(); | 222 | void disableRO(); |
223 | void deleteAll(); | 223 | void deleteAll(); |
224 | void selectStdCal(int); | 224 | void selectStdCal(int); |
225 | void selectCal(int,bool ); | 225 | void selectCal(int,bool ); |
226 | void selectCalAlarm(int,bool ); | 226 | void selectCalAlarm(int,bool ); |
227 | void selectReadOnly(int,bool ); | 227 | void selectReadOnly(int,bool ); |
228 | void setColor(const QColor &,int) ; | 228 | void setColor(const QColor &,int) ; |
229 | void deleteCal(int) ; | 229 | void deleteCal(int) ; |
230 | void infoCal(int) ; | 230 | void infoCal(int) ; |
231 | void readConfig(); | 231 | void readConfig(); |
232 | void defaultInfo(); | 232 | void defaultInfo(); |
233 | void findNewStandard(); | 233 | void findNewStandard(); |
234 | signals: | 234 | signals: |
235 | void alarmEnabled ( int cal, bool enable ); | 235 | void alarmEnabled ( int cal, bool enable ); |
236 | void calendarEnabled ( int cal, bool enable ); | 236 | void calendarEnabled ( int cal, bool enable ); |
237 | void calendarReadonly ( int cal, bool readonly ); | 237 | void calendarReadonly ( int cal, bool readonly ); |
238 | void setCalendarDefault ( int cal ); | 238 | void setCalendarDefault ( int cal ); |
239 | void removeCalendar ( int cal ); | 239 | void removeCalendar ( int cal ); |
240 | void calendarAdded( int ); | 240 | void calendarAdded( int ); |
241 | void needsUpdate(); | 241 | void needsUpdate(); |
242 | void checkCalendar(); | 242 | void checkCalendar(); |
243 | void requestCalendarInfo( int id ); | ||
243 | 244 | ||
244 | private: | 245 | private: |
245 | QWidget *mw; | 246 | QWidget *mw; |
246 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); | 247 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); |
247 | QPtrList<KOCalRadioButton> mStdandardB; | 248 | QPtrList<KOCalRadioButton> mStdandardB; |
248 | QPtrList<KOCalCheckButton> mEnabledB; | 249 | QPtrList<KOCalCheckButton> mEnabledB; |
249 | QPtrList<KOCalCheckButton> mAlarmB; | 250 | QPtrList<KOCalCheckButton> mAlarmB; |
250 | QPtrList<KOCalCheckButton> mROB; | 251 | QPtrList<KOCalCheckButton> mROB; |
251 | QGridLayout* mainLayout; | 252 | QGridLayout* mainLayout; |
252 | }; | 253 | }; |
253 | 254 | ||
254 | 255 | ||
255 | 256 | ||
256 | #endif // KOFILTERVIEW_H | 257 | #endif // KOFILTERVIEW_H |