Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | void BitcoinGUI::createActions() { | ||||
sendCoinsAction = new QAction( | sendCoinsAction = new QAction( | ||||
platformStyle->SingleColorIcon(":/icons/send"), tr("&Send"), this); | platformStyle->SingleColorIcon(":/icons/send"), tr("&Send"), this); | ||||
sendCoinsAction->setStatusTip(tr("Send coins to a Bitcoin address")); | sendCoinsAction->setStatusTip(tr("Send coins to a Bitcoin address")); | ||||
sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); | sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); | ||||
sendCoinsAction->setCheckable(true); | sendCoinsAction->setCheckable(true); | ||||
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); | sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); | ||||
tabGroup->addAction(sendCoinsAction); | tabGroup->addAction(sendCoinsAction); | ||||
sendCoinsMenuAction = | sendCoinsMenuAction = new QAction(sendCoinsAction->text(), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/send"), | |||||
sendCoinsAction->text(), this); | |||||
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); | sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); | ||||
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); | sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); | ||||
receiveCoinsAction = new QAction( | receiveCoinsAction = new QAction( | ||||
platformStyle->SingleColorIcon(":/icons/receiving_addresses"), | platformStyle->SingleColorIcon(":/icons/receiving_addresses"), | ||||
tr("&Receive"), this); | tr("&Receive"), this); | ||||
receiveCoinsAction->setStatusTip( | receiveCoinsAction->setStatusTip( | ||||
tr("Request payments (generates QR codes and %1: URIs)") | tr("Request payments (generates QR codes and %1: URIs)") | ||||
.arg(QString::fromStdString( | .arg(QString::fromStdString( | ||||
config->GetChainParams().CashAddrPrefix()))); | config->GetChainParams().CashAddrPrefix()))); | ||||
receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); | receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); | ||||
receiveCoinsAction->setCheckable(true); | receiveCoinsAction->setCheckable(true); | ||||
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); | receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); | ||||
tabGroup->addAction(receiveCoinsAction); | tabGroup->addAction(receiveCoinsAction); | ||||
receiveCoinsMenuAction = | receiveCoinsMenuAction = new QAction(receiveCoinsAction->text(), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/receiving_addresses"), | |||||
receiveCoinsAction->text(), this); | |||||
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); | receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); | ||||
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); | receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); | ||||
historyAction = | historyAction = | ||||
new QAction(platformStyle->SingleColorIcon(":/icons/history"), | new QAction(platformStyle->SingleColorIcon(":/icons/history"), | ||||
tr("&Transactions"), this); | tr("&Transactions"), this); | ||||
historyAction->setStatusTip(tr("Browse transaction history")); | historyAction->setStatusTip(tr("Browse transaction history")); | ||||
historyAction->setToolTip(historyAction->statusTip()); | historyAction->setToolTip(historyAction->statusTip()); | ||||
Show All 26 Lines | #ifdef ENABLE_WALLET | ||||
connect(receiveCoinsMenuAction, &QAction::triggered, this, | connect(receiveCoinsMenuAction, &QAction::triggered, this, | ||||
&BitcoinGUI::gotoReceiveCoinsPage); | &BitcoinGUI::gotoReceiveCoinsPage); | ||||
connect(historyAction, &QAction::triggered, | connect(historyAction, &QAction::triggered, | ||||
[this] { showNormalIfMinimized(); }); | [this] { showNormalIfMinimized(); }); | ||||
connect(historyAction, &QAction::triggered, this, | connect(historyAction, &QAction::triggered, this, | ||||
&BitcoinGUI::gotoHistoryPage); | &BitcoinGUI::gotoHistoryPage); | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), | quitAction = new QAction(tr("E&xit"), this); | ||||
tr("E&xit"), this); | |||||
quitAction->setStatusTip(tr("Quit application")); | quitAction->setStatusTip(tr("Quit application")); | ||||
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); | quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); | ||||
quitAction->setMenuRole(QAction::QuitRole); | quitAction->setMenuRole(QAction::QuitRole); | ||||
aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), | aboutAction = new QAction(tr("&About %1").arg(PACKAGE_NAME), this); | ||||
tr("&About %1").arg(PACKAGE_NAME), this); | |||||
aboutAction->setStatusTip( | aboutAction->setStatusTip( | ||||
tr("Show information about %1").arg(PACKAGE_NAME)); | tr("Show information about %1").arg(PACKAGE_NAME)); | ||||
aboutAction->setMenuRole(QAction::AboutRole); | aboutAction->setMenuRole(QAction::AboutRole); | ||||
aboutAction->setEnabled(false); | aboutAction->setEnabled(false); | ||||
aboutQtAction = | aboutQtAction = new QAction(tr("About &Qt"), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), | |||||
tr("About &Qt"), this); | |||||
aboutQtAction->setStatusTip(tr("Show information about Qt")); | aboutQtAction->setStatusTip(tr("Show information about Qt")); | ||||
aboutQtAction->setMenuRole(QAction::AboutQtRole); | aboutQtAction->setMenuRole(QAction::AboutQtRole); | ||||
optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), | optionsAction = new QAction(tr("&Options..."), this); | ||||
tr("&Options..."), this); | |||||
optionsAction->setStatusTip( | optionsAction->setStatusTip( | ||||
tr("Modify configuration options for %1").arg(PACKAGE_NAME)); | tr("Modify configuration options for %1").arg(PACKAGE_NAME)); | ||||
optionsAction->setMenuRole(QAction::PreferencesRole); | optionsAction->setMenuRole(QAction::PreferencesRole); | ||||
optionsAction->setEnabled(false); | optionsAction->setEnabled(false); | ||||
toggleHideAction = | toggleHideAction = new QAction(tr("&Show / Hide"), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/about"), | |||||
tr("&Show / Hide"), this); | |||||
toggleHideAction->setStatusTip(tr("Show or hide the main Window")); | toggleHideAction->setStatusTip(tr("Show or hide the main Window")); | ||||
encryptWalletAction = | encryptWalletAction = new QAction(tr("&Encrypt Wallet..."), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/lock_closed"), | |||||
tr("&Encrypt Wallet..."), this); | |||||
encryptWalletAction->setStatusTip( | encryptWalletAction->setStatusTip( | ||||
tr("Encrypt the private keys that belong to your wallet")); | tr("Encrypt the private keys that belong to your wallet")); | ||||
encryptWalletAction->setCheckable(true); | encryptWalletAction->setCheckable(true); | ||||
backupWalletAction = | backupWalletAction = new QAction(tr("&Backup Wallet..."), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/filesave"), | |||||
tr("&Backup Wallet..."), this); | |||||
backupWalletAction->setStatusTip(tr("Backup wallet to another location")); | backupWalletAction->setStatusTip(tr("Backup wallet to another location")); | ||||
changePassphraseAction = | changePassphraseAction = new QAction(tr("&Change Passphrase..."), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/key"), | |||||
tr("&Change Passphrase..."), this); | |||||
changePassphraseAction->setStatusTip( | changePassphraseAction->setStatusTip( | ||||
tr("Change the passphrase used for wallet encryption")); | tr("Change the passphrase used for wallet encryption")); | ||||
signMessageAction = | signMessageAction = new QAction(tr("Sign &message..."), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/edit"), | |||||
tr("Sign &message..."), this); | |||||
signMessageAction->setStatusTip( | signMessageAction->setStatusTip( | ||||
tr("Sign messages with your Bitcoin addresses to prove you own them")); | tr("Sign messages with your Bitcoin addresses to prove you own them")); | ||||
verifyMessageAction = | verifyMessageAction = new QAction(tr("&Verify message..."), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/verify"), | |||||
tr("&Verify message..."), this); | |||||
verifyMessageAction->setStatusTip( | verifyMessageAction->setStatusTip( | ||||
tr("Verify messages to ensure they were signed with specified Bitcoin " | tr("Verify messages to ensure they were signed with specified Bitcoin " | ||||
"addresses")); | "addresses")); | ||||
m_load_psbt_action = new QAction(tr("Load PSBT..."), this); | m_load_psbt_action = new QAction(tr("Load PSBT..."), this); | ||||
m_load_psbt_action->setStatusTip( | m_load_psbt_action->setStatusTip( | ||||
tr("Load Partially Signed Bitcoin Transaction")); | tr("Load Partially Signed Bitcoin Transaction")); | ||||
openRPCConsoleAction = | openRPCConsoleAction = new QAction(tr("&Debug window"), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/debugwindow"), | |||||
tr("Node window"), this); | |||||
openRPCConsoleAction->setStatusTip( | openRPCConsoleAction->setStatusTip( | ||||
tr("Open node debugging and diagnostic console")); | tr("Open node debugging and diagnostic console")); | ||||
// initially disable the debug window menu item | // initially disable the debug window menu item | ||||
openRPCConsoleAction->setEnabled(false); | openRPCConsoleAction->setEnabled(false); | ||||
openRPCConsoleAction->setObjectName("openRPCConsoleAction"); | openRPCConsoleAction->setObjectName("openRPCConsoleAction"); | ||||
usedSendingAddressesAction = | usedSendingAddressesAction = new QAction(tr("&Sending addresses"), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/address-book"), | |||||
tr("&Sending addresses"), this); | |||||
usedSendingAddressesAction->setStatusTip( | usedSendingAddressesAction->setStatusTip( | ||||
tr("Show the list of used sending addresses and labels")); | tr("Show the list of used sending addresses and labels")); | ||||
usedReceivingAddressesAction = | usedReceivingAddressesAction = | ||||
new QAction(platformStyle->TextColorIcon(":/icons/address-book"), | new QAction(tr("&Receiving addresses"), this); | ||||
tr("&Receiving addresses"), this); | |||||
usedReceivingAddressesAction->setStatusTip( | usedReceivingAddressesAction->setStatusTip( | ||||
tr("Show the list of used receiving addresses and labels")); | tr("Show the list of used receiving addresses and labels")); | ||||
openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), | openAction = new QAction(tr("Open &URI..."), this); | ||||
tr("Open &URI..."), this); | |||||
openAction->setStatusTip( | openAction->setStatusTip( | ||||
tr("Open a %1: URI or payment request") | tr("Open a %1: URI or payment request") | ||||
.arg(QString::fromStdString( | .arg(QString::fromStdString( | ||||
config->GetChainParams().CashAddrPrefix()))); | config->GetChainParams().CashAddrPrefix()))); | ||||
m_open_wallet_action = new QAction(tr("Open Wallet"), this); | m_open_wallet_action = new QAction(tr("Open Wallet"), this); | ||||
m_open_wallet_action->setEnabled(false); | m_open_wallet_action->setEnabled(false); | ||||
m_open_wallet_action->setStatusTip(tr("Open a wallet")); | m_open_wallet_action->setStatusTip(tr("Open a wallet")); | ||||
m_open_wallet_menu = new QMenu(this); | m_open_wallet_menu = new QMenu(this); | ||||
m_close_wallet_action = new QAction(tr("Close Wallet..."), this); | m_close_wallet_action = new QAction(tr("Close Wallet..."), this); | ||||
m_close_wallet_action->setStatusTip(tr("Close wallet")); | m_close_wallet_action->setStatusTip(tr("Close wallet")); | ||||
m_create_wallet_action = new QAction(tr("Create Wallet..."), this); | m_create_wallet_action = new QAction(tr("Create Wallet..."), this); | ||||
m_create_wallet_action->setEnabled(false); | m_create_wallet_action->setEnabled(false); | ||||
m_create_wallet_action->setStatusTip(tr("Create a new wallet")); | m_create_wallet_action->setStatusTip(tr("Create a new wallet")); | ||||
showHelpMessageAction = | showHelpMessageAction = new QAction(tr("&Command-line options"), this); | ||||
new QAction(platformStyle->TextColorIcon(":/icons/info"), | |||||
tr("&Command-line options"), this); | |||||
showHelpMessageAction->setMenuRole(QAction::NoRole); | showHelpMessageAction->setMenuRole(QAction::NoRole); | ||||
showHelpMessageAction->setStatusTip( | showHelpMessageAction->setStatusTip( | ||||
tr("Show the %1 help message to get a list with possible Bitcoin " | tr("Show the %1 help message to get a list with possible Bitcoin " | ||||
"command-line options") | "command-line options") | ||||
.arg(PACKAGE_NAME)); | .arg(PACKAGE_NAME)); | ||||
connect(quitAction, &QAction::triggered, qApp, QApplication::quit); | connect(quitAction, &QAction::triggered, qApp, QApplication::quit); | ||||
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked); | connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked); | ||||
▲ Show 20 Lines • Show All 1,223 Lines • Show Last 20 Lines |