summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (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
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();
@@ -1483,3 +1483,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
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() ?
@@ -1924,2 +1924,3 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
1924 computeSizes(); 1924 computeSizes();
1925 QScrollView::resizeEvent( ev );
1925 return; 1926 return;
@@ -2183,3 +2184,3 @@ void KOAgenda::restorePosition()
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 );
@@ -2204,3 +2205,3 @@ void KOAgenda::printSelection()
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. "),
@@ -2242,5 +2243,5 @@ void KOAgenda::printSelection()
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()));
@@ -2250,4 +2251,4 @@ void KOAgenda::printSelection()
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;
@@ -2255,5 +2256,5 @@ void KOAgenda::printSelection()
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
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
110 void initColor (); 110 void initColor ();
111 bool isAllDay() { return mAllDay; }
111 public slots: 112 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)
1004 //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() ); 1004 //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() );
1005 if ( mMinY.at(xxx) > item->cellYTop() ) 1005 if ( xxx >= 0 && xxx < mMinY.count() && !item->isAllDay() ) {
1006 mMinY.at(xxx) = item->cellYTop(); 1006 if ( mMinY.at(xxx) > item->cellYTop() )
1007 if ( mMaxY.at(xxx) < item->cellYBottom() ) 1007 mMinY.at(xxx) = item->cellYTop();
1008 mMaxY.at(xxx) = item->cellYBottom(); 1008 if ( mMaxY.at(xxx) < item->cellYBottom() )
1009 1009 mMaxY.at(xxx) = item->cellYBottom();
1010 }
1010 QDateTime startDt,endDt; 1011 QDateTime startDt,endDt;