summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-17 12:04:19 (UTC)
committer zautrix <zautrix>2005-08-17 12:04:19 (UTC)
commit31393a99cd2b190e62a7a09a7739a14af83936d1 (patch) (side-by-side diff)
tree1e000be050be3119f7b7eb8a248401c39cabf597
parent5f33ec89f5110ea646a32856eb6685c61cf24079 (diff)
downloadkdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.zip
kdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.tar.gz
kdepimpi-31393a99cd2b190e62a7a09a7739a14af83936d1.tar.bz2
fixed warnings
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp21
-rw-r--r--korganizer/koagendaitem.h1
-rw-r--r--korganizer/koagendaview.cpp3
3 files changed, 14 insertions, 11 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
//--cx;++cw;
int lGridSpacingY = mGridSpacingY*2;
- int selDay;
+ uint selDay;
QDate curDate = QDate::currentDate();
if ( !backgroundOnly ) {
for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay)
@@ -1481,7 +1481,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
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;
@@ -1922,6 +1922,7 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
mSelectionHeight = 0;
mResizeTimer.start( 150 , true );
computeSizes();
+ QScrollView::resizeEvent( ev );
return;
}
@@ -2181,7 +2182,7 @@ void KOAgenda::restorePosition()
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);
@@ -2202,7 +2203,7 @@ 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 );
@@ -2240,22 +2241,22 @@ void KOAgenda::printSelection()
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);
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 99c564a..2b26e95 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -108,6 +108,7 @@ class KOAgendaItem : public QWidget
void recreateIncidence();
bool checkLayout();
void initColor ();
+ bool isAllDay() { return mAllDay; }
public slots:
bool updateIcons( QPainter *, bool );
void select(bool=true);
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f5a3a4b..1cf03a0 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1002,11 +1002,12 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
int xxx = item->cellX();
//qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),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;
QDate startDate;
int lenInSecs;