fibercryptowallet icon indicating copy to clipboard operation
fibercryptowallet copied to clipboard

Fix the layout of Qt models

Open stdevCrow opened this issue 4 years ago • 1 comments

Feature description There are not relationship between models and what should be its submodels, in most cases. For example, there are no relationship between the model of wallets and the model of addresses.

Is your feature request related to a problem? Please describe. Indeed, its hard to have a centralized way to update/add/remove everything if we have so much independent models. Everybody that worked in QML models should take a look in their respective model(s) and check if this is done.

Describe the solution you'd like I will describe the solution I'd like with the models of wallets as an example:

The hierarchy should be the following:

ModelOfWallets
| - CollectionOfWallets
|   | - SingleWallet # 1
|   |   | - ModelOfAddresses
|   |   |   | - CollectionOfAddresses
|   |   |   |   | - SingleAddress # 1
|   |   |   |   | - SingleAddress # 2
|   | - SingleWallet # 2
|   ... ... ... ...
...

Resuming... The model of addresses shouldn't be independent of the model of wallets. Every wallet of the model of wallets should contain (composition) a model of addresses, and the model of addresses must be exposed as a role to QML. The same idea applies to the remaining Qt models.

Describe alternatives you've considered None, but we're open to ideas...

Additional context None.

Possible implementation Check this: https://github.com/lateo96/embedded-models

stdevCrow avatar Nov 04 '19 22:11 stdevCrow

@stdevCrow This is for second iteration, but is really important. We are facing some serious problems that are stopping us to make the release due to this.

stdevCrow avatar Nov 04 '19 22:11 stdevCrow