author | zautrix <zautrix> | 2005-08-24 18:38:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-24 18:38:31 (UTC) |
commit | 2cde25d8061acd536bccd698722952ce8555f5db (patch) (side-by-side diff) | |
tree | 70f905e5de57b44c3503883b2f98925d9c92ef8b /korganizer | |
parent | 645ceb7a95dce4716eb87a1b9191d3f3c1657be3 (diff) | |
download | kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.zip kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.gz kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.bz2 |
conflict res fix
-rw-r--r-- | korganizer/calendarview.cpp | 7 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 6 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefs.h | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 13 |
5 files changed, 28 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9928b48..14094bb 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2951,243 +2951,250 @@ void CalendarView::goPreviousMonth() void CalendarView::updateConfig() { if ( KOPrefs::instance()->mUseAppColors ) QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); emit configChanged(); mTodoList->updateConfig(); // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); // To make the "fill window" configurations work //mViewManager->raiseCurrentView(); } void CalendarView::eventChanged(Event *event) { changeEventDisplay(event,KOGlobals::EVENTEDITED); //updateUnmanagedViews(); } void CalendarView::eventAdded(Event *event) { changeEventDisplay(event,KOGlobals::EVENTADDED); } void CalendarView::eventToBeDeleted(Event *) { kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; } void CalendarView::eventDeleted() { changeEventDisplay(0,KOGlobals::EVENTDELETED); } void CalendarView::changeTodoDisplay(Todo *which, int action) { changeIncidenceDisplay((Incidence *)which, action); mDateNavigator->updateView(); //LR //mDialogManager->updateSearchDialog(); if (which) { mViewManager->updateWNview(); //mTodoList->updateView(); } } void CalendarView::changeIncidenceDisplay(Incidence *which, int action) { updateUnmanagedViews(); //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); if ( action == KOGlobals::EVENTDELETED ) { //delete mCalendar->checkAlarmForIncidence( 0, true ); if ( mEventViewerDialog ) mEventViewerDialog->hide(); } else mCalendar->checkAlarmForIncidence( which , false ); } // most of the changeEventDisplays() right now just call the view's // total update mode, but they SHOULD be recoded to be more refresh-efficient. void CalendarView::changeEventDisplay(Event *which, int action) { // kdDebug() << "CalendarView::changeEventDisplay" << endl; changeIncidenceDisplay((Incidence *)which, action); static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { if ( clearallviews ) { clearAllViews(); clearallviews = false; } return; } clearallviews = true; mDateNavigator->updateView(); //mDialogManager->updateSearchDialog(); if (which) { // If there is an event view visible update the display mViewManager->currentView()->changeEventDisplay(which,action); // TODO: check, if update needed // if (which->getTodoStatus()) { mTodoList->updateView(); if ( action != KOGlobals::EVENTDELETED && KOPrefs::instance()->mDetectConflicts ) { mConflictingEvent = which ; int time = 1000; #ifdef DESKTOP_VERSION time = 500; #endif bool checkC = false; if ( mConflictingEvent->doesFloat() ) { checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay || KOPrefs::instance()->mCheckConflictsAllDayNonAD; } else { checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay || KOPrefs::instance()->mCheckConflictsNonADNonAD; } + if ( !KOPrefs::instance()->mIncludeFree && mConflictingEvent->transparency() == KCal::Event::Transparent ) + checkC = false; if ( checkC ) QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); } // } } else { mViewManager->currentView()->updateView(); } } void CalendarView::checkConflictForEvent() { if (!KOPrefs::instance()->mConfirm) return; if ( ! mConflictingEvent ) return; Event * conflictingEvent = mConflictingEvent; mConflictingEvent = 0; QDateTime current = QDateTime::currentDateTime(); if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { return; } CalFilter *filterIN = 0; CalFilter *filterALL = 0; CalFilter *filter = mFilters.first(); while(filter) { if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) filterIN = filter; if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) filterALL = filter; filter = mFilters.next(); } if ( filterIN ) { if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { return; } } QPtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); QDateTime conflict; QDateTime retVal; bool found = false; Event * cE = 0; bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay; bool chNad = KOPrefs::instance()->mCheckConflictsAllDayNonAD; if ( !conflictingEvent->doesFloat() ) { chAD = KOPrefs::instance()->mCheckConflictsNonADAllDay; chNad = KOPrefs::instance()->mCheckConflictsNonADNonAD; } topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); while ( test ) { qApp->processEvents(); bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad ); + + if ( !skip ) { + if ( !KOPrefs::instance()->mIncludeFree && test->transparency() == KCal::Event::Transparent ) + skip = true; + } if ( !skip ) { if ( filterALL ) { if ( !filterALL->filterCalendarItem( test ) ) { skip = true; } } if ( !skip ) { if ( found ) skip = !test->matchTime( ¤t, &conflict ); else skip = !test->matchTime( ¤t, 0 ); if ( !skip ) { if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { if ( ! found ) { conflict = retVal; cE = test; } else { if ( retVal < conflict ) { conflict = retVal; cE = test; } } found = true; } } } } test = testlist.next(); } topLevelWidget()->setCaption( i18n("KO/Pi") ); if ( found ) { QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; qApp->processEvents(); int km = KMessageBox::warningContinueCancel(this,mess, i18n("KO/Pi Conflict detected"),i18n("Show date"),i18n("No problem!")); if ( km != KMessageBox::Continue ) { return; } if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) mViewManager->showDayView(); mNavigator->slotDaySelect( conflict.date() ); int hour = conflict.time().hour(); mViewManager->agendaView()->setStartHour( hour ); topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); } else topLevelWidget()->setCaption( i18n("No conflict found") ); return; } void CalendarView::updateTodoViews() { mTodoList->updateView(); mViewManager->currentView()->updateView(); } void CalendarView::clearAllViews() { mTodoList->clearList(); mViewManager->clearAllViews(); SearchDialog * sd = mDialogManager->getSearchDialog(); if ( sd ) { KOListView* kol = sd->listview(); if ( kol ) kol->clearList(); } } void CalendarView::updateView() { static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { if ( clearallviews ) { clearAllViews(); clearallviews = false; } return; } clearallviews = true; DateList tmpList = mNavigator->selectedDates(); if ( KOPrefs::instance()->mHideNonStartedTodos ) mTodoList->updateView(); // We assume that the navigator only selects consecutive days. updateView( tmpList.first(), tmpList.last() ); } void CalendarView::updateUnmanagedViews() { mDateNavigator->updateDayMatrix(); } int CalendarView::msgItemDelete(const QString name) { diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 057df0d..7076e05 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -365,192 +365,195 @@ void KODayMatrix::recalculateToday() { today = -1; for (int i=0; i<NUMDAYS; i++) { //events[i] = 0; days[i] = startdate.addDays(i); daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); // if today is in the currently displayed month, hilight today if (days[i].year() == QDate::currentDate().year() && days[i].month() == QDate::currentDate().month() && days[i].day() == QDate::currentDate().day()) { today = i; } } // qDebug(QString("Today is visible at %1.").arg(today)); } void KODayMatrix::updateView() { updateView(startdate); } void KODayMatrix::repaintViewTimed() { mRedrawNeeded = true; // bDays.fill( false); //pDays.fill( false); //hDays.fill( false); //eDays.fill( false); mRepaintTimer->stop(); int startDay = days[0].dayOfWeek(); // 1...7 7 = sunday int i; for(i = 0; i < NUMDAYS; i++) { if ( ( (i+startDay) % 7 == 0 ) ) { pDays.setBit(i); } } repaint(false); } void KODayMatrix::computeEvent(Event *event, int i ) { QString holiStr = mHolidays[i]; if ( event->isHoliday()) { pDays.setBit(i); hDays.setBit(i); if ( !holiStr.isEmpty() ) holiStr += "\n"; holiStr += event->summary(); if ( !event->location().isEmpty() ) holiStr += " (" + event->location() + ")"; mHolidays[i] =holiStr ; eDays.setBit(i); } if ( KOPrefs::instance()->mCurrentDisplayedView != VIEW_T_VIEW && KOPrefs::instance()->mCurrentDisplayedView != VIEW_J_VIEW ) { if ( event->isBirthday()) { pDays.setBit(i); if ( !holiStr.isEmpty() ) holiStr += "\n"; holiStr += i18n("Birthday") + ": "+event->summary(); if ( !event->location().isEmpty() ) holiStr += " (" + event->location() + ")"; bDays.setBit(i); mHolidays[i] =holiStr ; } } if ( KOPrefs::instance()->mCurrentDisplayedView != VIEW_J_VIEW ) eDays.setBit(i); } void KODayMatrix::updateViewTimed() { mUpdateTimer->stop(); if ( !mCalendar ) { qDebug("NOT CAL "); return; } #if 1 int i; int timeSpan = NUMDAYS-1; QPtrList<Event> events = mCalendar->events(); Event *event; QDateTime dt; bool ok; bDays.fill( false); pDays.fill( false); hDays.fill( false); eDays.fill( false); mHolidays.clear(); QDate mStartDate = days[0]; QDate endDate = mStartDate.addDays( timeSpan ); for( event = events.first(); event; event = events.next() ) { // for event ushort recurType = event->doesRecur(); if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { continue; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + continue; + } if ( event->doesRecur() ) { bool last; QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); QDateTime incidenceEnd; int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); bool invalid = false; while( true ) { if ( incidenceStart.isValid() ) { incidenceEnd = incidenceStart.addDays( eventlen ); int st = incidenceStart.date().daysTo( endDate ); if ( st >= 0 ) { // start before timeend int end = mStartDate.daysTo( incidenceEnd.date() ); if ( end >= 0 ) { // end after timestart --- got one! //normalize st = timeSpan - st; if ( st < 0 ) st = 0; if ( end > timeSpan ) end = timeSpan; int iii; //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); for ( iii = st;iii<= end;++iii) { computeEvent( event, iii ); } } } } else { if ( invalid ) break; invalid = true; //qDebug("invalid %s", event->summary().latin1()); incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; } if ( last ) break; bool ok; incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); if ( ! ok ) break; if ( incidenceStart.date() > endDate ) break; } } else { // no recur int st = event->dtStart().date().daysTo( endDate ); if ( st >= 0 ) { // start before timeend int end = mStartDate.daysTo( event->dtEnd().date() ); if ( end >= 0 ) { // end after timestart --- got one! //normalize st = timeSpan - st; if ( st < 0 ) st = 0; if ( end > timeSpan ) end = timeSpan; int iii; for ( iii = st;iii<= end;++iii) computeEvent( event, iii ); } } } } int startDay = days[0].dayOfWeek(); // 1...7 7 = sunday for(i = 0; i < NUMDAYS; i++) { if ( ( (i+startDay) % 7 == 0 ) ) { pDays.setBit(i); } } if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { bDays.fill( false); // insert due todos QPtrList<Todo> todos = mCalendar->todos( ); Todo *todo; for(todo = todos.first(); todo; todo = todos.next()) { //insertTodo( todo ); if ( todo->hasDueDate() ) { int day = mStartDate.daysTo( todo->dtDue().date() ); if ( day >= 0 && day < timeSpan + 1) { int i = day; QString holiStr = mHolidays[i]; pDays.setBit(i); if ( !holiStr.isEmpty() ) holiStr += "\n"; holiStr += i18n("Todo") + ": "+todo->summary(); if ( !todo->location().isEmpty() ) holiStr += " (" + todo->location() + ")"; bDays.setBit(i); mHolidays[i] =holiStr ; eDays.setBit(i); } } } } if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { bDays.fill( false); // insert due todos QPtrList<Journal> todos = mCalendar->journals( ); Journal *todo; for(todo = todos.first(); todo; todo = todos.next()) { int day = mStartDate.daysTo( todo->dtStart().date() ); if ( day >= 0 && day < timeSpan + 1) { int i = day; @@ -591,192 +594,195 @@ void KODayMatrix::updateViewTimed() holiStr += "\n"; holiStr += event->summary(); if ( !event->location().isEmpty() ) holiStr += " (" + event->location() + ")"; } if ( event->isBirthday()) { if ( !holiStr.isEmpty() ) holiStr += "\n"; holiStr += i18n("Birthday") + ": "+event->summary(); if ( !event->location().isEmpty() ) holiStr += " (" + event->location() + ")"; bDays.setBit(i); } } if ( numEvents ) eDays.setBit(i); //if it is a holy day then draw it red. Sundays are consider holidays, too if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) || !holiStr.isEmpty()) { mHolidays[i] = holiStr; } else { mHolidays[i] = QString::null; } } #endif mRedrawNeeded = true; if ( ! mPendingUpdateBeforeRepaint ) repaint(false); } void KODayMatrix::updateView(QDate actdate) { if ( mLastView != KOPrefs::instance()->mCurrentDisplayedView ) mRedrawNeeded = true; mLastView = KOPrefs::instance()->mCurrentDisplayedView; if ( ! actdate.isValid() ) { //qDebug("date not valid "); return; } mDayChanged = false; //flag to indicate if the starting day of the matrix has changed by this call //mDayChanged = false; // if a new startdate is to be set then apply Cornelius's calculation // of the first day to be shown if (actdate != startdate) { // reset index of selection according to shift of starting date from startdate to actdate if (mSelStart != NOSELECTION) { int tmp = actdate.daysTo(startdate); //kdDebug() << "Shift of Selection1: " << mSelStart << " - " << mSelEnd << " -> " << tmp << "(" << offset << ")" << endl; // shift selection if new one would be visible at least partly ! if (mSelStart+tmp < NUMDAYS && mSelEnd+tmp >= 0) { // nested if is required for next X display pushed from a different month - correction required // otherwise, for month forward and backward, it must be avoided if( mSelStart > NUMDAYS || mSelStart < 0 ) mSelStart = mSelStart + tmp; if( mSelEnd > NUMDAYS || mSelEnd < 0 ) mSelEnd = mSelEnd + tmp; } } startdate = actdate; mDayChanged = true; recalculateToday(); mRedrawNeeded = true; } //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); if ( !isVisible() ) { mPendingUpdateBeforeRepaint = true; } else { #ifdef DESKTOP_VERSION //mRepaintTimer->start( 100 ); //updateViewTimed(); mUpdateTimer->start( 50 ); #else mRepaintTimer->start( 350 ); mUpdateTimer->start( 800 ); #endif } } void KODayMatrix::updateEvents() { if ( !mCalendar ) return; for( int i = 0; i < NUMDAYS; i++ ) { // if events are set for the day then remember to draw it bold QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); int numEvents = eventlist.count(); Event *event; for( event = eventlist.first(); event != 0;event=eventlist.next()) { ushort recurType = event->doesRecur(); if ( ( recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur ) || ( recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur ) ) { numEvents--; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + numEvents--; + } } if ( numEvents ) eDays.setBit(i); else eDays.clearBit(i); } } const QDate& KODayMatrix::getDate(int offset) { if (offset < 0 || offset > NUMDAYS-1) { qDebug("Wrong offset2 %d", offset); return days[0]; } return days[offset]; } QString KODayMatrix::getHolidayLabel(int offset) { if (offset < 0 || offset > NUMDAYS-1) { qDebug("Wrong offset1 %d", offset); return QString(); } return mHolidays[offset]; } int KODayMatrix::getDayIndexFrom(int x, int y) { int colModulo = (width()-2) % 7; int rowModulo = (height()-2) % 6; #if 0 return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? 6 - x/daysize.width() : x/daysize.width()); #endif int xVal = (x-colModulo/2-2)/daysize.width(); int yVal = (y-rowModulo/2-2)/daysize.height(); return 7*(yVal) + xVal; } // ---------------------------------------------------------------------------- // M O U S E E V E N T H A N D L I N G // ---------------------------------------------------------------------------- void KODayMatrix::mousePressEvent (QMouseEvent* e) { if ( e->button() == LeftButton ) mouseDown = true; mSelStart = getDayIndexFrom(e->x(), e->y()); if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; mSelInit = mSelStart; mSelEnd = mSelStart; mRedrawNeeded = true; repaint(false); } void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) { mRedrawNeeded = true; if ( e->button() == LeftButton ) if ( ! mouseDown ) { return; } else mouseDown = false; int tmp = getDayIndexFrom(e->x(), e->y()); if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; if (mSelInit > tmp) { mSelEnd = mSelInit; if (tmp != mSelStart) { mSelStart = tmp; repaint(false); } } else { mSelStart = mSelInit; //repaint only if selection has changed if (tmp != mSelEnd) { mSelEnd = tmp; repaint(false); } } DateList daylist; if ( mSelStart < 0 ) mSelStart = 0; for (int i = mSelStart; i <= mSelEnd; i++) { daylist.append(days[i]); } emit selected((const DateList)daylist); } diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 571ca11..1b0e5f4 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -139,204 +139,206 @@ KOPrefs::KOPrefs() : addItemBool("Enable Project View",&mEnableProjectView,false); addItemBool("Auto Save",&mAutoSave,false); addItemInt("Auto Save Interval",&mAutoSaveInterval,3); addItemBool("Confirm Deletes",&mConfirm,true); addItemString("Archive File",&mArchiveFile); addItemString("Html Export File",&mHtmlExportFile, QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); addItemBool("Html With Save",&mHtmlWithSave,false); KPrefs::setCurrentGroup("Personal Settings"); addItemInt("Mail Client",&mMailClient,MailClientKMail); addItemBool("Use Control Center Email",&mEmailControlCenter,false); addItemBool("Bcc",&mBcc,false); KPrefs::setCurrentGroup("Time & Date"); addItemInt("Default Start Time",&mStartTime,10); addItemInt("Default Duration",&mDefaultDuration,2); addItemInt("Default Alarm Time",&mAlarmTime,3); KPrefs::setCurrentGroup("AlarmSettings"); addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); KPrefs::setCurrentGroup("Calendar"); addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); KPrefs::setCurrentGroup("Fonts"); // qDebug(" KPrefs::setCurrentGroup(Fonts); "); QFont fon = KGlobalSettings::generalFont(); addItemFont("TimeBar Font",&mTimeBarFont,fon ); addItemFont("MonthView Font",&mMonthViewFont,fon); addItemFont("AgendaView Font",&mAgendaViewFont,fon); addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); addItemFont("TodoView Font",&mTodoViewFont,fon); addItemFont("ListView Font",&mListViewFont,fon); addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); addItemFont("EditBox Font",&mEditBoxFont,fon); addItemFont("JournalView Font",&mJornalViewFont,fon); addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); addItemFont("EventView Font",&mEventViewFont,fon); KPrefs::setCurrentGroup("RemoteSyncing"); addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); addItemBool("ShowSyncEvents",&mShowSyncEvents,false); addItemInt("LastSyncTime",&mLastSyncTime,0); #ifdef _WIN32_ QString hdp= locateLocal("data","korganizer")+"\\\\"; #else QString hdp= locateLocal("data","korganizer")+"/"; #endif KPrefs::setCurrentGroup("LoadSaveFileNames"); addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); KPrefs::setCurrentGroup("Locale"); addItemBool("ShortDateInViewer",&mShortDateInViewer,false); KPrefs::setCurrentGroup("Colors"); addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); addItemBool("MonthViewWeek",&mMonthViewWeek,false); addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); addItemBool("UseAppColors",&mUseAppColors,false); KPrefs::setCurrentGroup("Conflicts"); addItemBool("EnableAutoDetect",&mDetectConflicts,true); + addItemBool("CheckConflictsFree",&mIncludeFree,true); addItemBool("CheckConflictsAllDayAllDay",&mCheckConflictsAllDayAllDay,false); addItemBool("CheckConflictsAllDayNonAD",&mCheckConflictsAllDayNonAD,false); addItemBool("CheckConflictsNonADAllDay",&mCheckConflictsNonADAllDay,false); addItemBool("CheckConflictsNonADNonAD",&mCheckConflictsNonADNonAD,true); addItemString("FilterConflictEditItem", &mFilterConflictEditItem ,"nofilter" ); addItemString("FilterConflictAllItem", &mFilterConflictAllItem ,"nofilter" ); KPrefs::setCurrentGroup("Views"); addItemBool("Block Popup Menu",&mBlockPopupMenu,false); addItemBool("Show Date Navigator",&mShowDateNavigator,true); addItemInt("Hour Size",&mHourSize,8); addItemBool("Show Daily Recurrences",&mDailyRecur,true); + addItemBool("ShowLongAllday",&mLongAllday,true); addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); addItemBool("ShowShortMonthName",&mMonthShowShort,false); addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); #ifdef DESKTOP_VERION addItemBool("Enable ToolTips",&mEnableToolTips,true); #else addItemBool("Enable ToolTips",&mEnableToolTips,false); #endif addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); addItemBool("MonthViewWeekRowlayout",&mMonthViewWeekRowlayout,false); addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); #ifdef DESKTOP_VERSION addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); #else addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); #endif addItemInt("Day Begins",&mDayBegins,7); addItemInt("Working Hours Start",&mWorkingHoursStart,8); addItemInt("Working Hours End",&mWorkingHoursEnd,17); addItemBool("Exclude Holidays",&mExcludeHolidays,true); addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); addItemBool("Full View Month",&mFullViewMonth,true); addItemBool("Full View Todo",&mFullViewTodo,true); addItemBool("Quick Todo",&mEnableQuickTodo,false); addItemInt("Next X Days",&mNextXDays,3); KPrefs::setCurrentGroup("Printer"); KPrefs::setCurrentGroup("Layout"); addItemBool("CompactDialogs",&mCompactDialogs,false); addItemBool("VerticalScreen",&mVerticalScreen,true); KPrefs::setCurrentGroup("KOrganizer Plugins"); addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); KPrefs::setCurrentGroup("Group Scheduling"); addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); addItemStringList("AdditionalMails",&mAdditionalMails,""); addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); KPrefs::setCurrentGroup( "Editors" ); addItemStringList( "EventTemplates", &mEventTemplates ); addItemStringList( "TodoTemplates", &mTodoTemplates ); addItemInt("DestinationPolicy",&mDestination,standardDestination); KPrefs::setCurrentGroup( "ViewOptions" ); addItemBool("EVshowDetails",&mEVshowDetails,true); addItemBool("EVshowCreated",&mEVshowCreated,true); addItemBool("EVshowChanged",&mEVshowChanged,true); addItemBool("WTshowDetails",&mWTshowDetails,false); addItemBool("WTshowCreated",&mWTshowCreated,false); addItemBool("WTshowChanged",&mWTshowChanged,false); mCalendars.setAutoDelete( true ); } KOPrefs::~KOPrefs() { if (mInstance == this) mInstance = insd.setObject(0); mCalendars.setAutoDelete( true ); mCalendars.clear(); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 576edf9..bac8010 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -101,274 +101,276 @@ class KOPrefs : public KPimPrefs void setAllDefaults(); KopiCalendarFile * getNewCalendar(); KopiCalendarFile * getCalendar( int ); void deleteCalendar( int ); QColor defaultColor( int ) const; QString calName( int ) const; int getCalendarID( const QString & name ); protected: void setTimeZoneIdDefault(); /** Fill empty mail fields with default values. */ void fillMailDefaults(); private: /** Constructor disabled for public. Use instance() to create a KOPrefs object. */ KOPrefs(); static KOPrefs *mInstance; QStringList getDefaultList(); QStringList getLocationDefaultList(); public: // preferences data KConfig* getConfig(); void setFullName(const QString &); QString fullName(); void setEmail(const QString &); QString email(); QString mAdditional; bool mEmailControlCenter; bool mBcc; bool mAutoSave; int mAutoSaveInterval; bool mConfirm; bool mEnableGroupScheduling; bool mEnableProjectView; int mDefaultFormat; int mMailClient; int mStartTime; int mDefaultDuration; int mAlarmTime; int mWorkingHoursStart; int mWorkingHoursEnd; bool mExcludeHolidays; bool mExcludeSaturdays; bool mMarcusBainsShowSeconds; QFont mTimeBarFont; QFont mMonthViewFont; QFont mAgendaViewFont; QFont mMarcusBainsFont; QFont mTimeLabelsFont; QFont mTodoViewFont; QFont mListViewFont; QFont mDateNavigatorFont; QFont mEditBoxFont; QFont mJornalViewFont; QFont mWhatsNextFont; QFont mEventViewFont; QColor mHolidayColor; QColor mHighlightColor; QColor mEventColor; QColor mTodoDoneColor; QColor mAgendaBgColor; QColor mWorkingHoursColor; QColor mTodoDueTodayColor; QColor mTodoOverdueColor; QColor mTodoRunColor; QColor mMonthViewEvenColor; QColor mMonthViewOddColor; QColor mMonthViewHolidayColor; bool mMonthViewUsesDayColors; bool mMonthViewSatSunTog; bool mMonthViewWeek; bool mMonthViewWeekRowlayout; QColor mAppColor1; QColor mAppColor2; bool mUseAppColors; int mDayBegins; int mHourSize; int mAllDaySize; bool mShowFullMenu; bool mDailyRecur; bool mWeeklyRecur; + bool mLongAllday; bool mMonthDailyRecur; bool mMonthWeeklyRecur; bool mMonthShowIcons; bool mMonthShowTimes; bool mMonthShowShort; bool mEnableToolTips; bool mEnableMonthScroll; bool mFullViewMonth; bool mMonthViewUsesCategoryColor; bool mFullViewTodo; bool mShowCompletedTodo; bool mMarcusBainsEnabled; int mNextXDays; int mWhatsNextDays; bool mWhatsNextTime2Lines; int mWhatsNextPrios; bool mEnableQuickTodo; bool mCompactDialogs; bool mVerticalScreen; bool mShowIconNewTodo; bool mShowIconNewEvent; bool mShowIconSearch; bool mShowIconList; bool mShowIconDay1; bool mShowIconDay5; bool mShowIconDay6; bool mShowIconDay7; bool mShowIconMonth; bool mShowIconTodoview; bool mShowIconBackFast; bool mShowIconBack; bool mShowIconToday; bool mShowIconForward; bool mShowIconForwardFast; bool mShowIconWhatsThis; bool mShowIconWeekNum; bool mShowIconNextDays; bool mShowIconNext; bool mShowIconJournal; bool mShowIconFilter; bool mShowIconOnetoolbar; bool mShowIconNavigator; bool mShowIconAllday; bool mShowIconFilterview; bool mShowIconToggleFull; bool mShowIconStretch; bool mToolBarHor; bool mToolBarUp; bool mToolBarHorV; bool mToolBarUpV; bool mToolBarHorN; bool mToolBarUpN; bool mToolBarHorF; bool mToolBarUpF; bool mToolBarMiniIcons; bool mAskForQuit; bool mUsePassWd; bool mShowSyncEvents; bool mShowTodoInAgenda; bool mShowCompletedTodoInAgenda; bool mShowTimeInAgenda; bool mHideNonStartedTodos; bool mBlockPopupMenu; int mLastSyncTime; void setCategoryColor(QString cat,const QColor & color); QColor *categoryColor(QString cat); QString mArchiveFile; QString mHtmlExportFile; bool mHtmlWithSave; QStringList mSelectedPlugins; QString mLastImportFile; QString mLastVcalFile; QString mLastSaveFile; QString mLastLoadFile; QString mDefaultAlarmFile; int mIMIPScheduler; int mIMIPSend; QStringList mAdditionalMails; int mIMIPAutoRefresh; int mIMIPAutoInsertReply; int mIMIPAutoInsertRequest; int mIMIPAutoFreeBusy; int mIMIPAutoFreeBusyReply; QStringList mTodoTemplates; QStringList mEventTemplates; int mDestination; bool mEditOnDoubleClick; bool mViewChangeHoldFullscreen; bool mViewChangeHoldNonFullscreen; bool mCenterOnCurrentTime; bool mSetTimeToDayStartAt; bool mHighlightCurrentDay; bool mUseHighlightLightColor; bool mListViewMonthTimespan; bool mWNViewShowsParents; bool mWNViewShowsPast; bool mWNViewShowLocation; bool mTodoViewShowsPercentage; bool mTodoViewUsesCatColors; bool mMonthViewUsesBigFont; bool mTodoViewUsesSmallFont; bool mTodoViewUsesForegroundColor; bool mMonthViewUsesForegroundColor; bool mHightlightDateTimeEdit; bool mShortDateInViewer; bool mShowDateNavigator; QStringList mLocationDefaults; QStringList mEventSummaryUser; QStringList mTodoSummaryUser; QStringList mJournalSummaryUser; bool mUseInternalAlarmNotification; int mAlarmPlayBeeps; int mAlarmSuspendTime; int mAlarmSuspendCount; int mAlarmBeepInterval; int mOldLanguage; int mOldLoadedLanguage; QString mActiveSyncPort; QString mActiveSyncIP; // settings for eventviewer bool mEVshowDetails; bool mEVshowCreated; bool mEVshowChanged; bool mWTshowDetails; bool mWTshowCreated; bool mWTshowChanged; int mCurrentDisplayedView; QPtrList<KopiCalendarFile> mCalendars; int mNextAvailableCalendar; bool mGlobalUpdateDisabled; bool mDetectConflicts; + bool mIncludeFree; bool mCheckConflictsAllDayAllDay; bool mCheckConflictsAllDayNonAD; bool mCheckConflictsNonADAllDay; bool mCheckConflictsNonADNonAD; QString mFilterConflictEditItem; QString mFilterConflictAllItem; private: QDict<QColor> mCategoryColors; QArray<KopiCalendarFile*> mDefCalColors; QColor mDefaultCategoryColor; QFont mDefaultTimeBarFont; QFont mDefaultViewFont; QFont mDefaultMonthViewFont; QString mName; QString mEmail; }; #endif diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index bbdf508..f1a6c3d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -485,192 +485,197 @@ void KOPrefsDialog::setupViewsTab() QFrame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,6,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); // QBoxLayout *dayBeginsLayout = new QHBoxLayout; // topLayout->addLayout(dayBeginsLayout,0,0); // KPrefsDialogWidTime *dayBegins = // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), // topFrame); // dayBeginsLayout->addWidget(dayBegins->label()); // dayBeginsLayout->addStretch(1); // dayBeginsLayout->addWidget(dayBegins->spinBox()); // QBoxLayout *nextDaysLayout = new QHBoxLayout; // topLayout->addLayout(nextDaysLayout,1,0); // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); // nextDaysLayout->addStretch(1); // nextDaysLayout->addWidget(mNextXDaysSpin); int ii = 0; KPrefsDialogWidBool *dummy = addWidBool(i18n("Edit item on doubleclick (if not, show)"), &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); // topLayout->addWidget(hourSizeGroup,ii++,0); // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); //topLayout->setRowStretch(11,1); #if 0 topFrame = addPage(i18n("ViewChange"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,6,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; #endif dummy = addWidBool(i18n("Hold fullscreen on view change"), &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Hold non-fullscreen on view change"), &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); KPrefsDialogWidBool *fullViewMonth = addWidBool(i18n("Next days view uses full window"), &(KOPrefs::instance()->mFullViewMonth),topFrame); topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); KPrefsDialogWidBool *fullViewTodo = addWidBool(i18n("Event list view uses full window"), &(KOPrefs::instance()->mFullViewTodo),topFrame); topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); dummy = addWidBool(i18n("Listview uses monthly timespan"), &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Highlight selection in Time Edit"), &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); topLayout->addWidget( dummy->checkBox(), ii++,0); KPrefsDialogWidBool *dailyRecur = addWidBool(i18n("Show events that recur daily in date nav."), &(KOPrefs::instance()->mDailyRecur),topFrame); topLayout->addWidget(dailyRecur->checkBox(),ii++,0); KPrefsDialogWidBool *weeklyRecur = addWidBool(i18n("Show ev. that recur weekly in date nav."), &(KOPrefs::instance()->mWeeklyRecur),topFrame); topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + weeklyRecur = + addWidBool(i18n("Show multiday allday ev. in date nav."), + &(KOPrefs::instance()->mLongAllday),topFrame); + topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + #ifdef DESKTOP_VERSION KPrefsDialogWidBool *enableToolTips = addWidBool(i18n("Enable tooltips displaying summary of ev."), &(KOPrefs::instance()->mEnableToolTips),topFrame); topLayout->addWidget(enableToolTips->checkBox(),ii++,0); #endif // ********************************************************* topFrame = addPage(i18n("Agenda View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Show time in agenda items"), &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Highlight current day in agenda"), &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Use light color for highlight current day"), &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); KPrefsDialogWidBool *marcusBainsEnabled = addWidBool(i18n("Show current time"), &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); dummy = addWidBool(i18n("Set agenda to DayBeginsAt on change"), &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Set agenda to current time on change"), &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Allday Agenda view shows todos"), &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Agenda view shows completed todos"), &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("Month View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; QLabel *lab; QHBox *habo = new QHBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); ii++; } else { new QLabel ( i18n("Show events that recur "), habo ); } dailyRecur = addWidBool(i18n("daily"), &(KOPrefs::instance()->mMonthDailyRecur),habo); // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); weeklyRecur = addWidBool(i18n("weekly"), &(KOPrefs::instance()->mMonthWeeklyRecur),habo); topLayout->addMultiCellWidget(habo,ii, ii,0,1); ii++; habo = new QHBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { @@ -842,197 +847,201 @@ dummy = dummy = addWidBool(i18n("Todo view uses category colors"), &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); QWidget* wid = new QWidget( topFrame ); // Todo run today color KPrefsDialogWidColor *todoRunColor = addWidColor(i18n("Color for running todos:"), &(KOPrefs::instance()->mTodoRunColor),wid); QHBoxLayout *widLayout = new QHBoxLayout(wid); widLayout->addWidget( todoRunColor->label() ); widLayout->addWidget( todoRunColor->button() ); topLayout->addWidget(wid,ii++,0); wid = new QWidget( topFrame ); // Todo due today color KPrefsDialogWidColor *todoDueTodayColor = addWidColor(i18n("Todo due today color:"), &(KOPrefs::instance()->mTodoDueTodayColor),wid); widLayout = new QHBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); widLayout->addWidget( todoDueTodayColor->button() ); topLayout->addWidget(wid,ii++,0); //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); // Todo overdue color wid = new QWidget( topFrame ); widLayout = new QHBoxLayout(wid); KPrefsDialogWidColor *todoOverdueColor = addWidColor(i18n("Todo overdue color:"), &(KOPrefs::instance()->mTodoOverdueColor),wid); widLayout->addWidget(todoOverdueColor->label()); widLayout->addWidget(todoOverdueColor->button()); topLayout->addWidget(wid,ii++,0); dummy = addWidBool(i18n("Colors are applied to text"), &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("View Options"),0,0); topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Show Sync Events"), &(KOPrefs::instance()->mShowSyncEvents),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); topLayout->addWidget(lab ,ii++,0); dummy = addWidBool(i18n("Details"), &(KOPrefs::instance()->mEVshowDetails),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Created time"), &(KOPrefs::instance()->mEVshowCreated),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Last modified time"), &(KOPrefs::instance()->mEVshowChanged),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); topLayout->addWidget(lab ,ii++,0); dummy = addWidBool(i18n("Details"), &(KOPrefs::instance()->mWTshowDetails),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Created time"), &(KOPrefs::instance()->mWTshowCreated),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Last modified time"), &(KOPrefs::instance()->mWTshowChanged),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("Conflict detection"),0,0); topLayout = new QGridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Enable conflict detection"), &(KOPrefs::instance()->mDetectConflicts),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); topFrame = new QFrame( topFrame ); topLayout->addWidget(topFrame ,ii++,0); topLayout = new QGridLayout(topFrame,4,1); connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); - topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:"), topFrame ) , ii++,0); + dummy = addWidBool(i18n("Include events which \"show as free\""), + &(KOPrefs::instance()->mIncludeFree),topFrame); + topLayout->addWidget(dummy->checkBox(), ii++,0); + topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping."), topFrame ) , ii++,0); + topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0); mFilterEditItem = new QComboBox( topFrame ); topLayout->addWidget(mFilterEditItem,ii++,0); - topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0); + topLayout->addWidget( new QLabel ( i18n("Filter for other events"), topFrame ) , ii++,0); mFilterAllItem = new QComboBox( topFrame ); topLayout->addWidget(mFilterAllItem,ii++,0); dummy = addWidBool(i18n("Check Allday with Allday"), &(KOPrefs::instance()->mCheckConflictsAllDayAllDay),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); dummy = addWidBool(i18n("Check Allday with NonAllday"), &(KOPrefs::instance()->mCheckConflictsAllDayNonAD),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); dummy = addWidBool(i18n("Check NonAllday with Allday"), &(KOPrefs::instance()->mCheckConflictsNonADAllDay),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); dummy = addWidBool(i18n("Check NonAllday with NonAllday"), &(KOPrefs::instance()->mCheckConflictsNonADNonAD),topFrame); topLayout->addWidget(dummy->checkBox(), ii++,0); topFrame = addPage(i18n("Alarm"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); int iii = 0; dummy = addWidBool(i18n("Use internal alarm notification"), &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); topLayout->addWidget(dummy->checkBox(),iii++,0); if ( QApplication::desktop()->height() > 240 ) { lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); topLayout->addWidget(lab ,iii++,0); } #ifndef DESKTOP_VERSION lab->setAlignment( AlignLeft|WordBreak|AlignTop); #else lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); #endif QHBox* dummyBox = new QHBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); QHBox* hbo = new QHBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); QPixmap icon; if ( QApplication::desktop()->width() < 321 ) icon = SmallIcon("fileimport16"); else icon = SmallIcon("fileimport"); loadTemplate->setIconSet (icon ) ; connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); int size = loadTemplate->sizeHint().height(); loadTemplate->setFixedSize( size, size ); //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); // topLayout->addWidget(lab ,iii++,0); lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); topLayout->addWidget(lab ,iii++,0); topLayout->addWidget(hbo,iii++,0); // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); // topLayout->addWidget(lab ,iii++,0); // #ifndef DESKTOP_VERSION // lab->setAlignment( AlignLeft|WordBreak|AlignTop); // #else // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); // #endif } |