summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-08-17 12:04:19 (UTC)
committer zautrix <zautrix>2005-08-17 12:04:19 (UTC)
commit31393a99cd2b190e62a7a09a7739a14af83936d1 (patch) (unidiff)
tree1e000be050be3119f7b7eb8a248401c39cabf597 /korganizer/koagenda.cpp
parent5f33ec89f5110ea646a32856eb6685c61cf24079 (diff)
downloadkdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.zip
kdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.tar.gz
kdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.tar.bz2
fixed warnings
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp21
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
@@ -1467,7 +1467,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
1467 1467
1468 //--cx;++cw; 1468 //--cx;++cw;
1469 int lGridSpacingY = mGridSpacingY*2; 1469 int lGridSpacingY = mGridSpacingY*2;
1470 int selDay; 1470 uint selDay;
1471 QDate curDate = QDate::currentDate(); 1471 QDate curDate = QDate::currentDate();
1472 if ( !backgroundOnly ) { 1472 if ( !backgroundOnly ) {
1473 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) 1473 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay)
@@ -1481,7 +1481,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
1481 if (y2 > cy+ch-1) y2=cy+ch-1; 1481 if (y2 > cy+ch-1) y2=cy+ch-1;
1482 if (x2 >= x1 && y2 >= y1) { 1482 if (x2 >= x1 && y2 >= y1) {
1483 int gxStart = selDay; 1483 int gxStart = selDay;
1484 int gxEnd = gxStart ; 1484 //int gxEnd = gxStart ;
1485 int xStart = KOGlobals::self()->reverseLayout() ? 1485 int xStart = KOGlobals::self()->reverseLayout() ?
1486 (mColumns - 1 - gxStart)*mGridSpacingX : 1486 (mColumns - 1 - gxStart)*mGridSpacingX :
1487 gxStart*mGridSpacingX; 1487 gxStart*mGridSpacingX;
@@ -1922,6 +1922,7 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
1922 mSelectionHeight = 0; 1922 mSelectionHeight = 0;
1923 mResizeTimer.start( 150 , true ); 1923 mResizeTimer.start( 150 , true );
1924 computeSizes(); 1924 computeSizes();
1925 QScrollView::resizeEvent( ev );
1925 return; 1926 return;
1926 1927
1927} 1928}
@@ -2181,7 +2182,7 @@ void KOAgenda::restorePosition()
2181 if ( mContentPosition == 0 ) 2182 if ( mContentPosition == 0 )
2182 posY = 0; 2183 posY = 0;
2183 else 2184 else
2184 posY = (max/mContentPosition)-(viewport()->height()/2); 2185 posY = (int) ((max/mContentPosition)-(viewport()->height()/2));
2185 setContentsPos (0, posY ); 2186 setContentsPos (0, posY );
2186 //qDebug("posY %d hei %d", posY, max); 2187 //qDebug("posY %d hei %d", posY, max);
2187 2188
@@ -2202,7 +2203,7 @@ void KOAgenda::printSelection()
2202{ 2203{
2203#ifdef DESKTOP_VERSION 2204#ifdef DESKTOP_VERSION
2204 if ( mStartCellY == mCurrentCellY ) { 2205 if ( mStartCellY == mCurrentCellY ) {
2205 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2206 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2206 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. "), 2207 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. "),
2207 i18n("OK"), 0, 0, 2208 i18n("OK"), 0, 0,
2208 0, 1 ); 2209 0, 1 );
@@ -2240,22 +2241,22 @@ void KOAgenda::printSelection()
2240 else 2241 else
2241 scale = dy; 2242 scale = dy;
2242 // set the scale 2243 // set the scale
2243 p.drawText( offset* scale, offset* scale*3/4, date ); 2244 p.drawText( (int) (offset* scale), (int) (offset* scale*3/4), date );
2244 2245
2245 int selDay; 2246 uint selDay;
2246 float widOffset = ((float) m.width()-offset) / ((float)(mSelectedDates.count())); 2247 float widOffset = ((float) m.width()-offset) / ((float)(mSelectedDates.count()));
2247 float startX = 1; 2248 float startX = 1;
2248 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) 2249 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay)
2249 { 2250 {
2250 QString text = KGlobal::locale()->formatDate( mSelectedDates[selDay],true ); 2251 QString text = KGlobal::locale()->formatDate( mSelectedDates[selDay],true );
2251 p.setClipRect(offset* scale+startX , 0, widOffset-4, offset* scale+(2*hei* scale) ); 2252 p.setClipRect((int) (offset* scale+startX) , 0, (int) (widOffset-4), (int) (offset* scale+(2*hei* scale)) );
2252 p.drawText( offset* scale+startX, (offset+hei)* scale, text ); 2253 p.drawText( (int) (offset* scale+startX), (int) ((offset+hei)* scale), text );
2253 startX += widOffset; 2254 startX += widOffset;
2254 2255
2255 } 2256 }
2256 p.translate( offset* scale,offset* scale+ (-y * scale)+(2*hei* scale)); 2257 p.translate( (int) (offset* scale),(int) (offset* scale+ (-y * scale)+(2*hei* scale)));
2257 p.scale( scale, scale ); 2258 p.scale( scale, scale );
2258 p.setClipRect( offset* scale, offset* scale+(2*hei* scale), w*scale, h*scale ); 2259 p.setClipRect( (int) (offset* scale), (int) (offset* scale+(2*hei* scale)), (int) (w*scale), (int) (h*scale) );
2259 // now printing with y offset: 2 hei 2260 // now printing with y offset: 2 hei
2260 // p.translate( 0, -y*scale); 2261 // p.translate( 0, -y*scale);
2261 2262