Qt: add tx and address counters
This commit is contained in:
@@ -111,6 +111,7 @@ class AddressList(MyTreeView):
|
|||||||
|
|
||||||
def create_toolbar(self, config):
|
def create_toolbar(self, config):
|
||||||
toolbar, menu = self.create_toolbar_with_menu('')
|
toolbar, menu = self.create_toolbar_with_menu('')
|
||||||
|
self.num_addr_label = toolbar.itemAt(0).widget()
|
||||||
menu.addToggle(_("Show Filter"), lambda: self.toggle_toolbar(self.config))
|
menu.addToggle(_("Show Filter"), lambda: self.toggle_toolbar(self.config))
|
||||||
menu.addConfig(_('Show Fiat balances'), 'fiat_address', False, callback=self.main_window.app.update_fiat_signal.emit)
|
menu.addConfig(_('Show Fiat balances'), 'fiat_address', False, callback=self.main_window.app.update_fiat_signal.emit)
|
||||||
hbox = self.create_toolbar_buttons()
|
hbox = self.create_toolbar_buttons()
|
||||||
@@ -221,6 +222,8 @@ class AddressList(MyTreeView):
|
|||||||
self.hideColumn(self.Columns.FIAT_BALANCE)
|
self.hideColumn(self.Columns.FIAT_BALANCE)
|
||||||
self.filter()
|
self.filter()
|
||||||
self.proxy.setDynamicSortFilter(True)
|
self.proxy.setDynamicSortFilter(True)
|
||||||
|
# update counter
|
||||||
|
self.num_addr_label.setText(_("{} addresses").format(len(addr_list)))
|
||||||
|
|
||||||
def refresh_row(self, key, row):
|
def refresh_row(self, key, row):
|
||||||
assert row is not None
|
assert row is not None
|
||||||
|
|||||||
@@ -366,6 +366,10 @@ class HistoryModel(CustomModel, Logger):
|
|||||||
if not tx_item.get('lightning', False):
|
if not tx_item.get('lightning', False):
|
||||||
tx_mined_info = self.tx_mined_info_from_tx_item(tx_item)
|
tx_mined_info = self.tx_mined_info_from_tx_item(tx_item)
|
||||||
self.tx_status_cache[txid] = self.window.wallet.get_tx_status(txid, tx_mined_info)
|
self.tx_status_cache[txid] = self.window.wallet.get_tx_status(txid, tx_mined_info)
|
||||||
|
# update counter
|
||||||
|
num_tx = len(self.transactions)
|
||||||
|
if self.view:
|
||||||
|
self.view.num_tx_label.setText(_("{} transactions").format(num_tx))
|
||||||
|
|
||||||
def set_visibility_of_columns(self):
|
def set_visibility_of_columns(self):
|
||||||
def set_visible(col: int, b: bool):
|
def set_visible(col: int, b: bool):
|
||||||
@@ -543,6 +547,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
|
|||||||
|
|
||||||
def create_toolbar(self, config):
|
def create_toolbar(self, config):
|
||||||
toolbar, menu = self.create_toolbar_with_menu('')
|
toolbar, menu = self.create_toolbar_with_menu('')
|
||||||
|
self.num_tx_label = toolbar.itemAt(0).widget()
|
||||||
menu.addToggle(_("Filter by Date"), lambda: self.toggle_toolbar(self.config))
|
menu.addToggle(_("Filter by Date"), lambda: self.toggle_toolbar(self.config))
|
||||||
self.menu_fiat = menu.addConfig(_('Show Fiat Values'), 'history_rates', False, callback=self.main_window.app.update_fiat_signal.emit)
|
self.menu_fiat = menu.addConfig(_('Show Fiat Values'), 'history_rates', False, callback=self.main_window.app.update_fiat_signal.emit)
|
||||||
self.menu_capgains = menu.addConfig(_('Show Capital Gains'), 'history_rates_capital_gains', False, callback=self.main_window.app.update_fiat_signal.emit)
|
self.menu_capgains = menu.addConfig(_('Show Capital Gains'), 'history_rates_capital_gains', False, callback=self.main_window.app.update_fiat_signal.emit)
|
||||||
|
|||||||
Reference in New Issue
Block a user