27 #endif // ENABLE_WALLET 40 #include <validation.h> 43 #include <QApplication> 46 #include <QDragEnterEvent> 47 #include <QListWidget> 50 #include <QMessageBox> 52 #include <QProgressDialog> 56 #include <QStackedWidget> 59 #include <QSystemTrayIcon> 63 #include <QVBoxLayout> 70 #elif defined(Q_OS_WIN) 80 trayIconMenu{
new QMenu()},
85 if (!restoreGeometry(settings.value(
"MainWindowGeometry").toByteArray())) {
87 move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
92 #endif // ENABLE_WALLET 106 #endif // ENABLE_WALLET 118 setAcceptDrops(
true);
131 if (QSystemTrayIcon::isSystemTrayAvailable()) {
140 statusBar()->setSizeGripEnabled(
false);
143 QFrame *frameBlocks =
new QFrame();
144 frameBlocks->setContentsMargins(0,0,0,0);
145 frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
146 QHBoxLayout *frameBlocksLayout =
new QHBoxLayout(frameBlocks);
147 frameBlocksLayout->setContentsMargins(3,0,3,0);
148 frameBlocksLayout->setSpacing(3);
157 frameBlocksLayout->addStretch();
159 frameBlocksLayout->addStretch();
164 frameBlocksLayout->addStretch();
166 frameBlocksLayout->addStretch();
168 frameBlocksLayout->addStretch();
180 QString curStyle = QApplication::style()->metaObject()->className();
181 if(curStyle ==
"QWindowsStyle" || curStyle ==
"QWindowsXPStyle")
183 progressBar->setStyleSheet(
"QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");
188 statusBar()->addPermanentWidget(frameBlocks);
191 this->installEventFilter(
this);
227 settings.setValue(
"MainWindowGeometry", saveGeometry());
231 delete m_app_nap_inhibitor;
241 QActionGroup *tabGroup =
new QActionGroup(
this);
245 overviewAction->setStatusTip(tr(
"Show general overview of wallet"));
263 receiveCoinsAction->setStatusTip(tr(
"Request payments (generates QR codes and bitcoin: URIs)"));
274 historyAction->setStatusTip(tr(
"Browse transaction history"));
277 historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
284 connect(
overviewAction, &QAction::triggered,
this, &BitcoinGUI::gotoOverviewPage);
286 connect(
sendCoinsAction, &QAction::triggered, [
this]{ gotoSendCoinsPage(); });
290 connect(
receiveCoinsAction, &QAction::triggered,
this, &BitcoinGUI::gotoReceiveCoinsPage);
294 connect(
historyAction, &QAction::triggered,
this, &BitcoinGUI::gotoHistoryPage);
295 #endif // ENABLE_WALLET 298 quitAction->setStatusTip(tr(
"Quit application"));
299 quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
306 aboutQtAction->setStatusTip(tr(
"Show information about Qt"));
316 encryptWalletAction->setStatusTip(tr(
"Encrypt the private keys that belong to your wallet"));
323 signMessageAction->setStatusTip(tr(
"Sign messages with your Bitcoin addresses to prove you own them"));
325 verifyMessageAction->setStatusTip(tr(
"Verify messages to ensure they were signed with specified Bitcoin addresses"));
342 openAction =
new QAction(tr(
"Open &URI..."),
this);
343 openAction->setStatusTip(tr(
"Open a bitcoin: URI"));
369 connect(
quitAction, &QAction::triggered, qApp, QApplication::quit);
371 connect(
aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt);
386 connect(
signMessageAction, &QAction::triggered, [
this]{ gotoSignMessageTab(); });
393 connect(
openAction, &QAction::triggered,
this, &BitcoinGUI::openClicked);
397 const std::string& path = i.first;
398 QString
name = path.empty() ? QString(
"["+tr(
"default wallet")+
"]") : QString::fromStdString(path);
402 name.replace(name.indexOf(QChar(
'&')), 1, QString(
"&&"));
407 action->setEnabled(
false);
411 connect(action, &QAction::triggered, [
this, path] {
415 activity->open(path);
420 action->setEnabled(
false);
437 #endif // ENABLE_WALLET 440 connect(
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D),
this), &QShortcut::activated,
this, &
BitcoinGUI::showDebugWindow);
454 QMenu *file =
appMenuBar->addMenu(tr(
"&File"));
461 file->addSeparator();
468 file->addSeparator();
472 QMenu *settings =
appMenuBar->addMenu(tr(
"&Settings"));
477 settings->addSeparator();
479 settings->addSeparator();
483 QMenu* window_menu =
appMenuBar->addMenu(tr(
"&Window"));
485 QAction* minimize_action = window_menu->addAction(tr(
"Minimize"));
486 minimize_action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
487 connect(minimize_action, &QAction::triggered, [] {
488 QApplication::activeWindow()->showMinimized();
490 connect(qApp, &QApplication::focusWindowChanged, [minimize_action] (QWindow* window) {
491 minimize_action->setEnabled(window !=
nullptr && (window->flags() & Qt::Dialog) != Qt::Dialog && window->windowState() != Qt::WindowMinimized);
495 QAction* zoom_action = window_menu->addAction(tr(
"Zoom"));
496 connect(zoom_action, &QAction::triggered, [] {
497 QWindow* window = qApp->focusWindow();
498 if (window->windowState() != Qt::WindowMaximized) {
499 window->showMaximized();
501 window->showNormal();
505 connect(qApp, &QApplication::focusWindowChanged, [zoom_action] (QWindow* window) {
506 zoom_action->setEnabled(window !=
nullptr);
512 window_menu->addSeparator();
513 QAction* main_window_action = window_menu->addAction(tr(
"Main Window"));
514 connect(main_window_action, &QAction::triggered, [
this] {
518 window_menu->addSeparator();
523 window_menu->addSeparator();
527 connect(tab_action, &QAction::triggered, [
this, tab_type] {
535 help->addSeparator();
544 QToolBar *toolbar = addToolBar(tr(
"Tabs toolbar"));
546 toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
547 toolbar->setMovable(
false);
548 toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
556 QWidget *spacer =
new QWidget();
557 spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
558 toolbar->addWidget(spacer);
562 connect(
m_wallet_selector,
static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
this, &BitcoinGUI::setCurrentWalletBySelectorIndex);
597 this->
message(title, message, style);
612 #endif // ENABLE_WALLET 638 #endif // ENABLE_WALLET 647 assert(wallet_controller);
659 addWallet(wallet_model);
668 void BitcoinGUI::addWallet(
WalletModel* walletModel)
683 void BitcoinGUI::removeWallet(
WalletModel* walletModel)
704 void BitcoinGUI::setCurrentWallet(
WalletModel* wallet_model)
717 void BitcoinGUI::setCurrentWalletBySelectorIndex(
int index)
720 if (wallet_model) setCurrentWallet(wallet_model);
723 void BitcoinGUI::removeAllWallets()
730 #endif // ENABLE_WALLET 754 assert(QSystemTrayIcon::isSystemTrayAvailable());
757 if (QSystemTrayIcon::isSystemTrayAvailable()) {
797 #ifndef Q_OS_MAC // This is built-in on macOS 806 if(reason == QSystemTrayIcon::Trigger)
813 void BitcoinGUI::macosDockIconActivated()
852 void BitcoinGUI::openClicked()
861 void BitcoinGUI::gotoOverviewPage()
867 void BitcoinGUI::gotoHistoryPage()
873 void BitcoinGUI::gotoReceiveCoinsPage()
879 void BitcoinGUI::gotoSendCoinsPage(QString addr)
885 void BitcoinGUI::gotoSignMessageTab(QString addr)
890 void BitcoinGUI::gotoVerifyMessageTab(QString addr)
894 void BitcoinGUI::gotoLoadPSBT(
bool from_clipboard)
898 #endif // ENABLE_WALLET 906 case 0: icon =
":/icons/connect_0";
break;
907 case 1:
case 2:
case 3: icon =
":/icons/connect_1";
break;
908 case 4:
case 5:
case 6: icon =
":/icons/connect_2";
break;
909 case 7:
case 8:
case 9: icon =
":/icons/connect_3";
break;
910 default: icon =
":/icons/connect_4";
break;
916 tooltip = tr(
"%n active connection(s) to Bitcoin network",
"", count) + QString(
".<br>") + tr(
"Click to disable network activity.");
918 tooltip = tr(
"Network activity disabled.") + QString(
"<br>") + tr(
"Click to enable network activity again.");
919 icon =
":/icons/network_disabled";
923 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
945 progressBarLabel->setText(tr(
"Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight,
'f', 1)));
964 m_app_nap_inhibitor->enableAppNap();
966 m_app_nap_inhibitor->disableAppNap();
981 statusBar()->clearMessage();
985 switch (blockSource) {
1014 QDateTime currentDate = QDateTime::currentDateTime();
1015 qint64 secs = blockDate.secsTo(currentDate);
1017 tooltip = tr(
"Processed %n block(s) of transaction history.",
"", count);
1021 tooltip = tr(
"Up to date") + QString(
".<br>") + tooltip;
1024 #ifdef ENABLE_WALLET 1030 #endif // ENABLE_WALLET 1040 progressBar->setFormat(tr(
"%1 behind").arg(timeBehindText));
1042 progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
1045 tooltip = tr(
"Catching up...") + QString(
"<br>") + tooltip;
1049 ":/animation/spinner-%1").arg(
spinnerFrame, 3, 10, QChar(
'0')))
1055 #ifdef ENABLE_WALLET 1061 #endif // ENABLE_WALLET 1063 tooltip += QString(
"<br>");
1064 tooltip += tr(
"Last received block was generated %1 ago.").arg(timeBehindText);
1065 tooltip += QString(
"<br>");
1066 tooltip += tr(
"Transactions after this will not yet be visible.");
1070 tooltip = QString(
"<nobr>") + tooltip + QString(
"</nobr>");
1082 int nMBoxIcon = QMessageBox::Information;
1086 if (!title.isEmpty()) {
1091 msgType = tr(
"Error");
1092 message = tr(
"Error: %1").arg(message);
1095 msgType = tr(
"Warning");
1096 message = tr(
"Warning: %1").arg(message);
1099 msgType = tr(
"Information");
1107 if (!msgType.isEmpty()) {
1108 strTitle +=
" - " + msgType;
1112 nMBoxIcon = QMessageBox::Critical;
1115 nMBoxIcon = QMessageBox::Warning;
1121 QMessageBox::StandardButton buttons;
1123 buttons = QMessageBox::Ok;
1126 QMessageBox mBox(static_cast<QMessageBox::Icon>(nMBoxIcon), strTitle, message, buttons,
this);
1127 mBox.setTextFormat(Qt::PlainText);
1128 mBox.setDetailedText(detailed_message);
1129 int r = mBox.exec();
1131 *ret = r == QMessageBox::Ok;
1133 notificator->
notify(static_cast<Notificator::Class>(nNotifyIcon), strTitle, message);
1139 QMainWindow::changeEvent(e);
1140 #ifndef Q_OS_MAC // Ignored on Mac 1141 if(e->type() == QEvent::WindowStateChange)
1145 QWindowStateChangeEvent *wsevt =
static_cast<QWindowStateChangeEvent*
>(e);
1146 if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
1148 QTimer::singleShot(0,
this, &BitcoinGUI::hide);
1151 else if((wsevt->oldState() & Qt::WindowMinimized) && !isMinimized())
1153 QTimer::singleShot(0,
this, &BitcoinGUI::show);
1163 #ifndef Q_OS_MAC // Ignored on Mac 1171 QApplication::quit();
1175 QMainWindow::showMinimized();
1180 QMainWindow::closeEvent(event);
1192 #ifdef ENABLE_WALLET 1193 void BitcoinGUI::incomingTransaction(
const QString& date,
int unit,
const CAmount& amount,
const QString& type,
const QString& address,
const QString& label,
const QString& walletName)
1196 QString msg = tr(
"Date: %1\n").arg(date) +
1199 msg += tr(
"Wallet: %1\n").arg(walletName);
1201 msg += tr(
"Type: %1\n").arg(type);
1202 if (!label.isEmpty())
1203 msg += tr(
"Label: %1\n").arg(label);
1204 else if (!address.isEmpty())
1205 msg += tr(
"Address: %1\n").arg(address);
1206 message((amount)<0 ? tr(
"Sent transaction") : tr(
"Incoming transaction"),
1209 #endif // ENABLE_WALLET 1214 if(event->mimeData()->hasUrls())
1215 event->acceptProposedAction();
1220 if(event->mimeData()->hasUrls())
1222 for (
const QUrl &uri : event->mimeData()->urls())
1227 event->acceptProposedAction();
1233 if (event->type() == QEvent::StatusTip)
1239 return QMainWindow::eventFilter(
object, event);
1242 #ifdef ENABLE_WALLET 1249 gotoSendCoinsPage();
1255 void BitcoinGUI::setHDStatus(
bool privkeyDisabled,
int hdEnabled)
1258 labelWalletHDStatusIcon->setToolTip(privkeyDisabled ? tr(
"Private key <b>disabled</b>") : hdEnabled ? tr(
"HD key generation is <b>enabled</b>") : tr(
"HD key generation is <b>disabled</b>"));
1264 void BitcoinGUI::setEncryptionStatus(
int status)
1293 void BitcoinGUI::updateWalletStatus()
1306 #endif // ENABLE_WALLET 1310 std::string ip_port;
1313 if (proxy_enabled) {
1315 QString ip_port_q = QString::fromStdString(ip_port);
1317 labelProxyIcon->setToolTip(tr(
"Proxy is <b>enabled</b>: %1").arg(ip_port_q));
1329 #ifdef ENABLE_WALLET 1332 if (wallet_model && !wallet_model->
getWalletName().isEmpty()) {
1340 setWindowTitle(window_title);
1372 if (nProgress == 0) {
1379 }
else if (nProgress == 100) {
1404 QString detailed_message;
1406 detailed_message = BitcoinGUI::tr(
"Original message:") +
"\n" + QString::fromStdString(message.
original);
1410 bool invoked = QMetaObject::invokeMethod(gui,
"message",
1412 Q_ARG(QString, QString::fromStdString(caption)),
1413 Q_ARG(QString, QString::fromStdString(message.
translated)),
1414 Q_ARG(
unsigned int, style),
1416 Q_ARG(QString, detailed_message));
1442 optionsModel(nullptr),
1446 setToolTip(tr(
"Unit to show amounts in. Click to select another unit."));
1449 const QFontMetrics fm(font());
1454 setMinimumSize(max_width, 0);
1455 setAlignment(Qt::AlignRight | Qt::AlignVCenter);
1456 setStyleSheet(QString(
"QLabel { color : %1 }").arg(platformStyle->
SingleColor().name()));
1468 menu =
new QMenu(
this);
1472 menuAction->setData(QVariant(u));
1473 menu->addAction(menuAction);
1502 QPoint globalPos = mapToGlobal(point);
1503 menu->exec(globalPos);
virtual bool privateKeysDisabled()=0
void subscribeToCoreSignals()
Connect core signals to GUI client.
void unsubscribeFromCoreSignals()
Disconnect core signals from GUI client.
void showEvent(QShowEvent *event) override
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void setNetworkActive(bool networkActive)
Set network state shown in the UI.
void addWallet(WalletModel *const walletModel)
WalletModel * currentWalletModel() const
QAction * receiveCoinsAction
UnitDisplayStatusBarControl * unitDisplayControl
Local Bitcoin RPC console.
interfaces::Wallet & wallet() const
QAction * m_mask_values_action
QAction * signMessageAction
void receivedURI(const QString &uri)
Signal raised when a URI was entered or dragged to the GUI.
SynchronizationState
Current sync state passed to tip changed callbacks.
virtual bool getNetworkActive()=0
Get network active.
void updateNetworkState()
Update UI with latest network info from model.
QLabel * labelWalletHDStatusIcon
void showNormalIfMinimized()
Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHid...
UnitDisplayStatusBarControl(const PlatformStyle *platformStyle)
QProgressDialog * progressDialog
static bool isWalletEnabled()
void consoleShown(RPCConsole *console)
Signal raised when RPC console shown.
void createTrayIcon()
Create system tray icon and notification.
void showDebugWindow()
Show debug window.
GUIUtil::ClickableLabel * labelProxyIcon
ClientModel * clientModel
void createToolBars()
Create the toolbars.
int TextWidth(const QFontMetrics &fm, const QString &text)
Returns the distance in pixels appropriate for drawing a subsequent character after text...
void setCurrentWallet(WalletModel *wallet_model)
QAction * m_load_psbt_action
void closeAllWallets(QWidget *parent=nullptr)
void setClientModel(ClientModel *model=nullptr, int bestblock_height=0, int64_t bestblock_date=0, double verification_progress=0.0)
ModalOverlay * modalOverlay
void createTrayIconMenu()
Create system tray menu (or setup the dock menu)
QAction * m_wallet_selector_action
void opened(WalletModel *wallet_model)
QAction * verifyMessageAction
static constexpr int HEADER_HEIGHT_DELTA_SYNC
The required delta of headers to the estimated number of available headers until we show the IBD prog...
QAction * m_open_wallet_action
void triggered(bool hidden)
void usedReceivingAddresses()
Show used receiving addresses.
QAction * m_close_wallet_action
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const bilingual_str &message, const std::string &caption, unsigned int style)
void tipUpdate(int count, const QDateTime &blockDate, double nVerificationProgress)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
void setWalletActionsEnabled(bool enabled)
Enable or disable all wallet-related actions.
void networkActiveChanged(bool networkActive)
void setClientModel(ClientModel *clientModel=nullptr, interfaces::BlockAndHeaderTipInfo *tip_info=nullptr)
Set the client model.
Controller between interfaces::Node, WalletModel instances and the GUI.
OptionsModel * getOptionsModel()
bool getShowTrayIcon() const
QMenu * m_open_wallet_menu
macOS-specific Dock icon handler.
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated...
bool isLayerVisible() const
HelpMessageDialog * helpMessageDialog
QLabel * progressBarLabel
QSystemTrayIcon * trayIcon
void numBlocksChanged(int count, const QDateTime &blockDate, double nVerificationProgress, bool header, SynchronizationState sync_state)
QAction * showHelpMessageAction
Notify user of potential problem.
Modal overlay to display information about the chain-sync state.
bool isPrivacyModeActivated() const
const QString & getTitleAddText() const
void changeEvent(QEvent *e) override
static QString longName(int unit)
Long name.
void numConnectionsChanged(int count)
Signals for UI communication.
GUIUtil::ClickableLabel * connectionsControl
QAction * backupWalletAction
QAction * m_load_psbt_clipboard_action
void setOptionsModel(OptionsModel *optionsModel)
Lets the control know about the Options Model (and its signals)
void dropEvent(QDropEvent *event) override
void bringToFront(QWidget *w)
std::map< std::string, bool > listWalletDir() const
Returns all wallet names in the wallet dir mapped to whether the wallet is loaded.
QString tabTitle(TabTypes tab_type) const
void openOptionsDialogWithTab(OptionsDialog::Tab tab)
Open the OptionsDialog on the specified tab index.
EncryptionStatus getEncryptionStatus() const
int getDisplayUnit() const
virtual std::unique_ptr< Handler > handleMessageBox(MessageBoxFn fn)=0
Force blocking, modal message box dialog (not just OS notification)
void showOutOfSyncWarning(bool fShow)
void gotoHistoryPage()
Switch to history (transactions) page.
QAction * usedReceivingAddressesAction
int64_t CAmount
Amount in satoshis (Can be negative)
WalletModel * getWalletModel()
const NetworkStyle *const m_network_style
WalletController * m_wallet_controller
void gotoOverviewPage()
Switch to overview (home) page.
const PlatformStyle * platformStyle
QAction * toggleHideAction
virtual bool hdEnabled()=0
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
static MacDockIconHandler * instance()
void setDisplayUnit(const QVariant &value)
Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal.
void setClientModel(ClientModel *clientModel)
bool isObscured(QWidget *w)
QAction * m_wallet_selector_label_action
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
OptionsModel * optionsModel
void created(WalletModel *wallet_model)
QLabel * m_wallet_selector_label
enum BlockSource getBlockSource() const
Returns enum BlockSource of the current importing/syncing state.
void setKnownBestHeight(int count, const QDateTime &blockDate)
void optionsClicked()
Show configuration dialog.
void setNumBlocks(int count, const QDateTime &blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state)
Set number of blocks and last block date shown in the UI.
void closeWallet(WalletModel *wallet_model, QWidget *parent=nullptr)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
bool HasPixmap(const QLabel *label)
Returns true if pixmap has been set.
void handleCloseWindowShortcut(QWidget *w)
void notify(Class cls, const QString &title, const QString &text, const QIcon &icon=QIcon(), int millisTimeout=10000)
Show notification message.
WalletFrame * walletFrame
void updateDisplayUnit(int newUnits)
When Display Units are changed on OptionsModel it will refresh the display text of the control on the...
WalletView * currentWalletView() const
QAction * usedSendingAddressesAction
void setTabFocus(enum TabTypes tabType)
set which tab has the focus (is visible)
int64_t nPowTargetSpacing
BitcoinGUI(interfaces::Node &node, const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=nullptr)
void setModel(OptionsModel *model)
QAction * openRPCConsoleAction
QAction * m_close_all_wallets_action
std::vector< TabTypes > tabs() const
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=SeparatorStyle::STANDARD)
Format as string (with unit)
void detectShutdown()
called by a timer to check if ShutdownRequested() has been set
Cross-platform desktop notification client.
void clicked(const QPoint &point)
Emitted when the label is clicked.
Block and header tip information.
QLabel * labelWalletEncryptionIcon
GUIUtil::ClickableLabel * labelBlocksIcon
void setCurrentTab(OptionsDialog::Tab tab)
GUIUtil::ClickableProgressBar * progressBar
void showHelpMessageClicked()
Show help message dialog.
QString getWalletName() const
void walletAdded(WalletModel *wallet_model)
Notificator * notificator
void displayUnitChanged(int unit)
void PolishProgressDialog(QProgressDialog *dialog)
void changePassphrase()
Change encrypted wallet passphrase.
Model for Bitcoin network client.
const QIcon & getTrayAndWindowIcon() const
void mousePressEvent(QMouseEvent *event) override
So that it responds to left-button clicks.
QAction * receiveCoinsMenuAction
ClickableProgressBar ProgressBar
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
virtual bool shutdownRequested()=0
Return whether shutdown was requested.
QAction * sendCoinsAction
void showHide(bool hide=false, bool userRequested=false)
QAction * m_create_wallet_action
QKeySequence tabShortcut(TabTypes tab_type) const
static const int STATUSBAR_ICONSIZE
void message(const QString &title, QString message, unsigned int style, bool *ret=nullptr, const QString &detailed_message=QString())
Notify the user of an event from the core network or transaction handling code.
void requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
static QList< Unit > availableUnits()
Get list of units, for drop-down box.
void trayIconActivated(QSystemTrayIcon::ActivationReason reason)
Handle tray icon clicked.
double verification_progress
bool getMinimizeOnClose() const
void updateProxyIcon()
Set the proxy-enabled icon as shown in the UI.
QAction * changePassphraseAction
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
virtual std::unique_ptr< Handler > handleQuestion(QuestionFn fn)=0
void encryptWallet()
Encrypt the wallet.
void gotoReceiveCoinsPage()
Switch to receive coins page.
std::vector< WalletModel * > getOpenWallets() const
Returns wallet models currently open.
const std::unique_ptr< QMenu > trayIconMenu
void setPrivacy(bool privacy)
virtual WalletClient & walletClient()=0
Get wallet client.
Interface from Qt to configuration data structure for Bitcoin client.
std::unique_ptr< interfaces::Handler > m_handler_question
const CChainParams & Params()
Return the currently selected parameters.
bool getMinimizeToTray() const
Interface to Bitcoin wallet from Qt view code.
QAction * sendCoinsMenuAction
bool eventFilter(QObject *object, QEvent *event) override
int prevBlocks
Keep track of previous number of blocks, to detect progress.
void toggleHidden()
Simply calls showNormalIfMinimized(true) for use in SLOT() macro.
interfaces::Node & m_node
void walletRemoved(WalletModel *wallet_model)
void removeWallet(WalletModel *const walletModel)
bool addWallet(WalletModel *walletModel)
void setNumConnections(int count)
Set number of connections shown in the UI.
QString getDisplayName() const
"Help message" dialog box
void backupWallet()
Backup the wallet.
void closeEvent(QCloseEvent *event) override
QComboBox * m_wallet_selector
void clicked(const QPoint &point)
Emitted when the progressbar is clicked.
QString formatNiceTimeOffset(qint64 secs)
void createContextMenu()
Creates context menu, its actions, and wires up all the relevant signals for mouse events...
void showDebugWindowActivateConsole()
Show debug window and set focus to the console.
void createActions()
Create the main UI actions.
QAction * encryptWalletAction
void aboutClicked()
Show about dialog.
const Consensus::Params & GetConsensus() const
void removeWallet(WalletModel *wallet_model)
int getHeaderTipHeight() const
void updateHeadersSyncProgressLabel()
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
int64_t GetTime()
Return system time (or mocked time, if set)
static const std::string DEFAULT_UIPLATFORM
virtual void setNetworkActive(bool active)=0
Set network active.
int64_t getHeaderTipTime() const
Top-level interface for a bitcoin node (bitcoind process).
static constexpr int64_t MAX_BLOCK_TIME_GAP
Maximum gap between node time and block time used for the "Catching up..." mode in GUI...
A container for embedding all wallet-related controls into BitcoinGUI.
void showProgress(const QString &title, int nProgress)
void usedSendingAddresses()
Show used sending addresses.
void onDisplayUnitsClicked(const QPoint &point)
Shows context menu with Display Unit options by the mouse coordinates.
void createMenuBar()
Create the menu bar and sub-menus.
void onMenuSelection(QAction *action)
Tells underlying optionsModel to update its current display unit.
std::unique_ptr< interfaces::Handler > m_handler_message_box
void showTrayIconChanged(bool)
Predefined combinations for certain default usage cases.
void dragEnterEvent(QDragEnterEvent *event) override
virtual std::vector< std::unique_ptr< Wallet > > getWallets()=0
Return interfaces for accessing wallets (if any).
bool getProxyInfo(std::string &ip_port) const