rem: painter->fillRect(box, data->event.colour()); break; case AlarmListView::MESSAGE_COLUMN:
add: if (mEvent.action() == KAlarmEvent::MESSAGE || mEvent.action() == KAlarmEvent::FILE) painter->fillRect(box, mEvent.bgColour()); } else if (column == listView->messageColumn()) { QPixmap* pixmap; switch (mEvent.action()) { case KAlarmAlarm::FILE:     pixmap = fileIcon;     break; case KAlarmAlarm::COMMAND:  pixmap = commandIcon;  break; case KAlarmAlarm::EMAIL:    pixmap = emailIcon;    break; case KAlarmAlarm::MESSAGE: default:                    pixmap = textIcon;     break; } int frameWidth = listView->style().pixelMetric(QStyle::PM_DefaultFrameWidth); QRect pixmapRect = pixmap->rect(); int diff = box.height() - pixmap->height(); if (diff < 0) { pixmapRect.setTop(-diff / 2); pixmapRect.setHeight(box.height()); } QRect iconRect(box.left(), box.top() + (diff > 0 ? diff / 2 : 0), pixmap->width(), (diff > 0 ? pixmap->height() : box.height())); QRect textRect = box; textRect.setLeft(box.left() + iconWidth + 3*frameWidth);
context: void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int column, int width, int /*align*/){	const AlarmListView* listView = alarmListView();	const AlarmItemData* data   = listView->getData(this);	int                  margin = listView->itemMargin();	QRect box (margin, margin, width - margin*2, height() - margin*2);	bool   selected = isSelected();	QColor bgColour = selected ? cg.highlight() : cg.base();	painter->setPen(selected ? cg.highlightedText() : cg.text());	switch (column)	{	case AlarmListView::TIME_COLUMN:		painter->fillRect(box, bgColour);		painter->drawText(box, AlignVCenter, data->dateTimeText);		break;	case AlarmListView::REPEAT_COLUMN:		painter->fillRect(box, bgColour);		painter->drawText(box, AlignVCenter | AlignHCenter, data->repeatCountText);		break;	case AlarmListView::COLOUR_COLUMN:		// Paint the cell the colour of the alarm message		painter->fillRect(box, data->event.colour());		break;	case AlarmListView::MESSAGE_COLUMN:		if (!selected  &&  listView->drawMessageInColour())		{			QColor colour = data->event.colour();			painter->fillRect(box, colour);			painter->setBackgroundColor(colour);//			painter->setPen(data->event->fgColour());			painter->drawText(box, AlignVCenter, data->messageText);			break;		}//		QListViewItem::paintCell(painter, cg, column, width, align);		painter->fillRect(box, bgColour);		painter->drawText(box, AlignVCenter, data->messageText);		break;	}}