summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-19 23:16:04 (UTC)
committer zautrix <zautrix>2005-02-19 23:16:04 (UTC)
commite82ab2271ce57a71a0ae3890e9b09a9fcc6043e4 (patch) (side-by-side diff)
treef4aee70f22fe7807279e0b6c7ee2c6e420694331
parent6c152b28df5d22b75b1b0dcef77073f0320c5710 (diff)
downloadkdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.zip
kdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.tar.gz
kdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 3aaa50a..c125ce9 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -174,49 +174,49 @@ void KNoScrollListBox::oneDown()
void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
{
switch(e->key()) {
case Key_Shift:
emit shiftUp();
break;
default:
break;
}
}
void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
{
QListBox::mousePressEvent(e);
if(e->button() == RightButton) {
emit rightClick();
}
}
MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
: QListBoxItem()
{
setText( s );
-
+ mMultiday = 0;
mIncidence = incidence;
mDate = qd;
mRecur = false;
mAlarm = false;
mReply = false;
mInfo = false;
}
void MonthViewItem::paint(QPainter *p)
{
#if QT_VERSION >= 0x030000
bool sel = isSelected();
#else
bool sel = selected();
#endif
if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
{
p->setBackgroundColor( palette().color( QPalette::Normal, \
sel ? QColorGroup::Highlight : QColorGroup::Background ) );
p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) );
}
int x = 1;
@@ -495,50 +495,51 @@ void MonthViewCell::insertEvent(Event *event)
if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
return;
else
if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
return;
}
if ( event->categories().contains("Holiday") ||
event->categories().contains(i18n("Holiday"))) {
setHoliday( true );
if ( mDate.dayOfWeek() == 7 )
mItemList->setLineWidth( 3 );
}
QString text;
int multiday = 0;// 1 = start, 2 = midddle, 3 = end day
if (event->isMultiDay()) {
QString prefix = "<->";multiday = 2;
QString time;
if ( event->doesRecur() ) {
if ( event->recursOn( mDate) ) {
prefix ="->" ;multiday = 1;
}
else {
int days = event->dtStart().date().daysTo ( event->dtEnd().date() );
- if ( event->recursOn( mDate.addDays( -days)) )
+ if ( event->recursOn( mDate.addDays( -days)) ) {
prefix ="<-" ;multiday = 3;
+ }
}
} else {
if (mDate == event->dtStart().date()) {
prefix ="->" ;multiday = 1;
} else if (mDate == event->dtEnd().date()) {
prefix ="<-" ;multiday = 3;
}
}
if ( !event->doesFloat() ) {
if ( mDate == event->dtStart().date () )
time = KGlobal::locale()->formatTime(event->dtStart().time())+" ";
else if ( mDate == event->dtEnd().date () )
time = KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
}
text = time + event->summary();
mToolTip += prefix + text;
} else {
if (event->doesFloat()) {
text = event->summary();
mToolTip += text;
}
else {