HomePhabricator

[electrum] extract sorting helper methods from MyTreeWidget to mixin class

Description

[electrum] extract sorting helper methods from MyTreeWidget to mixin class

Summary:
The end goal will be to switch from using MyTreeWidget to using a QTreeView as a base class for UtxoList (coins tab) and HistoryList (main tab of the application).
This extracts some useful features that will be needed not only for MyTreeWidget but also for these QTreeViews

See T3206

Depends on D14168

Test Plan:
run the application, open a wallet that has multiple coins (currently only the UTXO list remembers sorting when closing and reopening the app), change the sorting of the utxo list in various ways by clicking on the column headers and check that after restarting the application the sorting is still the same.

Also check that the default sorting for other tabs still makes sense:

  • tx history should be sorted by descending dates
  • coins are sorted by descending amount
  • other widgets (addresses) don't have have a specified ordering so they are initially sorted by the order in which items are added (addresses by ascending index, receiving addresses before change addresses)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14169

Details

Provenance
PiRKAuthored on Jun 30 2023, 13:05
PiRKPushed on Jul 3 2023, 09:50
Reviewer
Restricted Project
Differential Revision
D14169: [electrum] extract sorting helper methods from MyTreeWidget to mixin class
Parents
rABC6b6700377247: [electrum] no need to pass parent to MyTreeWidget
Branches
Unknown
Tags
Unknown