summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 0d36946..13d8398 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1512,48 +1512,58 @@ void KOAgendaView::deleteSelectedDateTime()
mTimeSpanEnd.setDate(QDate());
mTimeSpanInAllDay = false;
}
void KOAgendaView::keyPressEvent ( QKeyEvent * e )
{
e->ignore();
}
void KOAgendaView::scrollOneHourUp()
{
mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 );
}
void KOAgendaView::scrollOneHourDown()
{
mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 );
}
void KOAgendaView::setStartHour( int h )
{
mAgenda->setStartHour( h );
}
+void KOAgendaView::setInitStartHour()
+{
+
+ if ( KOPrefs::instance()->mCenterOnCurrentTime )
+ setStartHour( QTime::currentTime ().hour() );
+ else
+ setStartHour( KOPrefs::instance()->mDayBegins );
+
+}
+
void KOAgendaView::updateTodo( Todo * t, int )
{
if ( !isVisible() )
return;
bool remove = false;
bool removeAD = false;
QDate da;
if ( t->hasCompletedDate() )
da = t->completed().date();
else
da = t->dtDue().date();
if ( ! t->hasDueDate() && !t->hasCompletedDate() ) {
remove = true;
removeAD = true;
}
else {
bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
if ( overdue &&
QDate::currentDate() >= mSelectedDates.first() &&
QDate::currentDate() <= mSelectedDates.last()) {
removeAD = false;
remove = true;
}