Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletframe.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "walletframe.h" | #include "walletframe.h" | ||||
#include "walletmodel.h" | #include "walletmodel.h" | ||||
#include "bitcoingui.h" | #include "bitcoingui.h" | ||||
#include "walletview.h" | #include "walletview.h" | ||||
#include <cassert> | |||||
#include <cstdio> | #include <cstdio> | ||||
#include <QHBoxLayout> | #include <QHBoxLayout> | ||||
#include <QLabel> | #include <QLabel> | ||||
WalletFrame::WalletFrame(const PlatformStyle *_platformStyle, | WalletFrame::WalletFrame(const PlatformStyle *_platformStyle, | ||||
const Config *configIn, BitcoinGUI *_gui) | const Config *configIn, BitcoinGUI *_gui) | ||||
: QFrame(_gui), gui(_gui), platformStyle(_platformStyle), config(configIn) { | : QFrame(_gui), gui(_gui), platformStyle(_platformStyle), config(configIn) { | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | bool WalletFrame::addWallet(WalletModel *walletModel) { | ||||
return true; | return true; | ||||
} | } | ||||
bool WalletFrame::setCurrentWallet(const QString &name) { | bool WalletFrame::setCurrentWallet(const QString &name) { | ||||
if (mapWalletViews.count(name) == 0) return false; | if (mapWalletViews.count(name) == 0) return false; | ||||
WalletView *walletView = mapWalletViews.value(name); | WalletView *walletView = mapWalletViews.value(name); | ||||
walletStack->setCurrentWidget(walletView); | walletStack->setCurrentWidget(walletView); | ||||
assert(walletView); | |||||
walletView->updateEncryptionStatus(); | walletView->updateEncryptionStatus(); | ||||
return true; | return true; | ||||
} | } | ||||
bool WalletFrame::removeWallet(const QString &name) { | bool WalletFrame::removeWallet(const QString &name) { | ||||
if (mapWalletViews.count(name) == 0) return false; | if (mapWalletViews.count(name) == 0) return false; | ||||
WalletView *walletView = mapWalletViews.take(name); | WalletView *walletView = mapWalletViews.take(name); | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |