-rw-r--r-- | korganizer/koagenda.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 7d9d674..88f5d99 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1466,9 +1466,9 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i // qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch); //--cx;++cw; int lGridSpacingY = mGridSpacingY*2; - int selDay; + uint selDay; QDate curDate = QDate::currentDate(); if ( !backgroundOnly ) { for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) { @@ -1480,9 +1480,9 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i int y2 = contentsHeight(); if (y2 > cy+ch-1) y2=cy+ch-1; if (x2 >= x1 && y2 >= y1) { int gxStart = selDay; - int gxEnd = gxStart ; + //int gxEnd = gxStart ; int xStart = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gxStart)*mGridSpacingX : gxStart*mGridSpacingX; if (xStart < x1) xStart = x1; @@ -1921,8 +1921,9 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev ) { mSelectionHeight = 0; mResizeTimer.start( 150 , true ); computeSizes(); + QScrollView::resizeEvent( ev ); return; } void KOAgenda::computeSizes() @@ -2180,9 +2181,9 @@ void KOAgenda::restorePosition() else if ( mContentPosition == 0 ) posY = 0; else - posY = (max/mContentPosition)-(viewport()->height()/2); + posY = (int) ((max/mContentPosition)-(viewport()->height()/2)); setContentsPos (0, posY ); //qDebug("posY %d hei %d", posY, max); } @@ -2201,9 +2202,9 @@ void KOAgenda::moveChild( QWidget *w, int x , int y ) void KOAgenda::printSelection() { #ifdef DESKTOP_VERSION 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. "), i18n("OK"), 0, 0, 0, 1 ); return; @@ -2239,24 +2240,24 @@ void KOAgenda::printSelection() scale = dx; else scale = dy; // 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())); float startX = 1; for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) { 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; } - 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 // p.translate( 0, -y*scale); drawContentsToPainter(&p, true ); |