+ QRectF bounding;
+ painter->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter , subText, &bounding);
+
+ int proxy = index.data(Qt::UserRole + 5).toInt();
+ if (proxy > 0) {
+ QRectF txtBounding;
+ QString proxyText;
+ QBrush brush;
+ QColor color;
+ if (proxy == PROXYDONE) {
+ proxyText = i18n("Proxy");
+ brush = option.palette.mid();
+ color = option.palette.color(QPalette::WindowText);
+ }
+ else {
+ if (proxy == CREATINGPROXY) proxyText = i18n("Generating proxy...");
+ else if (proxy == PROXYWAITING) proxyText = i18n("Waiting proxy...");
+ else if (proxy == PROXYCRASHED) proxyText = i18n("proxy crashed");
+ brush = option.palette.highlight();
+ color = option.palette.color(QPalette::HighlightedText);
+ }
+
+ txtBounding = painter->boundingRect(r2, Qt::AlignRight | Qt::AlignVCenter, " " + proxyText + " ");
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(brush);
+ painter->drawRoundedRect(txtBounding, 2, 2);
+ painter->setPen(option.palette.highlightedText().color());
+ painter->drawText(txtBounding, Qt::AlignHCenter | Qt::AlignVCenter , proxyText);
+ }
+