refactor(@desktop/wallet): Connect list account and qml

This commit is contained in:
Anthony Laibe 2021-10-20 15:17:49 +02:00 committed by Iuri Matias
parent 4bbf19c470
commit 4bc61134c4
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,8 @@
import sequtils, sugar import NimQml, sequtils, sugar
import eventemitter import eventemitter
import ./io_interface, ./view, ./item, ./controller import ./io_interface, ./view, ./item, ./controller
import ../../../../core/global_singleton
import ../../../../../app_service/service/wallet_account/service as wallet_account_service import ../../../../../app_service/service/wallet_account/service as wallet_account_service
export io_interface export io_interface
@ -29,6 +30,8 @@ method delete*[T](self: Module[T]) =
self.controller.delete self.controller.delete
method load*[T](self: Module[T]) = method load*[T](self: Module[T]) =
singletonInstance.engine.setRootContextProperty("walletSectionAccounts", newQVariant(self.view))
let walletAccounts = self.controller.getWalletAccounts() let walletAccounts = self.controller.getWalletAccounts()
self.view.setItems( self.view.setItems(

View File

@ -6,7 +6,7 @@ QtObject {
id: root id: root
property var currentAccount: walletModel.accountsView.currentAccount property var currentAccount: walletModel.accountsView.currentAccount
property var accounts: walletModel.accountsView.accounts property var accounts: walletSectionAccounts.model
property string defaultCurrency: walletModel.balanceView.defaultCurrency property string defaultCurrency: walletModel.balanceView.defaultCurrency
property string totalFiatBalance: walletModel.balanceView.totalFiatBalance property string totalFiatBalance: walletModel.balanceView.totalFiatBalance