void WalletStack::setCurrentWallet(const QString& name)
{
    if (mapWalletViews.count(name) == 0) return;
    WalletView *walletView = mapWalletViews.value(name);
    setCurrentWidget(walletView);
    walletView->setEncryptionStatus();
}
Beispiel #2
0
void WalletStack::setCurrentWalletView(const QString& name)
{
    if (mapWalletViews.count(name) == 0) return;
    WalletView *walletView = mapWalletViews.value(name);
    setCurrentWidget(walletView);
    walletView->setEncryptionStatus();

    //Call the pages that have export and only set that connect
    QMap<QString, WalletView*>::const_iterator i;
    for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i)
    {
        bool x;
        if ( mapWalletViews.constBegin() == (i) )
            x=true;
        else
            x=false;

        if ((WalletView*)currentWidget() == i.value())
        {
          i.value()->gotoReceiveCoinsPage(true, true, x);
          i.value()->gotoHistoryPage(true, true, x);
          i.value()->gotoAddressBookPage(true, true, x);
        }
        else
        {
          i.value()->gotoReceiveCoinsPage(true, false, x);
          i.value()->gotoHistoryPage(true, false, x);
          i.value()->gotoAddressBookPage(true, false, x );
        }
     }
}
void WalletStack::setEncryptionStatus()
{
    WalletView *walletView = (WalletView*)currentWidget();
    if (walletView) walletView->setEncryptionStatus();
}