-rw-r--r-- | korganizer/komonthview.cpp | 14 | ||||
-rw-r--r-- | korganizer/komonthview.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 9b0389d..00e5a6f 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -294,32 +294,44 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) mdayPos = 0; isWeekItem = KOPrefs::instance()->mMonthViewWeek; } void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s) { mDisplayHightlighted = false; setText( s ); mMultiday = 0; mIncidence = incidence; mDate = qd; mRecur = false; mAlarm = false; mReply = false; mInfo = false; mdayPos = 0; } +void MonthViewItem::clearData() +{ + mDisplayHightlighted = false; + setText( "" ); + mMultiday = 0; + mIncidence = 0; + mRecur = false; + mAlarm = false; + mReply = false; + mInfo = false; + mdayPos = 0; +} bool MonthViewItem::setHighlightedFalse() { if ( !mDisplayHightlighted ) return false; mDisplayHightlighted = false; return true; } bool MonthViewItem::setHighlighted( Incidence * inc ) { if ( inc == mIncidence ) { if ( mDisplayHightlighted ) return false; mDisplayHightlighted = true; return true; } else { @@ -642,32 +654,34 @@ void MonthViewCell::startUpdateCell() mAvailItemList.clear(); mAvailItemList.setAutoDelete( false ); clear(); } setPrimary( mDate.month()%2 ); setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); if ( mDate == QDate::currentDate() ) { setLineWidth( 3 ); } else { setLineWidth( 1 ); } MonthViewItem* CurrentAvailItem = (MonthViewItem*) firstItem (); //clear(); while ( CurrentAvailItem ) { MonthViewItem *item = CurrentAvailItem; + //item->setHighlightedFalse(); + item->clearData(); CurrentAvailItem = (MonthViewItem *)item->next(); mAvailItemList.append( item ); takeItem ( item ); } #ifdef DESKTOP_VERSION QToolTip::remove(this); #endif mToolTip.clear(); //qApp->processEvents(); #if 0 if ( !mHolidayString.isEmpty() ) { MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); item->setPalette( mHolidayPalette ); insertItem( item ); mToolTip.append ( mHolidayString ); diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 159af16..ac97860 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -94,32 +94,33 @@ class KNoScrollListBox: public QListBox void keyReleaseEvent(QKeyEvent *); void mousePressEvent(QMouseEvent *); void focusInEvent ( QFocusEvent * ); void focusOutEvent ( QFocusEvent * ); private: bool resetOnFocusIn; KNOWhatsThis * mWT; }; class MonthViewItem: public QListBoxItem { public: MonthViewItem( Incidence *, QDate qd, const QString & title ); void recycle( Incidence *incidence, QDate qd, const QString & s); + void clearData(); void setRecur(bool on) { mRecur = on; } void setAlarm(bool on) { mAlarm = on; } void setReply(bool on) { mReply = on; } void setMoreInfo(bool on) { mInfo = on; } void setMultiDay(int type) { mMultiday = type; } int multiDay() { return mMultiday; } void setMultiDayPos(int type) { mdayPos = type; } int gettMultiDayPos() { return mdayPos; } void setBlockRepaint(bool on) { mblockRepaint = on; } bool setHighlighted( Incidence * ); void setPalette(const QPalette &p) { mPalette = p; } QPalette palette() const { return mPalette; } bool setHighlightedFalse(); Incidence *incidence() const { return mIncidence; } QDate incidenceDate() { return mDate; } |