1 from PyQt4.QtGui import *
4 class HistoryWidget(QTreeWidget):
6 def __init__(self, parent=None):
7 QTreeWidget.__init__(self, parent)
9 self.setHeaderLabels([_("Amount"), _("To / From")])
10 self.setIndentation(0)
12 def append(self, address, amount):
14 display_amount = "+%s" % amount
16 display_amount = "-%s" % (-amount)
17 item = QTreeWidgetItem([display_amount, address])
18 self.insertTopLevelItem(0, item)