summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp14
-rw-r--r--korganizer/komonthview.h1
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
@@ -298,24 +298,36 @@ 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 )
@@ -646,24 +658,26 @@ void MonthViewCell::startUpdateCell()
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() ) {
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 159af16..ac97860 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -98,24 +98,25 @@ class KNoScrollListBox: public QListBox
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; }