-rw-r--r-- | korganizer/koagenda.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index b290020..779f12e 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1612,48 +1612,52 @@ int KOAgenda::timeToY(const QTime &time) fit into the grid. */ QTime KOAgenda::gyToTime(int gy) { int secondsPerCell = 24 * 60 * 60/ mRows; int timeSeconds = secondsPerCell * gy; QTime time( 0, 0, 0 ); if ( timeSeconds < 24 * 60 * 60 ) { time = time.addSecs(timeSeconds); } else { time.setHMS( 23, 59, 59 ); } return time; } 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 // return; KOAgendaItem *item; for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) { item->hide(); } } KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view) { KOAgendaItem *fi; for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) { if ( fi->incidence() == event ) { mUnusedItems.remove(); fi->init( event, qd ); return fi; } } fi=mUnusedItems.first(); if ( fi ) { |