+ //QStyledItemDelegate::paint(painter, option, index);
+ QStyle *style = QApplication::style();
+ style->drawControl(QStyle::CE_ItemViewItem, &option, painter, 0);
+
+ // draw thumbnail of frame
+ if (event->type() == ApiTraceEvent::Frame) {
+ ApiTraceFrame *frame = static_cast<ApiTraceFrame*>(event);
+ const QImage & thumbnail = frame->thumbnail();
+ if (!thumbnail.isNull()) {
+ painter->drawImage(offset, thumbnail);
+ offset += QPoint(textSize.height() + thumbnail.width(), option.rect.height()/2 - textSize.height()/2);
+ }
+ }
+
+ if (event->hasState()) {
+ QPixmap px = m_stateEmblem.pixmap(textSize.height(),
+ textSize.height());
+ painter->drawPixmap(option.rect.topLeft(), px);
+ offset += QPoint(textSize.height() + 5, 0);
+ }
+ if (event->type() == ApiTraceEvent::Call) {
+ ApiTraceCall *call = static_cast<ApiTraceCall*>(event);
+ if (call->hasError()) {
+ QPixmap px = m_errorEmblem.pixmap(textSize.height(),
+ textSize.height());
+ painter->drawPixmap(offset, px);
+ offset += QPoint(textSize.height() + 5, 0);
+ }
+ if (call->edited()) {
+ QPixmap px = m_editEmblem.pixmap(textSize.height(),
+ textSize.height());
+ painter->drawPixmap(offset, px);
+ offset += QPoint(textSize.height() + 5, 0);
+ }
+ }
+
+ painter->drawStaticText(offset, text);
+ } else {