fibercrypto / fibercrypto/fibercryptowallet

Fix the layout of Qt models

Open
#225 1 comment 0 reactions 1 assignee Assigned to @stdevCrow View on GitHub
enhancement good first issue help wanted qml_models stdev
Dominant language
Go
Stars
29
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.