summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--korganizer/calendarview.cpp64
-rw-r--r--korganizer/koagenda.cpp4
-rw-r--r--korganizer/koagenda.h1
-rw-r--r--korganizer/komonthview.cpp5
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
@@ -6,6 +6,6 @@ Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly a
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
@@ -105,4 +105,5 @@
#include "koviewmanager.h"
#include "koagendaview.h"
+#include "koagenda.h"
#include "kodialogmanager.h"
#include "outgoingdialog.h"
@@ -664,5 +665,9 @@ void CalendarView::nextConflict( bool all, bool allday )
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;
@@ -721,61 +726,4 @@ void CalendarView::nextConflict( bool all, bool allday )
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
}
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index b290020..779f12e 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1634,4 +1634,8 @@ void KOAgenda::setStartHour(int startHour)
setContentsPos(0,startCell * gridSpacingY());
}
+QTime KOAgenda::getEndTime()
+{
+ return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0);
+}
void KOAgenda::hideUnused()
{
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 0e3aed8..86cf2f4 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -128,4 +128,5 @@ class KOAgenda : public QScrollView
void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; }
void shrinkPixmap();
+ QTime getEndTime();
public slots:
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 53bbe28..b5a59af 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1841,7 +1841,10 @@ 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;