summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-21 13:56:46 (UTC)
committer zautrix <zautrix>2005-03-21 13:56:46 (UTC)
commit41f264fea6caaf9ca0f8b34509a07157c210f851 (patch) (side-by-side diff)
treef49b5d10db838821f79d5ae3d28b492f76663b62 /korganizer
parent098a3c6dd844a880beb2851be53314613c3a038d (diff)
downloadkdepimpi-41f264fea6caaf9ca0f8b34509a07157c210f851.zip
kdepimpi-41f264fea6caaf9ca0f8b34509a07157c210f851.tar.gz
kdepimpi-41f264fea6caaf9ca0f8b34509a07157c210f851.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kdatenavigator.cpp4
-rw-r--r--korganizer/kdatenavigator.h2
-rw-r--r--korganizer/kodaymatrix.cpp8
3 files changed, 9 insertions, 5 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 4b50b5a..2321acb 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -169,14 +169,14 @@ QSize KDateNavigator::sizeHintTwoButtons() const
//qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei);
return QSize ( wid, hei );
}
void KDateNavigator::slotMonthSelected( int m )
{
if ( m_MthYr.month() <= mMonthSignalOffset)
- m += 12;
- int mo = m - mMonthSignalOffset;
+ m += 12;
+ //qDebug("%d mMonthSignalOffset %d emit %d", m, mMonthSignalOffset, m - mMonthSignalOffset);
emit monthSelected( m - mMonthSignalOffset );
}
void KDateNavigator::setCalendar( Calendar *cal )
{
daymatrix->setCalendar( cal );
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index d1f32b6..77b9b7c 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -60,13 +60,13 @@ class KDateNavigator: public QFrame
void setShowWeekNums( bool enabled );
void setCalendar( Calendar * );
void setBaseDate( const QDate & , bool doRepaint = true );
KCal::DateList selectedDates() const { return mSelectedDates; }
NavigatorBar *navigatorBar() const { return mNavigatorBar; }
- void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;}
+ void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off%12;}
QSize yourSizeHint() { return mySizeHint; }
QFont yourFontHint( QSize , bool * b);
bool fontChanged() {return mFontChanged; }
void unsetFontChanged() { mFontChanged = false; }
KODayMatrix *dayMatrix() { return daymatrix ;}
QSize sizeHint() const;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 9baff20..493382d 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -408,14 +408,14 @@ void KODayMatrix::updateView(QDate actdate)
}
//qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() );
if ( !isVisible() ) {
mPendingUpdateBeforeRepaint = true;
} else {
#ifdef DESKTOP_VERSION
- //mRepaintTimer->start( 150 );
- mUpdateTimer->start( 150 );
+ //mRepaintTimer->start( 100 );
+ mUpdateTimer->start( 100 );
#else
mRepaintTimer->start( 350 );
mUpdateTimer->start( 1200 );
#endif
}
}
@@ -832,12 +832,14 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
addRow = row - 5 + rowModulo;
}
if ( colModulo ) {
if ( col >= 7 - colModulo )
addCol = col - 6 + colModulo-1;
}
+ if ( col == 0 )
+ addCol = 1;
p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1);
p.setPen(tmppen);
}
// if any events are on that day then draw it using a bold font
if (events[i] > 0) {
@@ -874,12 +876,14 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
if ( rowModulo ) {
if ( row >= 6 - rowModulo )
addRow = row - 5 + rowModulo;
}
//qDebug("add %d %d -- %d %d ", col, addCol, row, addRow);
++addCol;//++addCol;
+ if ( row == 0)
+ addRow = 1;
p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight,
Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]);
// reset color to actual color
if (!mHolidays[i].isNull()) {
p.setPen(actcol);