summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
authorzautrix <zautrix>2005-04-04 21:50:29 (UTC)
committer zautrix <zautrix>2005-04-04 21:50:29 (UTC)
commit768858848f466a726e2f50b777345976828cc2ff (patch) (side-by-side diff)
tree49351537d5038f4f5e22bcde2205bbabf0dbdb22 /korganizer/kodaymatrix.cpp
parentc408fcb55de18d1e3e1d20803c3885e3074cfaa4 (diff)
downloadkdepimpi-768858848f466a726e2f50b777345976828cc2ff.zip
kdepimpi-768858848f466a726e2f50b777345976828cc2ff.tar.gz
kdepimpi-768858848f466a726e2f50b777345976828cc2ff.tar.bz2
fixes
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 8affe50..c7e1b45 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -111,3 +111,6 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const
#endif
-{
+{
+ oldW = 0;
+ oldH = 0;
+ myPix.resize( 150, 120 );
mRedrawNeeded = true;
@@ -118,4 +121,4 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const
bDays.resize ( NUMDAYS );
- hDays.resize ( NUMDAYS );;
- eDays.resize ( NUMDAYS );;
+ hDays.resize ( NUMDAYS );
+ eDays.resize ( NUMDAYS );
days = new QDate[NUMDAYS];
@@ -336,3 +339,7 @@ void KODayMatrix::updateView()
void KODayMatrix::repaintViewTimed()
-{
+{
+ mRedrawNeeded = true;
+ bDays.fill( false);
+ hDays.fill( false);
+ eDays.fill( false);
mRepaintTimer->stop();
@@ -685,2 +692,3 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
+#if 0
if ( myPix.width() != width() || myPix.height()!=height() ) {
@@ -689,3 +697,14 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
-
+#endif
+ if ( oldW != width() || oldH !=height() )
+ mRedrawNeeded = true;
+
+ oldH = height() ;
+ oldW = width();
+ if ( myPix.width() < width() || myPix.height() < height() ) {
+ myPix.resize(size() );
+ mRedrawNeeded = true;
+
+ }
+
if ( mRedrawNeeded ) {
@@ -949,3 +968,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
- bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP);
+
+ bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP);
mRedrawNeeded = false;