author | zautrix <zautrix> | 2005-06-13 07:32:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-13 07:32:41 (UTC) |
commit | 2be8214908c52298ba79c8058d340edca5a8b417 (patch) (unidiff) | |
tree | 35c2775e9c00c2fe9c5616b3123d3dab62fad983 /korganizer | |
parent | c4ebf56feb36302b61b9c5ca6af97626812427b8 (diff) | |
download | kdepimpi-2be8214908c52298ba79c8058d340edca5a8b417.zip kdepimpi-2be8214908c52298ba79c8058d340edca5a8b417.tar.gz kdepimpi-2be8214908c52298ba79c8058d340edca5a8b417.tar.bz2 |
fixes
-rw-r--r-- | korganizer/calendarview.cpp | 29 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 13 |
3 files changed, 35 insertions, 13 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1024b4e..b3686aa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3866,147 +3866,168 @@ void CalendarView::checkClipboard() | |||
3866 | 3866 | ||
3867 | void CalendarView::showDates(const DateList &selectedDates) | 3867 | void CalendarView::showDates(const DateList &selectedDates) |
3868 | { | 3868 | { |
3869 | // kdDebug() << "CalendarView::selectDates()" << endl; | 3869 | // kdDebug() << "CalendarView::selectDates()" << endl; |
3870 | 3870 | ||
3871 | 3871 | ||
3872 | if ( !mBlockShowDates ) { | 3872 | if ( !mBlockShowDates ) { |
3873 | if ( mViewManager->currentView() ) { | 3873 | if ( mViewManager->currentView() ) { |
3874 | updateView( selectedDates.first(), selectedDates.last() ); | 3874 | updateView( selectedDates.first(), selectedDates.last() ); |
3875 | } else { | 3875 | } else { |
3876 | mViewManager->showAgendaView(); | 3876 | mViewManager->showAgendaView(); |
3877 | } | 3877 | } |
3878 | } | 3878 | } |
3879 | 3879 | ||
3880 | QDate date = selectedDates.first(); | 3880 | QDate date = selectedDates.first(); |
3881 | if ( ! date.isValid() ) { | 3881 | if ( ! date.isValid() ) { |
3882 | topLevelWidget()->setCaption(""); | 3882 | topLevelWidget()->setCaption(""); |
3883 | return; | 3883 | return; |
3884 | } | 3884 | } |
3885 | 3885 | ||
3886 | QString selDates; | 3886 | QString selDates; |
3887 | selDates = KGlobal::locale()->formatDate( date, true); | 3887 | selDates = KGlobal::locale()->formatDate( date, true); |
3888 | if (selectedDates.first() < selectedDates.last() ) | 3888 | if (selectedDates.first() < selectedDates.last() ) |
3889 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); | 3889 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); |
3890 | else { | 3890 | else { |
3891 | QString addString; | 3891 | QString addString; |
3892 | if ( date == QDateTime::currentDateTime().date() ) | 3892 | if ( date == QDateTime::currentDateTime().date() ) |
3893 | addString = i18n("Today"); | 3893 | addString = i18n("Today"); |
3894 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 3894 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
3895 | addString = i18n("Tomorrow"); | 3895 | addString = i18n("Tomorrow"); |
3896 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 3896 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
3897 | addString = i18n("Yesterday"); | 3897 | addString = i18n("Yesterday"); |
3898 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 3898 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
3899 | addString = i18n("Day before yesterday"); | 3899 | addString = i18n("Day before yesterday"); |
3900 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 3900 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
3901 | addString = i18n("Day after tomorrow"); | 3901 | addString = i18n("Day after tomorrow"); |
3902 | if ( !addString.isEmpty() ) { | 3902 | if ( !addString.isEmpty() ) { |
3903 | topLevelWidget()->setCaption( addString+", " + selDates ); | 3903 | topLevelWidget()->setCaption( addString+", " + selDates ); |
3904 | return; | 3904 | return; |
3905 | } | 3905 | } |
3906 | } | 3906 | } |
3907 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 3907 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
3908 | 3908 | ||
3909 | } | 3909 | } |
3910 | 3910 | ||
3911 | QPtrList<CalFilter> CalendarView::filters() | 3911 | QPtrList<CalFilter> CalendarView::filters() |
3912 | { | 3912 | { |
3913 | return mFilters; | 3913 | return mFilters; |
3914 | 3914 | ||
3915 | } | 3915 | } |
3916 | void CalendarView::editFilters() | 3916 | void CalendarView::editFilters() |
3917 | { | 3917 | { |
3918 | // kdDebug() << "CalendarView::editFilters()" << endl; | 3918 | // kdDebug() << "CalendarView::editFilters()" << endl; |
3919 | 3919 | ||
3920 | CalFilter *filter = mFilters.first(); | 3920 | CalFilter *filter = mFilters.first(); |
3921 | while(filter) { | 3921 | while(filter) { |
3922 | kdDebug() << " Filter: " << filter->name() << endl; | 3922 | kdDebug() << " Filter: " << filter->name() << endl; |
3923 | filter = mFilters.next(); | 3923 | filter = mFilters.next(); |
3924 | } | 3924 | } |
3925 | 3925 | ||
3926 | mDialogManager->showFilterEditDialog(&mFilters); | 3926 | mDialogManager->showFilterEditDialog(&mFilters); |
3927 | } | 3927 | } |
3928 | void CalendarView::toggleFilter() | 3928 | void CalendarView::toggleFilter() |
3929 | { | 3929 | { |
3930 | showFilter(! mFilterView->isVisible()); | 3930 | showFilter(! mCalEditView->isVisible()); |
3931 | } | 3931 | } |
3932 | 3932 | ||
3933 | KOFilterView *CalendarView::filterView() | 3933 | KOFilterView *CalendarView::filterView() |
3934 | { | 3934 | { |
3935 | return mFilterView; | 3935 | return mFilterView; |
3936 | } | 3936 | } |
3937 | void CalendarView::selectFilter( int fil ) | 3937 | void CalendarView::selectFilter( int fil ) |
3938 | { | 3938 | { |
3939 | mFilterView->setSelectedFilter( fil ); | 3939 | mFilterView->setSelectedFilter( fil ); |
3940 | } | 3940 | } |
3941 | void CalendarView::showFilter(bool visible) | 3941 | void CalendarView::showFilter(bool visible) |
3942 | { | 3942 | { |
3943 | #if 1 | 3943 | #if 1 |
3944 | if (visible) { | 3944 | if (visible) { |
3945 | mCalEditView->readConfig(); | 3945 | mCalEditView->readConfig(); |
3946 | mCalEditView->show(); | 3946 | mCalEditView->show(); |
3947 | QValueList<int> sizes; | ||
3948 | sizes = mLeftFrame->sizes(); | ||
3949 | if ( sizes.count() == 4 && sizes[3] < 20 ) { | ||
3950 | sizes.clear(); | ||
3951 | sizes << 100; | ||
3952 | sizes << 0; | ||
3953 | sizes << 0; | ||
3954 | sizes << 100; | ||
3955 | mLeftFrame->setSizes(sizes); | ||
3956 | } | ||
3957 | #if 0 | ||
3958 | sizes = mLeftFrame->sizes(); | ||
3959 | int ccc = 0; | ||
3960 | while ( ccc < sizes.count()) { | ||
3961 | qDebug("size %d %d ", ccc, sizes[ccc]); | ||
3962 | ++ccc; | ||
3963 | } | ||
3964 | #endif | ||
3965 | |||
3966 | } | ||
3967 | else { | ||
3968 | mCalEditView->hide(); | ||
3947 | } | 3969 | } |
3948 | else mCalEditView->hide(); | ||
3949 | #else | 3970 | #else |
3950 | if (visible) mFilterView->show(); | 3971 | if (visible) mFilterView->show(); |
3951 | else mFilterView->hide(); | 3972 | else mFilterView->hide(); |
3952 | #endif | 3973 | #endif |
3953 | } | 3974 | } |
3954 | void CalendarView::toggleFilerEnabled( ) | 3975 | void CalendarView::toggleFilerEnabled( ) |
3955 | { | 3976 | { |
3956 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3977 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
3957 | if ( !mFilterView->filtersEnabled() ) | 3978 | if ( !mFilterView->filtersEnabled() ) |
3958 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 3979 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
3959 | 3980 | ||
3960 | } | 3981 | } |
3961 | void CalendarView::updateFilter() | 3982 | void CalendarView::updateFilter() |
3962 | { | 3983 | { |
3963 | CalFilter *filter = mFilterView->selectedFilter(); | 3984 | CalFilter *filter = mFilterView->selectedFilter(); |
3964 | if (filter) { | 3985 | if (filter) { |
3965 | QString mess; | 3986 | QString mess; |
3966 | if (mFilterView->filtersEnabled()) { | 3987 | if (mFilterView->filtersEnabled()) { |
3967 | mess = i18n("Filter selected: ")+filter->name(); | 3988 | mess = i18n("Filter selected: ")+filter->name(); |
3968 | filter->setEnabled(true); | 3989 | filter->setEnabled(true); |
3969 | } | 3990 | } |
3970 | else filter->setEnabled(false); | 3991 | else filter->setEnabled(false); |
3971 | mCalendar->setFilter(filter); | 3992 | mCalendar->setFilter(filter); |
3972 | updateView(); | 3993 | updateView(); |
3973 | if ( !mess.isEmpty() ) | 3994 | if ( !mess.isEmpty() ) |
3974 | topLevelWidget()->setCaption( mess ); | 3995 | topLevelWidget()->setCaption( mess ); |
3975 | 3996 | ||
3976 | } | 3997 | } |
3977 | } | 3998 | } |
3978 | 3999 | ||
3979 | void CalendarView::filterEdited() | 4000 | void CalendarView::filterEdited() |
3980 | { | 4001 | { |
3981 | mFilterView->updateFilters(); | 4002 | mFilterView->updateFilters(); |
3982 | updateFilter(); | 4003 | updateFilter(); |
3983 | writeSettings(); | 4004 | writeSettings(); |
3984 | } | 4005 | } |
3985 | 4006 | ||
3986 | 4007 | ||
3987 | void CalendarView::takeOverEvent() | 4008 | void CalendarView::takeOverEvent() |
3988 | { | 4009 | { |
3989 | Incidence *incidence = currentSelection(); | 4010 | Incidence *incidence = currentSelection(); |
3990 | 4011 | ||
3991 | if (!incidence) return; | 4012 | if (!incidence) return; |
3992 | 4013 | ||
3993 | incidence->setOrganizer(KOPrefs::instance()->email()); | 4014 | incidence->setOrganizer(KOPrefs::instance()->email()); |
3994 | incidence->recreate(); | 4015 | incidence->recreate(); |
3995 | incidence->setReadOnly(false); | 4016 | incidence->setReadOnly(false); |
3996 | 4017 | ||
3997 | updateView(); | 4018 | updateView(); |
3998 | } | 4019 | } |
3999 | 4020 | ||
4000 | void CalendarView::takeOverCalendar() | 4021 | void CalendarView::takeOverCalendar() |
4001 | { | 4022 | { |
4002 | // TODO: Create Calendar::allIncidences() function and use it here | 4023 | // TODO: Create Calendar::allIncidences() function and use it here |
4003 | 4024 | ||
4004 | clearAllViews(); | 4025 | clearAllViews(); |
4005 | QPtrList<Event> events = mCalendar->events(); | 4026 | QPtrList<Event> events = mCalendar->events(); |
4006 | for(uint i=0; i<events.count(); ++i) { | 4027 | for(uint i=0; i<events.count(); ++i) { |
4007 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4028 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4008 | events.at(i)->recreate(); | 4029 | events.at(i)->recreate(); |
4009 | events.at(i)->setReadOnly(false); | 4030 | events.at(i)->setReadOnly(false); |
4010 | } | 4031 | } |
4011 | 4032 | ||
4012 | QPtrList<Todo> todos = mCalendar->todos(); | 4033 | QPtrList<Todo> todos = mCalendar->todos(); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index bc6aae4..9fe285c 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -385,206 +385,206 @@ QStringList KOPrefs::getLocationDefaultList() | |||
385 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 385 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
386 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 386 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
387 | 387 | ||
388 | retval.sort(); | 388 | retval.sort(); |
389 | return retval; | 389 | return retval; |
390 | } | 390 | } |
391 | QStringList KOPrefs::getDefaultList() | 391 | QStringList KOPrefs::getDefaultList() |
392 | { | 392 | { |
393 | QStringList retval ; | 393 | QStringList retval ; |
394 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 394 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
395 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 395 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
396 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 396 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
397 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 397 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
398 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 398 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
399 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 399 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
400 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 400 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
401 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 401 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
402 | retval.sort(); | 402 | retval.sort(); |
403 | //qDebug("cat %s ", retval.join("-").latin1()); | 403 | //qDebug("cat %s ", retval.join("-").latin1()); |
404 | return retval; | 404 | return retval; |
405 | } | 405 | } |
406 | 406 | ||
407 | void KOPrefs::usrReadConfig() | 407 | void KOPrefs::usrReadConfig() |
408 | { | 408 | { |
409 | config()->setGroup("General"); | 409 | config()->setGroup("General"); |
410 | 410 | ||
411 | //qDebug("KOPrefs::usrReadConfig() "); | 411 | //qDebug("KOPrefs::usrReadConfig() "); |
412 | mCustomCategories = config()->readListEntry("Custom Categories"); | 412 | mCustomCategories = config()->readListEntry("Custom Categories"); |
413 | mOldLoadedLanguage = mOldLanguage ; | 413 | mOldLoadedLanguage = mOldLanguage ; |
414 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 414 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
415 | if (mLocationDefaults.isEmpty()) { | 415 | if (mLocationDefaults.isEmpty()) { |
416 | mLocationDefaults = getLocationDefaultList(); | 416 | mLocationDefaults = getLocationDefaultList(); |
417 | } | 417 | } |
418 | 418 | ||
419 | if (mEventSummaryUser.isEmpty()) { | 419 | if (mEventSummaryUser.isEmpty()) { |
420 | mEventSummaryUser = getDefaultList() ; | 420 | mEventSummaryUser = getDefaultList() ; |
421 | } | 421 | } |
422 | if (mTodoSummaryUser.isEmpty()) { | 422 | if (mTodoSummaryUser.isEmpty()) { |
423 | mTodoSummaryUser = getDefaultList() ; | 423 | mTodoSummaryUser = getDefaultList() ; |
424 | } | 424 | } |
425 | 425 | ||
426 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 426 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
427 | 427 | ||
428 | config()->setGroup("Personal Settings"); | 428 | config()->setGroup("Personal Settings"); |
429 | mName = config()->readEntry("user_name",""); | 429 | mName = config()->readEntry("user_name",""); |
430 | mEmail = config()->readEntry("user_email",""); | 430 | mEmail = config()->readEntry("user_email",""); |
431 | fillMailDefaults(); | 431 | fillMailDefaults(); |
432 | 432 | ||
433 | config()->setGroup("Category Colors"); | 433 | config()->setGroup("Category Colors"); |
434 | QStringList::Iterator it; | 434 | QStringList::Iterator it; |
435 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 435 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
436 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 436 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
437 | 437 | ||
438 | } | 438 | } |
439 | config()->setGroup("CCal"); | 439 | config()->setGroup("CCal"); |
440 | int numCals = config()->readNumEntry("NumberCalendars",0 ); | 440 | int numCals = config()->readNumEntry("NumberCalendars",0 ); |
441 | mNextAvailableCalendar = 1; | 441 | mNextAvailableCalendar = 1; |
442 | if ( numCals == 0 ) { | 442 | if ( numCals == 0 ) { |
443 | KopiCalendarFile *kkf = getNewCalendar(); | 443 | KopiCalendarFile *kkf = getNewCalendar(); |
444 | kkf->isStandard = true; | 444 | kkf->isStandard = true; |
445 | kkf->mName = i18n("Standard"); | 445 | kkf->mName = i18n("Standard"); |
446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
447 | } | 447 | } |
448 | while ( mNextAvailableCalendar <= numCals ) { | 448 | while ( mNextAvailableCalendar <= numCals ) { |
449 | qDebug("Read cal #%d ", mNextAvailableCalendar ); | 449 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); |
450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
451 | KopiCalendarFile *kkf = getNewCalendar(); | 451 | KopiCalendarFile *kkf = getNewCalendar(); |
452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); | 452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); |
453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); | 453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); |
454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); | 454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); |
455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); | 455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); |
456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); | 456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); |
457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); | 457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); |
458 | kkf->mDefaultColor = config()->readColorEntry( prefix+"_Color",&mEventColor); | 458 | kkf->mDefaultColor = config()->readColorEntry( prefix+"_Color",&mEventColor); |
459 | if ( kkf->mCalNumber == 1 ) { | 459 | if ( kkf->mCalNumber == 1 ) { |
460 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 460 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
461 | } | 461 | } |
462 | } | 462 | } |
463 | 463 | ||
464 | KPimPrefs::usrReadConfig(); | 464 | KPimPrefs::usrReadConfig(); |
465 | } | 465 | } |
466 | 466 | ||
467 | KopiCalendarFile * KOPrefs::getCalendar( int num ) | 467 | KopiCalendarFile * KOPrefs::getCalendar( int num ) |
468 | { | 468 | { |
469 | return mDefCalColors[num-1]; | 469 | return mDefCalColors[num-1]; |
470 | } | 470 | } |
471 | 471 | ||
472 | KopiCalendarFile * KOPrefs::getNewCalendar() | 472 | KopiCalendarFile * KOPrefs::getNewCalendar() |
473 | { | 473 | { |
474 | KopiCalendarFile * kkf = new KopiCalendarFile(); | 474 | KopiCalendarFile * kkf = new KopiCalendarFile(); |
475 | kkf->mCalNumber = mNextAvailableCalendar; | 475 | kkf->mCalNumber = mNextAvailableCalendar; |
476 | mDefCalColors.resize( mNextAvailableCalendar ); | 476 | mDefCalColors.resize( mNextAvailableCalendar ); |
477 | mDefCalColors[mNextAvailableCalendar-1] = kkf; | 477 | mDefCalColors[mNextAvailableCalendar-1] = kkf; |
478 | ++mNextAvailableCalendar; | 478 | ++mNextAvailableCalendar; |
479 | kkf->mDefaultColor = mEventColor; | 479 | kkf->mDefaultColor = mEventColor; |
480 | kkf->mName = i18n("New Calendar"); | 480 | kkf->mName = i18n("New Calendar"); |
481 | mCalendars.append( kkf ); | 481 | mCalendars.append( kkf ); |
482 | return kkf; | 482 | return kkf; |
483 | } | 483 | } |
484 | void KOPrefs::deleteCalendar( int num ) | 484 | void KOPrefs::deleteCalendar( int num ) |
485 | { | 485 | { |
486 | KopiCalendarFile * kkf = mCalendars.first(); | 486 | KopiCalendarFile * kkf = mCalendars.first(); |
487 | while ( kkf ) { | 487 | while ( kkf ) { |
488 | if ( kkf->mCalNumber == num ) { | 488 | if ( kkf->mCalNumber == num ) { |
489 | qDebug("KOPrefs::deleteCalendar %d ", num ); | 489 | qDebug("KOPrefs::deleteCalendar %d ", num ); |
490 | mCalendars.remove( kkf ); | 490 | mCalendars.remove( kkf ); |
491 | delete kkf; | 491 | delete kkf; |
492 | return; | 492 | return; |
493 | } | 493 | } |
494 | kkf = mCalendars.next(); | 494 | kkf = mCalendars.next(); |
495 | } | 495 | } |
496 | } | 496 | } |
497 | QColor KOPrefs::defaultColor( int calNum ) const | 497 | QColor KOPrefs::defaultColor( int calNum ) const |
498 | { | 498 | { |
499 | return (mDefCalColors[calNum-1])->mDefaultColor; | 499 | return (mDefCalColors[calNum-1])->mDefaultColor; |
500 | } | 500 | } |
501 | void KOPrefs::usrWriteConfig() | 501 | void KOPrefs::usrWriteConfig() |
502 | { | 502 | { |
503 | config()->setGroup("General"); | 503 | config()->setGroup("General"); |
504 | config()->writeEntry("Custom Categories",mCustomCategories); | 504 | config()->writeEntry("Custom Categories",mCustomCategories); |
505 | 505 | ||
506 | config()->setGroup("Personal Settings"); | 506 | config()->setGroup("Personal Settings"); |
507 | config()->writeEntry("user_name",mName); | 507 | config()->writeEntry("user_name",mName); |
508 | config()->writeEntry("user_email",mEmail); | 508 | config()->writeEntry("user_email",mEmail); |
509 | 509 | ||
510 | config()->setGroup("Category Colors"); | 510 | config()->setGroup("Category Colors"); |
511 | QDictIterator<QColor> it(mCategoryColors); | 511 | QDictIterator<QColor> it(mCategoryColors); |
512 | while (it.current()) { | 512 | while (it.current()) { |
513 | config()->writeEntry(it.currentKey(),*(it.current())); | 513 | config()->writeEntry(it.currentKey(),*(it.current())); |
514 | ++it; | 514 | ++it; |
515 | } | 515 | } |
516 | config()->setGroup("CCal"); | 516 | config()->setGroup("CCal"); |
517 | config()->writeEntry("NumberCalendars",mCalendars.count()); | 517 | config()->writeEntry("NumberCalendars",mCalendars.count()); |
518 | int numCal = 1; | 518 | int numCal = 1; |
519 | int writeCal = 0; | 519 | int writeCal = 0; |
520 | while ( numCal < mNextAvailableCalendar ) { | 520 | while ( numCal < mNextAvailableCalendar ) { |
521 | KopiCalendarFile * kkf = mCalendars.first(); | 521 | KopiCalendarFile * kkf = mCalendars.first(); |
522 | while ( kkf ) { | 522 | while ( kkf ) { |
523 | qDebug("cal num %d %d ", kkf->mCalNumber, numCal); | 523 | //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); |
524 | if ( kkf->mCalNumber == numCal ) { | 524 | if ( kkf->mCalNumber == numCal ) { |
525 | ++writeCal; | 525 | ++writeCal; |
526 | qDebug("Write calendar %d %d ", numCal , writeCal); | 526 | //qDebug("Write calendar %d %d ", numCal , writeCal); |
527 | QString prefix = "Cal_" + QString::number( writeCal ); | 527 | QString prefix = "Cal_" + QString::number( writeCal ); |
528 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); | 528 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); |
529 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); | 529 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); |
530 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); | 530 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); |
531 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); | 531 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); |
532 | config()->writeEntry( prefix+"_Name", kkf->mName); | 532 | config()->writeEntry( prefix+"_Name", kkf->mName); |
533 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); | 533 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); |
534 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); | 534 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); |
535 | } | 535 | } |
536 | kkf = mCalendars.next(); | 536 | kkf = mCalendars.next(); |
537 | } | 537 | } |
538 | ++numCal; | 538 | ++numCal; |
539 | } | 539 | } |
540 | KPimPrefs::usrWriteConfig(); | 540 | KPimPrefs::usrWriteConfig(); |
541 | } | 541 | } |
542 | 542 | ||
543 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) | 543 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) |
544 | { | 544 | { |
545 | mCategoryColors.replace(cat,new QColor(color)); | 545 | mCategoryColors.replace(cat,new QColor(color)); |
546 | } | 546 | } |
547 | 547 | ||
548 | QColor *KOPrefs::categoryColor(QString cat) | 548 | QColor *KOPrefs::categoryColor(QString cat) |
549 | { | 549 | { |
550 | QColor *color = 0; | 550 | QColor *color = 0; |
551 | 551 | ||
552 | if (!cat.isEmpty()) color = mCategoryColors[cat]; | 552 | if (!cat.isEmpty()) color = mCategoryColors[cat]; |
553 | 553 | ||
554 | if (color) return color; | 554 | if (color) return color; |
555 | else return &mDefaultCategoryColor; | 555 | else return &mDefaultCategoryColor; |
556 | } | 556 | } |
557 | 557 | ||
558 | void KOPrefs::setFullName(const QString &name) | 558 | void KOPrefs::setFullName(const QString &name) |
559 | { | 559 | { |
560 | mName = name; | 560 | mName = name; |
561 | } | 561 | } |
562 | 562 | ||
563 | void KOPrefs::setEmail(const QString &email) | 563 | void KOPrefs::setEmail(const QString &email) |
564 | { | 564 | { |
565 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); | 565 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); |
566 | mEmail = email; | 566 | mEmail = email; |
567 | } | 567 | } |
568 | 568 | ||
569 | QString KOPrefs::fullName() | 569 | QString KOPrefs::fullName() |
570 | { | 570 | { |
571 | if (mEmailControlCenter) { | 571 | if (mEmailControlCenter) { |
572 | KEMailSettings settings; | 572 | KEMailSettings settings; |
573 | return settings.getSetting(KEMailSettings::RealName); | 573 | return settings.getSetting(KEMailSettings::RealName); |
574 | } else { | 574 | } else { |
575 | return mName; | 575 | return mName; |
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | QString KOPrefs::email() | 579 | QString KOPrefs::email() |
580 | { | 580 | { |
581 | if (mEmailControlCenter) { | 581 | if (mEmailControlCenter) { |
582 | KEMailSettings settings; | 582 | KEMailSettings settings; |
583 | return settings.getSetting(KEMailSettings::EmailAddress); | 583 | return settings.getSetting(KEMailSettings::EmailAddress); |
584 | } else { | 584 | } else { |
585 | return mEmail; | 585 | return mEmail; |
586 | } | 586 | } |
587 | } | 587 | } |
588 | KConfig* KOPrefs::getConfig() | 588 | KConfig* KOPrefs::getConfig() |
589 | { | 589 | { |
590 | return config(); | 590 | return config(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 0cb0bce..95e1607 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -726,129 +726,130 @@ void MainWindow::initActions() | |||
726 | icon = loadPixmap( pathString + "configure" ); | 726 | icon = loadPixmap( pathString + "configure" ); |
727 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); | 727 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
728 | action->addTo( actionMenu ); | 728 | action->addTo( actionMenu ); |
729 | connect( action, SIGNAL( activated() ), | 729 | connect( action, SIGNAL( activated() ), |
730 | mView, SLOT( edit_options() ) ); | 730 | mView, SLOT( edit_options() ) ); |
731 | icon = loadPixmap( pathString + "configure" ); | 731 | icon = loadPixmap( pathString + "configure" ); |
732 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | 732 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); |
733 | action->addTo( actionMenu ); | 733 | action->addTo( actionMenu ); |
734 | connect( action, SIGNAL( activated() ), | 734 | connect( action, SIGNAL( activated() ), |
735 | mView, SLOT( edit_global_options() ) ); | 735 | mView, SLOT( edit_global_options() ) ); |
736 | actionMenu->insertSeparator(); | 736 | actionMenu->insertSeparator(); |
737 | 737 | ||
738 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 738 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
739 | action->addTo( actionMenu ); | 739 | action->addTo( actionMenu ); |
740 | connect( action, SIGNAL( activated() ), | 740 | connect( action, SIGNAL( activated() ), |
741 | mView, SLOT( undo_delete() ) ); | 741 | mView, SLOT( undo_delete() ) ); |
742 | actionMenu->insertSeparator(); | 742 | actionMenu->insertSeparator(); |
743 | 743 | ||
744 | icon = loadPixmap( pathString + "newevent" ); | 744 | icon = loadPixmap( pathString + "newevent" ); |
745 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 745 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
746 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 746 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
747 | configureToolBarMenu->insertSeparator(); | 747 | configureToolBarMenu->insertSeparator(); |
748 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 748 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
749 | configureToolBarMenu->insertSeparator(); | 749 | configureToolBarMenu->insertSeparator(); |
750 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 750 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
751 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 751 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
752 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 752 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
753 | ne_action->addTo( actionMenu ); | 753 | ne_action->addTo( actionMenu ); |
754 | connect( ne_action, SIGNAL( activated() ), | 754 | connect( ne_action, SIGNAL( activated() ), |
755 | mView, SLOT( newEvent() ) ); | 755 | mView, SLOT( newEvent() ) ); |
756 | icon = loadPixmap( pathString + "newtodo" ); | 756 | icon = loadPixmap( pathString + "newtodo" ); |
757 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 757 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
758 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 758 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
759 | nt_action->addTo( actionMenu ); | 759 | nt_action->addTo( actionMenu ); |
760 | connect( nt_action, SIGNAL( activated() ), | 760 | connect( nt_action, SIGNAL( activated() ), |
761 | mView, SLOT( newTodo() ) ); | 761 | mView, SLOT( newTodo() ) ); |
762 | 762 | ||
763 | icon = loadPixmap( pathString + "today" ); | 763 | icon = loadPixmap( pathString + "today" ); |
764 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 764 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
765 | today_action->addTo( viewMenu ); | 765 | today_action->addTo( viewMenu ); |
766 | connect( today_action, SIGNAL( activated() ), | 766 | connect( today_action, SIGNAL( activated() ), |
767 | mView, SLOT( goToday() ) ); | 767 | mView, SLOT( goToday() ) ); |
768 | viewMenu->insertSeparator(); | 768 | viewMenu->insertSeparator(); |
769 | 769 | ||
770 | // *********************** | 770 | // *********************** |
771 | if ( KOPrefs::instance()->mVerticalScreen ) { | 771 | if ( KOPrefs::instance()->mVerticalScreen ) { |
772 | icon = SmallIcon( "1updownarrow" ); | 772 | icon = SmallIcon( "1updownarrow" ); |
773 | } else { | 773 | } else { |
774 | icon = SmallIcon("1leftrightarrow" ); | 774 | icon = SmallIcon("1leftrightarrow" ); |
775 | } | 775 | } |
776 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 776 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
777 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 777 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
778 | FSaction->addTo( viewMenu ); | 778 | FSaction->addTo( viewMenu ); |
779 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 779 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
780 | 780 | ||
781 | icon = loadPixmap( pathString + "navi" ); | 781 | icon = loadPixmap( pathString + "navi" ); |
782 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 782 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
783 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 783 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
784 | action->addTo( viewMenu ); | 784 | action->addTo( viewMenu ); |
785 | connect( action, SIGNAL( activated() ), | 785 | connect( action, SIGNAL( activated() ), |
786 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 786 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
787 | mToggleNav = action ; | 787 | mToggleNav = action ; |
788 | icon = loadPixmap( pathString + "filter" ); | 788 | icon = loadPixmap( pathString + "filter" ); |
789 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 789 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
790 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 790 | icon = loadPixmap( pathString + "configure" ); |
791 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | ||
791 | action->addTo( viewMenu ); | 792 | action->addTo( viewMenu ); |
792 | connect( action, SIGNAL( activated() ), | 793 | connect( action, SIGNAL( activated() ), |
793 | mView, SLOT( toggleFilter() ) ); | 794 | mView, SLOT( toggleFilter() ) ); |
794 | mToggleFilter = action; | 795 | mToggleFilter = action; |
795 | icon = loadPixmap( pathString + "allday" ); | 796 | icon = loadPixmap( pathString + "allday" ); |
796 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 797 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
797 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 798 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
798 | action->addTo( viewMenu ); | 799 | action->addTo( viewMenu ); |
799 | connect( action, SIGNAL( activated() ), | 800 | connect( action, SIGNAL( activated() ), |
800 | mView, SLOT( toggleAllDaySize() ) ); | 801 | mView, SLOT( toggleAllDaySize() ) ); |
801 | mToggleAllday = action; | 802 | mToggleAllday = action; |
802 | 803 | ||
803 | 804 | ||
804 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 805 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
805 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 806 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
806 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 807 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
807 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 808 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
808 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 809 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
809 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 810 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
810 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 811 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
811 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); | 812 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); |
812 | 813 | ||
813 | viewMenu->insertSeparator(); | 814 | viewMenu->insertSeparator(); |
814 | icon = loadPixmap( pathString + "picker" ); | 815 | icon = loadPixmap( pathString + "picker" ); |
815 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 816 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
816 | action->addTo( viewMenu ); | 817 | action->addTo( viewMenu ); |
817 | connect( action, SIGNAL( activated() ), | 818 | connect( action, SIGNAL( activated() ), |
818 | mView, SLOT( showDatePicker() ) ); | 819 | mView, SLOT( showDatePicker() ) ); |
819 | action->addTo( iconToolBar ); | 820 | action->addTo( iconToolBar ); |
820 | viewMenu->insertSeparator(); | 821 | viewMenu->insertSeparator(); |
821 | 822 | ||
822 | if ( p-> mShowIconToggleFull ) | 823 | if ( p-> mShowIconToggleFull ) |
823 | FSaction->addTo( iconToolBar ); | 824 | FSaction->addTo( iconToolBar ); |
824 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 825 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
825 | 826 | ||
826 | //******************** | 827 | //******************** |
827 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 828 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
828 | 829 | ||
829 | 830 | ||
830 | icon = loadPixmap( pathString + "whatsnext" ); | 831 | icon = loadPixmap( pathString + "whatsnext" ); |
831 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 832 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
832 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 833 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
833 | whatsnext_action->addTo( viewMenu ); | 834 | whatsnext_action->addTo( viewMenu ); |
834 | connect( whatsnext_action, SIGNAL( activated() ), | 835 | connect( whatsnext_action, SIGNAL( activated() ), |
835 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 836 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
836 | 837 | ||
837 | icon = loadPixmap( pathString + "xdays" ); | 838 | icon = loadPixmap( pathString + "xdays" ); |
838 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 839 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
839 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 840 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
840 | xdays_action->addTo( viewMenu ); | 841 | xdays_action->addTo( viewMenu ); |
841 | connect( xdays_action, SIGNAL( activated() ), | 842 | connect( xdays_action, SIGNAL( activated() ), |
842 | mView->viewManager(), SLOT( showNextXView() ) ); | 843 | mView->viewManager(), SLOT( showNextXView() ) ); |
843 | 844 | ||
844 | 845 | ||
845 | icon = loadPixmap( pathString + "journal" ); | 846 | icon = loadPixmap( pathString + "journal" ); |
846 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 847 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
847 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 848 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
848 | viewjournal_action->addTo( viewMenu ); | 849 | viewjournal_action->addTo( viewMenu ); |
849 | connect( viewjournal_action, SIGNAL( activated() ), | 850 | connect( viewjournal_action, SIGNAL( activated() ), |
850 | mView->viewManager(), SLOT( showJournalView() ) ); | 851 | mView->viewManager(), SLOT( showJournalView() ) ); |
851 | 852 | ||
852 | 853 | ||
853 | icon = loadPixmap( pathString + "day" ); | 854 | icon = loadPixmap( pathString + "day" ); |
854 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 855 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
@@ -1427,129 +1428,129 @@ void MainWindow::usertrans() | |||
1427 | { | 1428 | { |
1428 | 1429 | ||
1429 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1430 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1430 | } | 1431 | } |
1431 | 1432 | ||
1432 | void MainWindow::storagehowto() | 1433 | void MainWindow::storagehowto() |
1433 | { | 1434 | { |
1434 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); | 1435 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); |
1435 | } | 1436 | } |
1436 | void MainWindow::timetrackinghowto() | 1437 | void MainWindow::timetrackinghowto() |
1437 | { | 1438 | { |
1438 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); | 1439 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); |
1439 | } | 1440 | } |
1440 | void MainWindow::kdesynchowto() | 1441 | void MainWindow::kdesynchowto() |
1441 | { | 1442 | { |
1442 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1443 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1443 | } | 1444 | } |
1444 | void MainWindow::multisynchowto() | 1445 | void MainWindow::multisynchowto() |
1445 | { | 1446 | { |
1446 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1447 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1447 | } | 1448 | } |
1448 | void MainWindow::synchowto() | 1449 | void MainWindow::synchowto() |
1449 | { | 1450 | { |
1450 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1451 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1451 | } | 1452 | } |
1452 | void MainWindow::faq() | 1453 | void MainWindow::faq() |
1453 | { | 1454 | { |
1454 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1455 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1455 | 1456 | ||
1456 | } | 1457 | } |
1457 | void MainWindow::whatsNew() | 1458 | void MainWindow::whatsNew() |
1458 | { | 1459 | { |
1459 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1460 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1460 | 1461 | ||
1461 | } | 1462 | } |
1462 | void MainWindow::licence() | 1463 | void MainWindow::licence() |
1463 | { | 1464 | { |
1464 | KApplication::showLicence(); | 1465 | KApplication::showLicence(); |
1465 | 1466 | ||
1466 | } | 1467 | } |
1467 | void MainWindow::about() | 1468 | void MainWindow::about() |
1468 | { | 1469 | { |
1469 | QString version; | 1470 | QString version; |
1470 | #include <../version> | 1471 | #include <../version> |
1471 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1472 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1472 | i18n("KOrganizer/Platform-independent\n") + | 1473 | i18n("KOrganizer/Platform-independent\n") + |
1473 | "(KO/Pi) " + version + " - " + | 1474 | "(KO/Pi) " + version + " - " + |
1474 | 1475 | ||
1475 | #ifdef DESKTOP_VERSION | 1476 | #ifdef DESKTOP_VERSION |
1476 | i18n("Desktop Edition\n") + | 1477 | i18n("Desktop Edition\n") + |
1477 | #else | 1478 | #else |
1478 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1479 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1479 | #endif | 1480 | #endif |
1480 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); | 1481 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); |
1481 | } | 1482 | } |
1482 | void MainWindow::keyBindings() | 1483 | void MainWindow::keyBindings() |
1483 | { | 1484 | { |
1484 | QString cap = i18n("KO/Pi Keys + Colors"); | 1485 | QString cap = i18n("KO/Pi Keys + Colors"); |
1485 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1486 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1486 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1487 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1487 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1488 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1488 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1489 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1489 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1490 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1490 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1491 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1491 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1492 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ |
1492 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1493 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1493 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1494 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1494 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1495 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1495 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1496 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1496 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1497 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1497 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1498 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1498 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1499 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1499 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1500 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1500 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1501 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1501 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ | 1502 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ |
1502 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1503 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1503 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1504 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1504 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1505 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1505 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1506 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1506 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1507 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1507 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1508 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1508 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1509 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1509 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1510 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1510 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1511 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1511 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1512 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1512 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1513 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1513 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1514 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1514 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1515 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1515 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1516 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1516 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1517 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1517 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1518 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1518 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1519 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1519 | i18n("<p><h3>In list view:</h3></p>\n") + | 1520 | i18n("<p><h3>In list view:</h3></p>\n") + |
1520 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1521 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1521 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1522 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1522 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1523 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1523 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1524 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1524 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1525 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1525 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1526 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1526 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1527 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1527 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1528 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1528 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1529 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1529 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1530 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1530 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1531 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1531 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1532 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1532 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1533 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1533 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1534 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1534 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1535 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1535 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1536 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1536 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1537 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1537 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1538 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1538 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1539 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1539 | displayText( text, cap); | 1540 | displayText( text, cap); |
1540 | } | 1541 | } |
1541 | void MainWindow::aboutAutoSaving() | 1542 | void MainWindow::aboutAutoSaving() |
1542 | { | 1543 | { |
1543 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); | 1544 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); |
1544 | 1545 | ||
1545 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1546 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1546 | 1547 | ||
1547 | } | 1548 | } |
1548 | void MainWindow::aboutKnownBugs() | 1549 | void MainWindow::aboutKnownBugs() |
1549 | { | 1550 | { |
1550 | QMessageBox* msg; | 1551 | QMessageBox* msg; |
1551 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1552 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1552 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1553 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1553 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1554 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1554 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1555 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1555 | i18n("\nor report them in the bugtracker on\n") + | 1556 | i18n("\nor report them in the bugtracker on\n") + |
@@ -1926,132 +1927,132 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1926 | break; | 1927 | break; |
1927 | case Qt::Key_O: | 1928 | case Qt::Key_O: |
1928 | mView->toggleFilerEnabled( ); | 1929 | mView->toggleFilerEnabled( ); |
1929 | break; | 1930 | break; |
1930 | case Qt::Key_0: | 1931 | case Qt::Key_0: |
1931 | case Qt::Key_1: | 1932 | case Qt::Key_1: |
1932 | case Qt::Key_2: | 1933 | case Qt::Key_2: |
1933 | case Qt::Key_3: | 1934 | case Qt::Key_3: |
1934 | case Qt::Key_4: | 1935 | case Qt::Key_4: |
1935 | case Qt::Key_5: | 1936 | case Qt::Key_5: |
1936 | case Qt::Key_6: | 1937 | case Qt::Key_6: |
1937 | case Qt::Key_7: | 1938 | case Qt::Key_7: |
1938 | case Qt::Key_8: | 1939 | case Qt::Key_8: |
1939 | case Qt::Key_9: | 1940 | case Qt::Key_9: |
1940 | pro = e->key()-48; | 1941 | pro = e->key()-48; |
1941 | if ( pro == 0 ) | 1942 | if ( pro == 0 ) |
1942 | pro = 10; | 1943 | pro = 10; |
1943 | if ( e->state() == Qt::ControlButton) | 1944 | if ( e->state() == Qt::ControlButton) |
1944 | pro += 10; | 1945 | pro += 10; |
1945 | break; | 1946 | break; |
1946 | case Qt::Key_M: | 1947 | case Qt::Key_M: |
1947 | mView->viewManager()->showMonthView(); | 1948 | mView->viewManager()->showMonthView(); |
1948 | showSelectedDates = true; | 1949 | showSelectedDates = true; |
1949 | break; | 1950 | break; |
1950 | case Qt::Key_Insert: | 1951 | case Qt::Key_Insert: |
1951 | mView->newEvent(); | 1952 | mView->newEvent(); |
1952 | break; | 1953 | break; |
1953 | case Qt::Key_S : | 1954 | case Qt::Key_S : |
1954 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1955 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1955 | mView->newSubTodo(); | 1956 | mView->newSubTodo(); |
1956 | else | 1957 | else |
1957 | mView->dialogManager()->showSearchDialog(); | 1958 | mView->dialogManager()->showSearchDialog(); |
1958 | break; | 1959 | break; |
1959 | case Qt::Key_Y : | 1960 | case Qt::Key_Y : |
1960 | case Qt::Key_Z : | 1961 | case Qt::Key_Z : |
1961 | mView->viewManager()->showWorkWeekView(); | 1962 | mView->viewManager()->showWorkWeekView(); |
1962 | showSelectedDates = true; | 1963 | showSelectedDates = true; |
1963 | break; | 1964 | break; |
1964 | case Qt::Key_U : | 1965 | case Qt::Key_U : |
1965 | mView->viewManager()->showWeekView(); | 1966 | mView->viewManager()->showWeekView(); |
1966 | showSelectedDates = true; | 1967 | showSelectedDates = true; |
1967 | break; | 1968 | break; |
1968 | case Qt::Key_H : | 1969 | case Qt::Key_H : |
1969 | keyBindings(); | 1970 | keyBindings(); |
1970 | break; | 1971 | break; |
1971 | case Qt::Key_W: | 1972 | case Qt::Key_W: |
1972 | mView->viewManager()->showWhatsNextView(); | 1973 | mView->viewManager()->showWhatsNextView(); |
1973 | break; | 1974 | break; |
1974 | case Qt::Key_L: | 1975 | case Qt::Key_L: |
1975 | mView->viewManager()->showListView(); | 1976 | mView->viewManager()->showListView(); |
1976 | break; | 1977 | break; |
1977 | case Qt::Key_N: | 1978 | case Qt::Key_N: |
1978 | mView->viewManager()->showNextView(); | 1979 | mView->viewManager()->showNextView(); |
1979 | break; | 1980 | break; |
1980 | case Qt::Key_V: | 1981 | case Qt::Key_V: |
1981 | mView->viewManager()->showTodoView(); | 1982 | mView->viewManager()->showTodoView(); |
1982 | break; | 1983 | break; |
1983 | case Qt::Key_C: | 1984 | case Qt::Key_C: |
1984 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1985 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1985 | break; | 1986 | break; |
1986 | case Qt::Key_P: | 1987 | case Qt::Key_P: |
1987 | mView->showDatePicker( ); | 1988 | mView->showDatePicker( ); |
1988 | break; | 1989 | break; |
1989 | case Qt::Key_F: | 1990 | case Qt::Key_F: |
1990 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1991 | mView->editFilters(); |
1991 | mView->editFilters(); | 1992 | break; |
1992 | else | 1993 | case Qt::Key_R: |
1993 | mView->toggleFilter(); | 1994 | mView->toggleFilter(); |
1994 | break; | 1995 | break; |
1995 | case Qt::Key_X: | 1996 | case Qt::Key_X: |
1996 | if ( e->state() == Qt::ControlButton ) | 1997 | if ( e->state() == Qt::ControlButton ) |
1997 | mView->toggleDateNavigatorWidget(); | 1998 | mView->toggleDateNavigatorWidget(); |
1998 | else { | 1999 | else { |
1999 | mView->viewManager()->showNextXView(); | 2000 | mView->viewManager()->showNextXView(); |
2000 | showSelectedDates = true; | 2001 | showSelectedDates = true; |
2001 | } | 2002 | } |
2002 | break; | 2003 | break; |
2003 | case Qt::Key_Space: | 2004 | case Qt::Key_Space: |
2004 | mView->toggleExpand(); | 2005 | mView->toggleExpand(); |
2005 | break; | 2006 | break; |
2006 | case Qt::Key_A: | 2007 | case Qt::Key_A: |
2007 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 2008 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
2008 | mView->showNextAlarms(); | 2009 | mView->showNextAlarms(); |
2009 | else | 2010 | else |
2010 | mView->toggleAllDaySize(); | 2011 | mView->toggleAllDaySize(); |
2011 | break; | 2012 | break; |
2012 | case Qt::Key_T: | 2013 | case Qt::Key_T: |
2013 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2014 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2014 | mView->newTodo(); | 2015 | mView->newTodo(); |
2015 | else { | 2016 | else { |
2016 | mView->goToday(); | 2017 | mView->goToday(); |
2017 | showSelectedDates = true; | 2018 | showSelectedDates = true; |
2018 | } | 2019 | } |
2019 | break; | 2020 | break; |
2020 | case Qt::Key_J: | 2021 | case Qt::Key_J: |
2021 | mView->viewManager()->showJournalView(); | 2022 | mView->viewManager()->showJournalView(); |
2022 | break; | 2023 | break; |
2023 | case Qt::Key_B: | 2024 | case Qt::Key_B: |
2024 | mView->editIncidenceDescription();; | 2025 | mView->editIncidenceDescription();; |
2025 | break; | 2026 | break; |
2026 | // case Qt::Key_Return: | 2027 | // case Qt::Key_Return: |
2027 | case Qt::Key_E: | 2028 | case Qt::Key_E: |
2028 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2029 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2029 | mView->newEvent(); | 2030 | mView->newEvent(); |
2030 | else | 2031 | else |
2031 | mView->editIncidence(); | 2032 | mView->editIncidence(); |
2032 | break; | 2033 | break; |
2033 | case Qt::Key_Plus: | 2034 | case Qt::Key_Plus: |
2034 | size = p->mHourSize +2; | 2035 | size = p->mHourSize +2; |
2035 | if ( size <= 22 ) | 2036 | if ( size <= 22 ) |
2036 | configureAgenda( size ); | 2037 | configureAgenda( size ); |
2037 | break; | 2038 | break; |
2038 | case Qt::Key_Minus: | 2039 | case Qt::Key_Minus: |
2039 | size = p->mHourSize - 2; | 2040 | size = p->mHourSize - 2; |
2040 | if ( size >= 4 ) | 2041 | if ( size >= 4 ) |
2041 | configureAgenda( size ); | 2042 | configureAgenda( size ); |
2042 | break; | 2043 | break; |
2043 | 2044 | ||
2044 | 2045 | ||
2045 | default: | 2046 | default: |
2046 | e->ignore(); | 2047 | e->ignore(); |
2047 | } | 2048 | } |
2048 | if ( pro > 0 ) { | 2049 | if ( pro > 0 ) { |
2049 | mView->selectFilter( pro-1 ); | 2050 | mView->selectFilter( pro-1 ); |
2050 | } | 2051 | } |
2051 | if ( showSelectedDates ) { | 2052 | if ( showSelectedDates ) { |
2052 | ;// setCaptionToDates(); | 2053 | ;// setCaptionToDates(); |
2053 | } | 2054 | } |
2054 | 2055 | ||
2055 | } | 2056 | } |
2056 | void MainWindow::fillFilterMenuTB() | 2057 | void MainWindow::fillFilterMenuTB() |
2057 | { | 2058 | { |