summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp21
-rw-r--r--korganizer/koagendaitem.h1
-rw-r--r--korganizer/koagendaview.cpp11
3 files changed, 18 insertions, 15 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 7d9d674..88f5d99 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1469,3 +1469,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
int lGridSpacingY = mGridSpacingY*2;
- int selDay;
+ uint selDay;
QDate curDate = QDate::currentDate();
@@ -1483,3 +1483,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
int gxStart = selDay;
- int gxEnd = gxStart ;
+ //int gxEnd = gxStart ;
int xStart = KOGlobals::self()->reverseLayout() ?
@@ -1924,2 +1924,3 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
computeSizes();
+ QScrollView::resizeEvent( ev );
return;
@@ -2183,3 +2184,3 @@ void KOAgenda::restorePosition()
else
- posY = (max/mContentPosition)-(viewport()->height()/2);
+ posY = (int) ((max/mContentPosition)-(viewport()->height()/2));
setContentsPos (0, posY );
@@ -2204,3 +2205,3 @@ void KOAgenda::printSelection()
if ( mStartCellY == mCurrentCellY ) {
- int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
+ QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
i18n("Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. "),
@@ -2242,5 +2243,5 @@ void KOAgenda::printSelection()
// set the scale
- p.drawText( offset* scale, offset* scale*3/4, date );
+ p.drawText( (int) (offset* scale), (int) (offset* scale*3/4), date );
- int selDay;
+ uint selDay;
float widOffset = ((float) m.width()-offset) / ((float)(mSelectedDates.count()));
@@ -2250,4 +2251,4 @@ void KOAgenda::printSelection()
QString text = KGlobal::locale()->formatDate( mSelectedDates[selDay],true );
- p.setClipRect(offset* scale+startX , 0, widOffset-4, offset* scale+(2*hei* scale) );
- p.drawText( offset* scale+startX, (offset+hei)* scale, text );
+ p.setClipRect((int) (offset* scale+startX) , 0, (int) (widOffset-4), (int) (offset* scale+(2*hei* scale)) );
+ p.drawText( (int) (offset* scale+startX), (int) ((offset+hei)* scale), text );
startX += widOffset;
@@ -2255,5 +2256,5 @@ void KOAgenda::printSelection()
}
- p.translate( offset* scale,offset* scale+ (-y * scale)+(2*hei* scale));
+ p.translate( (int) (offset* scale),(int) (offset* scale+ (-y * scale)+(2*hei* scale)));
p.scale( scale, scale );
- p.setClipRect( offset* scale, offset* scale+(2*hei* scale), w*scale, h*scale );
+ p.setClipRect( (int) (offset* scale), (int) (offset* scale+(2*hei* scale)), (int) (w*scale), (int) (h*scale) );
// now printing with y offset: 2 hei
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 99c564a..2b26e95 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -110,2 +110,3 @@ class KOAgendaItem : public QWidget
void initColor ();
+ bool isAllDay() { return mAllDay; }
public slots:
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f5a3a4b..1cf03a0 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1004,7 +1004,8 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
//qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() );
- if ( mMinY.at(xxx) > item->cellYTop() )
- mMinY.at(xxx) = item->cellYTop();
- if ( mMaxY.at(xxx) < item->cellYBottom() )
- mMaxY.at(xxx) = item->cellYBottom();
-
+ if ( xxx >= 0 && xxx < mMinY.count() && !item->isAllDay() ) {
+ if ( mMinY.at(xxx) > item->cellYTop() )
+ mMinY.at(xxx) = item->cellYTop();
+ if ( mMaxY.at(xxx) < item->cellYBottom() )
+ mMaxY.at(xxx) = item->cellYBottom();
+ }
QDateTime startDt,endDt;