author | zautrix <zautrix> | 2005-07-07 22:22:20 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-07 22:22:20 (UTC) |
commit | 876816e6582299d527610e847d259d2be6de403c (patch) (side-by-side diff) | |
tree | 6683baf2835672d0d9b28b3cbbf90e84c398b835 | |
parent | 3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc (diff) | |
download | kdepimpi-876816e6582299d527610e847d259d2be6de403c.zip kdepimpi-876816e6582299d527610e847d259d2be6de403c.tar.gz kdepimpi-876816e6582299d527610e847d259d2be6de403c.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 64 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 4 | ||||
-rw-r--r-- | korganizer/koagenda.h | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 5 |
5 files changed, 17 insertions, 61 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 814c541..aa4a89a 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -5,8 +5,8 @@ Info about the changes in new versions of KDE-Pim/Pi Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. Added a button to add a subtodo quickly. -Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q" ). - +Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). +Added an option to change the layout of the list week to column mode. ********** VERSION 2.1.13 ************ diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 426e8f9..2582931 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -104,6 +104,7 @@ #include "koglobals.h" #include "koviewmanager.h" #include "koagendaview.h" +#include "koagenda.h" #include "kodialogmanager.h" #include "outgoingdialog.h" #include "incomingdialog.h" @@ -663,7 +664,11 @@ void CalendarView::nextConflict( bool all, bool allday ) test->setTagged( false ); test = testlist.next(); } - QDateTime startDT = QDateTime (mNavigator->selectedDates().first().addDays(1), QTime ( 0,0,0)); + QTime st ( 0,0,0); + if ( mViewManager->currentView() == mViewManager->agendaView() ) + st = mViewManager->agendaView()->agenda()->getEndTime(); + //qDebug("time %s ", st.toString().latin1()); + QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); QDateTime conflict; QDateTime retVal; bool found = false; @@ -720,63 +725,6 @@ void CalendarView::nextConflict( bool all, bool allday ) topLevelWidget()->setCaption( i18n("No conflict found") ); qDebug("No conflict found "); return; - - - - - -#if 0 - - - QDate end = start.addDays( 365*2); - while ( start < end ) { - QPtrList<Event> eventList = calendar()->events( start ); - Event * ev = eventList.first(); - QPtrList<Event> test = eventList; - while ( ev ) { - //qDebug("found %d on %s ", eventList.count(), start.toString().latin1()); - Event * t_ev = test.first(); - QDateTime es = ev->dtStart(); - QDateTime ee = ev->dtEnd(); - if ( ev->doesFloat() ) - ee = ee.addDays( 1 ); - if ( ! all ) { - if ( ev->doesFloat() != allday ) - t_ev = 0; - } - while ( t_ev ) { - bool skip = false; - if ( ! all ) { - if ( t_ev->doesFloat() != allday ) - skip = true; - } - if ( !skip && ev != t_ev ) { - QDateTime ets = t_ev->dtStart(); - QDateTime ete = t_ev->dtEnd(); - if ( t_ev->doesFloat() ) - ete = ete.addDays( 1 ); - //qDebug("test %s -- %s -------- %s -- %s ", es.toString().latin1() , ee.toString().latin1(), ets.toString().latin1() , ete.toString().latin1() ); - if ( es < ete && ets < ee ) { - if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) - mViewManager->showDayView(); - mNavigator->slotDaySelect( start ); - int hour = es.time().hour(); - if ( ets > es ) - hour = ets.time().hour(); - mViewManager->agendaView()->setStartHour( hour ); - topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( ev->summary().left( 20 ) ).arg( t_ev->summary().left( 20 ) ) ); - return; - } - } - t_ev = test.next(); - } - ev = eventList.next(); - } - start = start.addDays( 1 ); - } - topLevelWidget()->setCaption( i18n("No conflict found within the next two years") ); - qDebug("No conflict found "); -#endif } void CalendarView::conflictAll() diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index b290020..779f12e 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1633,6 +1633,10 @@ void KOAgenda::setStartHour(int startHour) int startCell = startHour * mRows / 24; setContentsPos(0,startCell * gridSpacingY()); } +QTime KOAgenda::getEndTime() +{ + return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0); +} void KOAgenda::hideUnused() { // experimental only diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 0e3aed8..86cf2f4 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -127,6 +127,7 @@ class KOAgenda : public QScrollView void restorePosition(); void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } void shrinkPixmap(); + QTime getEndTime(); public slots: void slotContentMove(int,int); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 53bbe28..b5a59af 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -1840,9 +1840,12 @@ void KOMonthView::doComputeLayoutWeek() } int wid = width();//e int hei = height()-1-mNavigatorBar->height(); +#ifdef DESKTOP_VERSION if ( !KOPrefs::instance()->mMonthViewWeekRowlayout ) { daysToShow = 2; - } else { + } else +#endif + { if ( wid < hei ) daysToShow = 2; else |