You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
766 B
25 lines
766 B
from PyQt4.QtGui import *
|
|
from electrum.i18n import _
|
|
|
|
class HistoryWidget(QTreeWidget):
|
|
|
|
def __init__(self, parent=None):
|
|
QTreeWidget.__init__(self, parent)
|
|
self.setColumnCount(2)
|
|
self.setHeaderLabels([_("Amount"), _("To / From"), _("When")])
|
|
self.setIndentation(0)
|
|
|
|
def empty(self):
|
|
self.clear()
|
|
|
|
def append(self, address, amount, date):
|
|
if address is None:
|
|
address = _("Unknown")
|
|
if amount is None:
|
|
amount = _("Unknown")
|
|
if date is None:
|
|
date = _("Unknown")
|
|
item = QTreeWidgetItem([amount, address, date])
|
|
if amount.find('-') != -1:
|
|
item.setForeground(0, QBrush(QColor("#BC1E1E")))
|
|
self.insertTopLevelItem(0, item)
|
|
|