[Qt] Add column Watch-only to transactions list

This commit is contained in:
Cozz Lovan
2014-08-10 02:26:04 +02:00
parent 939ed97373
commit 1c5f0af0fd
12 changed files with 106 additions and 13 deletions

View File

@@ -57,7 +57,15 @@ public:
}
painter->setPen(foreground);
painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address);
QRect boundingRect;
painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address, &boundingRect);
if (index.data(TransactionTableModel::WatchonlyRole).toBool())
{
QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
QRect watchonlyRect(boundingRect.right() + 5, mainRect.top()+ypad+halfheight, 16, halfheight);
iconWatchonly.paint(painter, watchonlyRect);
}
if(amount < 0)
{