Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | #endif | ||||
; | ; | ||||
/** | /** | ||||
* Display name for default wallet name. Uses tilde to avoid name collisions in | * Display name for default wallet name. Uses tilde to avoid name collisions in | ||||
* the future with additional wallets | * the future with additional wallets | ||||
*/ | */ | ||||
const QString BitcoinGUI::DEFAULT_WALLET = "~Default"; | const QString BitcoinGUI::DEFAULT_WALLET = "~Default"; | ||||
BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, | BitcoinGUI::BitcoinGUI(const Config *cfg, const PlatformStyle *_platformStyle, | ||||
const NetworkStyle *networkStyle, QWidget *parent) | const NetworkStyle *networkStyle, QWidget *parent) | ||||
: QMainWindow(parent), enableWallet(false), clientModel(0), walletFrame(0), | : QMainWindow(parent), enableWallet(false), clientModel(0), walletFrame(0), | ||||
unitDisplayControl(0), labelWalletEncryptionIcon(0), | unitDisplayControl(0), labelWalletEncryptionIcon(0), | ||||
labelWalletHDStatusIcon(0), connectionsControl(0), labelBlocksIcon(0), | labelWalletHDStatusIcon(0), connectionsControl(0), labelBlocksIcon(0), | ||||
progressBarLabel(0), progressBar(0), progressDialog(0), appMenuBar(0), | progressBarLabel(0), progressBar(0), progressDialog(0), appMenuBar(0), | ||||
overviewAction(0), historyAction(0), quitAction(0), sendCoinsAction(0), | overviewAction(0), historyAction(0), quitAction(0), sendCoinsAction(0), | ||||
sendCoinsMenuAction(0), usedSendingAddressesAction(0), | sendCoinsMenuAction(0), usedSendingAddressesAction(0), | ||||
usedReceivingAddressesAction(0), signMessageAction(0), | usedReceivingAddressesAction(0), signMessageAction(0), | ||||
verifyMessageAction(0), aboutAction(0), receiveCoinsAction(0), | verifyMessageAction(0), aboutAction(0), receiveCoinsAction(0), | ||||
receiveCoinsMenuAction(0), optionsAction(0), toggleHideAction(0), | receiveCoinsMenuAction(0), optionsAction(0), toggleHideAction(0), | ||||
encryptWalletAction(0), backupWalletAction(0), changePassphraseAction(0), | encryptWalletAction(0), backupWalletAction(0), changePassphraseAction(0), | ||||
aboutQtAction(0), openRPCConsoleAction(0), openAction(0), | aboutQtAction(0), openRPCConsoleAction(0), openAction(0), | ||||
showHelpMessageAction(0), trayIcon(0), trayIconMenu(0), notificator(0), | showHelpMessageAction(0), trayIcon(0), trayIconMenu(0), notificator(0), | ||||
rpcConsole(0), helpMessageDialog(0), modalOverlay(0), prevBlocks(0), | rpcConsole(0), helpMessageDialog(0), modalOverlay(0), prevBlocks(0), | ||||
spinnerFrame(0), platformStyle(_platformStyle) { | spinnerFrame(0), platformStyle(_platformStyle), cfg(cfg) { | ||||
GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this); | GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this); | ||||
QString windowTitle = tr(PACKAGE_NAME) + " - "; | QString windowTitle = tr(PACKAGE_NAME) + " - "; | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
enableWallet = WalletModel::isWalletEnabled(); | enableWallet = WalletModel::isWalletEnabled(); | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
if (enableWallet) { | if (enableWallet) { | ||||
windowTitle += tr("Wallet"); | windowTitle += tr("Wallet"); | ||||
Show All 15 Lines | #if defined(Q_OS_MAC) && QT_VERSION < 0x050000 | ||||
setUnifiedTitleAndToolBarOnMac(true); | setUnifiedTitleAndToolBarOnMac(true); | ||||
#endif | #endif | ||||
rpcConsole = new RPCConsole(_platformStyle, 0); | rpcConsole = new RPCConsole(_platformStyle, 0); | ||||
helpMessageDialog = new HelpMessageDialog(this, false); | helpMessageDialog = new HelpMessageDialog(this, false); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
if (enableWallet) { | if (enableWallet) { | ||||
/** Create wallet frame and make it the central widget */ | /** Create wallet frame and make it the central widget */ | ||||
walletFrame = new WalletFrame(_platformStyle, this); | walletFrame = new WalletFrame(_platformStyle, cfg, this); | ||||
setCentralWidget(walletFrame); | setCentralWidget(walletFrame); | ||||
} else | } else | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
{ | { | ||||
/** | /** | ||||
* When compiled without wallet or -disablewallet is provided, the | * When compiled without wallet or -disablewallet is provided, the | ||||
* central widget is the rpc console. | * central widget is the rpc console. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 568 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void BitcoinGUI::showHelpMessageClicked() { | void BitcoinGUI::showHelpMessageClicked() { | ||||
helpMessageDialog->show(); | helpMessageDialog->show(); | ||||
} | } | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
void BitcoinGUI::openClicked() { | void BitcoinGUI::openClicked() { | ||||
OpenURIDialog dlg(this); | OpenURIDialog dlg(cfg, this); | ||||
if (dlg.exec()) { | if (dlg.exec()) { | ||||
Q_EMIT receivedURI(dlg.getURI()); | Q_EMIT receivedURI(dlg.getURI()); | ||||
} | } | ||||
} | } | ||||
void BitcoinGUI::gotoOverviewPage() { | void BitcoinGUI::gotoOverviewPage() { | ||||
overviewAction->setChecked(true); | overviewAction->setChecked(true); | ||||
if (walletFrame) walletFrame->gotoOverviewPage(); | if (walletFrame) walletFrame->gotoOverviewPage(); | ||||
▲ Show 20 Lines • Show All 574 Lines • Show Last 20 Lines |