PRCYCoin  2.0.0.7rc1
P2P Digital Currency
bitcoingui.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2014 The Bitcoin developers
2 // Copyright (c) 2014-2015 The Dash developers
3 // Copyright (c) 2015-2018 The PIVX developers
4 // Copyright (c) 2018-2020 The DAPS Project developers
5 // Distributed under the MIT/X11 software license, see the accompanying
6 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
7 
8 #include "bitcoingui.h"
9 
10 #include "bitcoinunits.h"
11 #include "clientmodel.h"
12 #include "guiconstants.h"
13 #include "guiutil.h"
14 #include "miner.h"
15 #include "networkstyle.h"
16 #include "notificator.h"
17 #include "openuridialog.h"
18 #include "optionsdialog.h"
19 #include "optionsmodel.h"
20 #include "overviewpage.h"
21 #include "rpcconsole.h"
22 #include "utilitydialog.h"
23 #include "masternode-sync.h"
24 
25 #ifdef ENABLE_WALLET
26 #include "blockexplorer.h"
27 #include "walletframe.h"
28 #include "walletmodel.h"
29 #endif // ENABLE_WALLET
30 
31 #ifdef Q_OS_MAC
32 #include "macdockiconhandler.h"
33 #endif
34 
35 #include "init.h"
36 #include "masternodelist.h"
37 #include "guiinterface.h"
38 #include "util.h"
39 
40 #include <iostream>
41 
42 #include <QAction>
43 #include <QApplication>
44 #include <QDateTime>
45 #include <QDesktopWidget>
46 #include <QDragEnterEvent>
47 #include <QIcon>
48 #include <QListWidget>
49 #include <QMenuBar>
50 #include <QMessageBox>
51 #include <QMimeData>
52 #include <QMouseEvent>
53 #include <QCursor>
54 #include <QSettings>
55 #include <QStackedWidget>
56 #include <QStyle>
57 #include <QTimer>
58 #include <QTextEdit>
59 #include <QToolBar>
60 #include <QVBoxLayout>
61 #include <QPushButton>
62 #include <QDesktopServices>
63 #include <QNetworkAccessManager>
64 #include <QUrlQuery>
65 
66 #define BASE_WINDOW_WIDTH 800
67 #define BASE_WINDOW_HEIGHT 768
68 #define BASE_WINDOW_MIN_HEIGHT 600
69 
70 const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
71 
72 BitcoinGUI::BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent) : QMainWindow(parent),
73  clientModel(0),
74  walletFrame(0),
75  unitDisplayControl(0),
76  labelStakingIcon(0),
77  labelEncryptionIcon(0),
78  labelTorIcon(0),
79  labelConnectionsIcon(0),
80  labelBlocksIcon(0),
81  appMenuBar(0),
82  overviewAction(0),
83  historyAction(0),
84  masternodeAction(0),
85  quitAction(0),
86  sendCoinsAction(0),
87  usedSendingAddressesAction(0),
88  usedReceivingAddressesAction(0),
89  aboutAction(0),
90  receiveCoinsAction(0),
91  // privacyAction(0),
92  optionsAction(0),
93  toggleHideAction(0),
94  encryptWalletAction(0),
95  backupWalletAction(0),
96  changePassphraseAction(0),
97  aboutQtAction(0),
98  openRPCConsoleAction(0),
99  openAction(0),
100  showHelpMessageAction(0),
101  multiSendAction(0),
102  trayIcon(0),
103  trayIconMenu(0),
104  notificator(0),
105  rpcConsole(0),
106  explorerWindow(0),
107  prevBlocks(0),
108  spinnerFrame(0),
109  m_previousPos(0,0),
110  m_fMousePress(0)
111 {
112  /* Open CSS when configured */
113  this->setStyleSheet(GUIUtil::loadStyleSheet());
114 
115  this->setMinimumSize(BASE_WINDOW_WIDTH, BASE_WINDOW_MIN_HEIGHT);
116 
117  // Adapt screen size
118  QRect rec = QApplication::desktop()->screenGeometry();
119  int adaptedHeight = (rec.height() < BASE_WINDOW_HEIGHT) ? BASE_WINDOW_MIN_HEIGHT : BASE_WINDOW_HEIGHT;
121  "nWindow",
122  QSize(BASE_WINDOW_WIDTH, adaptedHeight),
123  this
124  );
125 
126  QString windowTitle = tr("PRivaCY Coin") + " ";
127  fLiteMode = GetBoolArg("-litemode", false);
128 #ifdef ENABLE_WALLET
129  /* if compiled with wallet support, -disablewallet can still disable the wallet */
130  enableWallet = !GetBoolArg("-disablewallet", false);
131 #else
132  enableWallet = false;
133 #endif // ENABLE_WALLET
134  if (enableWallet) {
135  windowTitle += tr("Wallet");
136  } else {
137  windowTitle += tr("Node");
138  }
139  if (fLiteMode) {
140  windowTitle += tr(" - Lite Mode");
141  }
142  QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", ""));
143  if (!userWindowTitle.isEmpty()) windowTitle += " - " + userWindowTitle;
144  windowTitle += " " + networkStyle->getTitleAddText();
145  QApplication::setWindowIcon(networkStyle->getAppIcon());
146  setWindowIcon(networkStyle->getAppIcon());
147  setWindowTitle(windowTitle);
148 
149  rpcConsole = new RPCConsole(enableWallet ? this : 0);
150 #ifdef ENABLE_WALLET
151  if (enableWallet) {
153  walletFrame = new WalletFrame(this);
154  explorerWindow = new BlockExplorer(this);
155  } else
156 #endif // ENABLE_WALLET
157  {
158  /* When compiled without wallet or -disablewallet is provided,
159  * the central widget is the rpc console.
160  */
161  setCentralWidget(rpcConsole);
162  }
163 
164  // Accept D&D of URIs
165  setAcceptDrops(true);
166 
167  // Create actions for the toolbar, menu bar and tray/dock icon
168  // Needs walletFrame to be initialized
169  createActions(networkStyle);
170 
171  // Create application menu bar
172  createMenuBar();
173 
174  // Create the toolbars
175  createToolBars();
176 
177  // Create system tray icon and notification
178  createTrayIcon(networkStyle);
179 
180  // Status bar notification icons
181  frameBlocks = new QFrame();
182  frameBlocks->setContentsMargins(0, 0, 0, 0);
183  frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
184  QHBoxLayout* frameBlocksLayout = new QHBoxLayout(frameBlocks);
185  frameBlocksLayout->setContentsMargins(3, 0, 3, 0);
186  frameBlocksLayout->setSpacing(3);
188  labelStakingIcon = new QLabel();
189  labelEncryptionIcon = new QPushButton();
190  labelEncryptionIcon->setFlat(true); // Make the button look like a label, but clickable
191  labelEncryptionIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}");
192  labelEncryptionIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
193  labelTorIcon = new QLabel();
194  labelConnectionsIcon = new QPushButton();
195  labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
196  labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}");
197  labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
198  labelBlocksIcon = new QLabel();
199 
200  if (enableWallet) {
201  frameBlocksLayout->addStretch();
202  frameBlocksLayout->addWidget(unitDisplayControl);
203  frameBlocksLayout->addStretch();
204  frameBlocksLayout->addWidget(labelEncryptionIcon);
205  frameBlocksLayout->addStretch();
206  frameBlocksLayout->addWidget(labelStakingIcon);
207  }
208  frameBlocksLayout->addWidget(labelTorIcon);
209  frameBlocksLayout->addStretch();
210  frameBlocksLayout->addWidget(labelConnectionsIcon);
211  frameBlocksLayout->addStretch();
212  frameBlocksLayout->addWidget(labelBlocksIcon);
213  frameBlocksLayout->addStretch();
214 
215  // Jump directly to tabs in RPC-console
216  connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
217  connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
218  connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
219  connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
220  connect(openRepairAction, SIGNAL(triggered()), rpcConsole, SLOT(showRepair()));
221  connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
222  connect(openMNConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showMNConfEditor()));
223  connect(showDataDirAction, SIGNAL(triggered()), rpcConsole, SLOT(showDataDir()));
224  connect(showQtDirAction, SIGNAL(triggered()), rpcConsole, SLOT(showQtDir()));
225  connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
226  connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
227  connect(labelEncryptionIcon, SIGNAL(clicked()), walletFrame, SLOT(toggleLockWallet()));
228 
229  // Get restart command-line parameters and handle restart
230  connect(rpcConsole, SIGNAL(handleRestart(QStringList)), this, SLOT(handleRestart(QStringList)));
231 
232  // prevents an open debug window from becoming stuck/unusable on client shutdown
233  connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
234 
235  connect(openBlockExplorerAction, SIGNAL(triggered()), explorerWindow, SLOT(show()));
236 
237  // prevents an open debug window from becoming stuck/unusable on client shutdown
238  connect(quitAction, SIGNAL(triggered()), explorerWindow, SLOT(hide()));
239 
240  // Install event filter to be able to catch status tip events (QEvent::StatusTip)
241  this->installEventFilter(this);
242 
243 
244 
245  // Initially wallet actions should be disabled
247 
248  // Subscribe to notifications from core
250 
251  if (!fLiteMode) {
252  QTimer* timerStakingIcon = new QTimer(labelStakingIcon);
253  connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(setStakingStatus()));
254  timerStakingIcon->start(10000);
256  }
258 }
259 
261 {
262  // Unsubscribe from notifications from core
264 
265  GUIUtil::saveWindowGeometry("nWindow", this);
266  if (trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
267  trayIcon->hide();
268 
269  delete unitDisplayControl;
270  delete frameBlocks;
271 #ifdef Q_OS_MAC
272  delete appMenuBar;
274 #endif
275 }
276 
277 void BitcoinGUI::createActions(const NetworkStyle* networkStyle)
278 {
279  QActionGroup* tabGroup = new QActionGroup(this);
280 
281  overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
282  overviewAction->setIconText(" &Overview");
283  overviewAction->setStatusTip(QString());
284  overviewAction->setToolTip(QString());
285  overviewAction->setCheckable(true);
286 #ifdef Q_OS_MAC
287  overviewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1));
288 #else
289  overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
290 #endif
291  tabGroup->addAction(overviewAction);
292 
293  sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this);
294  sendCoinsAction->setIconText(" &Send");
295  sendCoinsAction->setToolTip(QString());
296  sendCoinsAction->setCheckable(true);
297 #ifdef Q_OS_MAC
298  sendCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2));
299 #else
300  sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
301 #endif
302  tabGroup->addAction(sendCoinsAction);
303 
304  receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
305  receiveCoinsAction->setIconText(" &Receive");
306  receiveCoinsAction->setToolTip(QString());
307  receiveCoinsAction->setCheckable(true);
308 #ifdef Q_OS_MAC
309  receiveCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3));
310 #else
311  receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
312 #endif
313  tabGroup->addAction(receiveCoinsAction);
314 
315  historyAction = new QAction(QIcon(":/icons/history"), tr("&History"), this);
316  historyAction->setIconText(" &History");
317  historyAction->setToolTip(QString());
318  historyAction->setCheckable(true);
319 #ifdef Q_OS_MAC
320  historyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_4));
321 #else
322  historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
323 #endif
324  tabGroup->addAction(historyAction);
325 
326 #ifdef ENABLE_WALLET
327  masternodeAction = new QAction(QIcon(":/icons/masternodes"), tr("&Masternodes"), this);
328  masternodeAction->setIconText(" &Masternodes");
329  masternodeAction->setStatusTip(tr("Masternodes"));
330  masternodeAction->setToolTip(masternodeAction->statusTip());
331  masternodeAction->setCheckable(true);
332 #ifdef Q_OS_MAC
333  masternodeAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_5));
334 #else
335  masternodeAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
336 #endif
337  if (!fLiteMode) {
338  tabGroup->addAction(masternodeAction);
339  }
340  connect(masternodeAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
341  connect(masternodeAction, SIGNAL(triggered()), this, SLOT(gotoMasternodePage()));
342 
343  // These showNormalIfMinimized are needed because Send Coins and Receive Coins
344  // can be triggered from the tray menu, and need to show the GUI to be useful.
345  connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
346  connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
347  connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
348  connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
349  connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
350  connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
351  connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
352  connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
353 #endif // ENABLE_WALLET
354 
355  quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
356  quitAction->setStatusTip(tr("Quit application"));
357  quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
358  quitAction->setMenuRole(QAction::QuitRole);
359  aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About PRCY"), this);
360  aboutAction->setStatusTip(tr("Show information about PRCY"));
361  aboutAction->setMenuRole(QAction::AboutRole);
362  aboutQtAction = new QAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
363  aboutQtAction->setStatusTip(tr("Show information about Qt"));
364  aboutQtAction->setMenuRole(QAction::AboutQtRole);
365  optionsAction = new QAction(QIcon(":/icons/options"), tr("&Settings"), this);
366  optionsAction->setIconText(" Settings");
367  optionsAction->setStatusTip(tr("Modify settings"));
368  optionsAction->setMenuRole(QAction::PreferencesRole);
369  optionsAction->setToolTip(optionsAction->statusTip());
370  optionsAction->setCheckable(true);
371 #ifdef Q_OS_MAC
372  optionsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_6));
373 #else
374  optionsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
375 #endif
376  tabGroup->addAction(optionsAction);
377 
378  if (walletFrame) {
379  stakingAction = new QAction(QIcon(":/icons/options"), tr("&Staking"), this);
380  stakingAction->setText(tr("Staking Status"));
381  stakingAction->setIconText(" Staking Status");
382  stakingAction->setMenuRole(QAction::NoRole);
383  stakingState = new QLabel(this);
384  stakingState->setObjectName("stakingState");
385 
386  networkAction = new QAction(QIcon(":/icons/options"), tr("&Network"), this);
387  networkAction->setMenuRole(QAction::NoRole);
388  networkAction->setText("Network Status");
389  networkAction->setIconText(" Network Status");
390  }
391  connectionCount = new QLabel(this);
392  connectionCount->setObjectName("connectionCount");
393  blockCount = new QLabel(this);
394  blockCount->setObjectName("blockCount");
395 
396  toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this);
397  toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
398 
399  encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
400  encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
401  encryptWalletAction->setCheckable(true);
402  backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
403  backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
404  showSeedAction = new QAction(QIcon(":/icons/seedphrase"), tr("&Show Seed Phrase"), this);
405  showSeedAction->setStatusTip(tr("Show 24 word wallet seed phrase"));
406  changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
407  changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
408  unlockWalletAction = new QAction(tr("&Unlock Wallet..."), this);
409  unlockWalletAction->setToolTip(tr("Unlock wallet"));
410  lockWalletAction = new QAction(tr("&Lock Wallet"), this);
411  multiSendAction = new QAction(QIcon(":/icons/edit"), tr("&MultiSend"), this);
412  multiSendAction->setToolTip(tr("MultiSend Settings"));
413  multiSendAction->setCheckable(true);
414 
415  openInfoAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Information"), this);
416  openInfoAction->setStatusTip(tr("Show diagnostic information"));
417  openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug Console"), this);
418  openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
419  openRPCConsoleAction->setShortcut(Qt::Key_F1);
420  openNetworkAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
421  openNetworkAction->setStatusTip(tr("Show network monitor"));
422  openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers List"), this);
423  openPeersAction->setStatusTip(tr("Show peers info"));
424  openRepairAction = new QAction(QIcon(":/icons/options"), tr("Wallet &Repair"), this);
425  openRepairAction->setStatusTip(tr("Show wallet repair options"));
426  openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open Wallet &Configuration File"), this);
427  openConfEditorAction->setStatusTip(tr("Open configuration file"));
428  openConfEditorAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
429  openMNConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Masternode Configuration File"), this);
430  openMNConfEditorAction->setStatusTip(tr("Open Masternode configuration file"));
431  openMNConfEditorAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
432  showDataDirAction = new QAction(QIcon(":/icons/browse"), tr("Show &PRCYcoin Folder"), this);
433  showDataDirAction->setStatusTip(tr("Show the PRCYcoin folder"));
434  showDataDirAction->setShortcut(Qt::Key_F2);
435  showQtDirAction = new QAction(QIcon(":/icons/browse"), tr("Show &Qt Folder"), this);
436  showQtDirAction->setStatusTip(tr("Show the Qt folder"));
437  showQtDirAction->setShortcut(Qt::Key_F3);
438  showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
439  showBackupsAction->setStatusTip(tr("Show automatically created wallet backups"));
440 
441  usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
442  usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
443  usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
444  usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
445 
446  openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this);
447  openAction->setStatusTip(tr("Open a PRCY: URI or payment request"));
448  openBlockExplorerAction = new QAction(QIcon(":/icons/explorer"), tr("&Blockchain Explorer"), this);
449  openBlockExplorerAction->setStatusTip(tr("Block explorer window"));
450 
451  facebookAction = new QAction(QIcon(":/icons/facebook"), tr("Facebook"), this);
452  facebookAction->setStatusTip(tr("PRCY Facebook"));
453  twitterAction = new QAction(QIcon(":/icons/twitter"), tr("Twitter"), this);
454  twitterAction->setStatusTip(tr("PRCY Twitter"));
455  discordAction = new QAction(QIcon(":/icons/discord"), tr("Discord"), this);
456  discordAction->setStatusTip(tr("PRCY Discord"));
457  telegramOfficialAction = new QAction(QIcon(":/icons/telegram"), tr("Telegram - Main"), this);
458  telegramOfficialAction->setStatusTip(tr("PRCY Telegram - Main"));
459  telegramLoungeAction = new QAction(QIcon(":/icons/telegram"), tr("Telegram - Lounge"), this);
460  telegramLoungeAction->setStatusTip(tr("PRCY Telegram - Lounge"));
461  mediumAction = new QAction(QIcon(":/icons/medium"), tr("Medium"), this);
462  mediumAction->setStatusTip(tr("PRCY Medium"));
463  steemitAction = new QAction(QIcon(":/icons/steemit"), tr("Steemit"), this);
464  steemitAction->setStatusTip(tr("PRCY Steemit"));
465  instagramAction = new QAction(QIcon(":/icons/instagram"), tr("Instagram"), this);
466  instagramAction->setStatusTip(tr("PRCY Instagram"));
467  redditAction = new QAction(QIcon(":/icons/reddit"), tr("Reddit"), this);
468  redditAction->setStatusTip(tr("PRCY Reddit"));
469 
470  showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line Options"), this);
471  showHelpMessageAction->setMenuRole(QAction::NoRole);
472  showHelpMessageAction->setStatusTip(tr("Show the PRCY help message to get a list with possible PRCY command-line options"));
473 
474  // Help Links
475  openKBAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Knowledge Base"), this);
476  openKBAction->setStatusTip(tr("Knowledge Base"));
477  openGitWikiAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&GitHub Wiki"), this);
478  openGitWikiAction->setStatusTip(tr("GitHub Wiki"));
479  openBlockExplorerAPIAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Blockchain Explorer API"), this);
480  openBlockExplorerAPIAction->setStatusTip(tr("Blockchain Explorer API"));
481  openBootStrapAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&BootStrap"), this);
482  openBootStrapAction->setStatusTip(tr("BootStrap Link"));
483  openBridgeAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Bridge"), this);
484  openBridgeAction->setStatusTip(tr("Bridge Link"));
485  openDexAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PRivaCY DEX"), this);
486  openDexAction->setStatusTip(tr("PRivaCY Dex Link"));
487  openToolkitAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PRCY Toolkit"), this);
488  openToolkitAction->setStatusTip(tr("PRCY Toolkit Link"));
489  openTGTechSupportAction = new QAction(QIcon(":/icons/telegram"), tr("&Telegram Tech Support"), this);
490  openTGTechSupportAction->setStatusTip(tr("Telegram Tech Support"));
491  openTGMNSupportAction = new QAction(QIcon(":/icons/telegram"), tr("&Telegram Masternode Support"), this);
492  openTGMNSupportAction->setStatusTip(tr("Telegram Masternode Support"));
493  openDiscordSupportAction = new QAction(QIcon(":/icons/discord"), tr("&Discord Tech Support"), this);
494  openDiscordSupportAction->setStatusTip(tr("Discord Tech Support"));
495  checkForUpdatesAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Check For Updates"), this);
496  checkForUpdatesAction->setStatusTip(tr("Check For Updates"));
497 
498  connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
499  connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
500  connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
501  connect(optionsAction, SIGNAL(triggered()), this, SLOT(gotoOptionsPage()));
502  connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
503  connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
504  connect(openKBAction, SIGNAL(triggered()), this, SLOT(openKBClicked()));
505  connect(openGitWikiAction, SIGNAL(triggered()), this, SLOT(openGitWikiClicked()));
506  connect(openBlockExplorerAPIAction, SIGNAL(triggered()), this, SLOT(openBlockExplorerAPIClicked()));
507  connect(openBootStrapAction, SIGNAL(triggered()), this, SLOT(openBootStrapClicked()));
508  connect(openBridgeAction, SIGNAL(triggered()), this, SLOT(openBridgeClicked()));
509  connect(openDexAction, SIGNAL(triggered()), this, SLOT(openDexClicked()));
510  connect(openToolkitAction, SIGNAL(triggered()), this, SLOT(openToolkitClicked()));
511  connect(openTGTechSupportAction, SIGNAL(triggered()), this, SLOT(openTGTechSupportClicked()));
512  connect(openTGMNSupportAction, SIGNAL(triggered()), this, SLOT(openTGMNSupportClicked()));
513  connect(openDiscordSupportAction, SIGNAL(triggered()), this, SLOT(openDiscordSupportClicked()));
514  connect(checkForUpdatesAction, SIGNAL(triggered()), this, SLOT(checkForUpdatesClicked()));
515 #ifdef ENABLE_WALLET
516  if (walletFrame) {
517  connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool)));
518  connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet()));
519  connect(showSeedAction, SIGNAL(triggered()), this, SLOT(showSeedPhrase()));
520  connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase()));
521  connect(unlockWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(unlockWallet(bool)));
522  connect(lockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(lockWallet()));
523  connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses()));
524  connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
525  connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
526  connect(multiSendAction, SIGNAL(triggered()), this, SLOT(gotoMultiSendDialog()));
527  }
528 #endif // ENABLE_WALLET
529  connect(facebookAction, SIGNAL(triggered()), this, SLOT(facebookActionClicked()));
530  connect(twitterAction, SIGNAL(triggered()), this, SLOT(twitterActionClicked()));
531  connect(discordAction, SIGNAL(triggered()), this, SLOT(discordActionClicked()));
532  connect(telegramOfficialAction, SIGNAL(triggered()), this, SLOT(telegramOfficialActionClicked()));
533  connect(telegramLoungeAction, SIGNAL(triggered()), this, SLOT(telegramLoungeActionClicked()));
534  connect(mediumAction, SIGNAL(triggered()), this, SLOT(mediumActionClicked()));
535  connect(steemitAction, SIGNAL(triggered()), this, SLOT(steemitActionClicked()));
536  connect(instagramAction, SIGNAL(triggered()), this, SLOT(instagramActionClicked()));
537  connect(redditAction, SIGNAL(triggered()), this, SLOT(redditActionClicked()));
538 }
539 
541 {
542 #ifdef Q_OS_MAC
543  // Create a decoupled menu bar on Mac which stays even if the window is closed
544  appMenuBar = new QMenuBar();
545 #else
546  // Get the main window's menu bar on other platforms
547  appMenuBar = menuBar();
548 #endif
549 
550  // Configure the menus
551  QMenu* file = appMenuBar->addMenu(tr("&File"));
552  if (walletFrame) {
553  //file->addAction(openAction);
554  file->addAction(backupWalletAction);
555  file->addSeparator();
556  file->addAction(showSeedAction);
557  //file->addAction(usedSendingAddressesAction);
558  //file->addAction(usedReceivingAddressesAction);
559  //file->addSeparator();
560  //file->addAction(multisigCreateAction);
561  //file->addAction(multisigSpendAction);
562  //file->addAction(multisigSignAction);
563  //file->addSeparator();
564  }
565  file->addAction(quitAction);
566 
567  //QMenu* settings = appMenuBar->addMenu(tr("&Settings"));
568  //if (walletFrame) {
569  //settings->addAction(encryptWalletAction);
570  //settings->addAction(changePassphraseAction);
571  //settings->addAction(unlockWalletAction);
572  //settings->addAction(lockWalletAction);
573  //settings->addAction(multiSendAction);
574  //settings->addSeparator();
575  //}
576 
577  if (walletFrame) {
578  walletFrame->addAction(openRPCConsoleAction);
579  QMenu* tools = appMenuBar->addMenu(tr("&Tools"));
580  tools->addAction(openInfoAction);
581  tools->addAction(openRPCConsoleAction);
582  tools->addAction(openNetworkAction);
583  tools->addAction(openPeersAction);
584  tools->addAction(openRepairAction);
585  tools->addSeparator();
586  tools->addAction(openConfEditorAction);
587  tools->addAction(openMNConfEditorAction);
588  tools->addAction(showDataDirAction);
589  tools->addAction(showQtDirAction);
590  tools->addAction(showBackupsAction);
591  tools->addAction(openBlockExplorerAction);
592  }
593 
594  QMenu* socials = appMenuBar->addMenu(tr("Social"));
595  socials->addAction(facebookAction);
596  socials->addAction(twitterAction);
597  socials->addAction(discordAction);
598  socials->addAction(telegramOfficialAction);
599  socials->addAction(telegramLoungeAction);
600  socials->addAction(mediumAction);
601  //socials->addAction(steemitAction);
602  socials->addAction(instagramAction);
603  socials->addAction(redditAction);
604 
605  QMenu* help = appMenuBar->addMenu(tr("&Help"));
606  help->addAction(showHelpMessageAction);
607  help->addSeparator();
608  help->addAction(openKBAction);
609  help->addAction(openGitWikiAction);
610  help->addSeparator();
611  help->addAction(openBlockExplorerAPIAction);
612  help->addAction(openBootStrapAction);
613  help->addAction(openBridgeAction);
614  help->addAction(openDexAction);
615  help->addAction(openToolkitAction);
616  help->addSeparator();
617  help->addAction(openTGTechSupportAction);
618  //help->addAction(openTGMNSupportAction);
619  //help->addSeparator();
620  //help->addAction(openDiscordSupportAction);
621  help->addSeparator();
622  help->addAction(checkForUpdatesAction);
623  help->addSeparator();
624  help->addAction(aboutAction);
625  help->addAction(aboutQtAction);
626  appMenuBar->setVisible(true);
627 }
628 
630 {
631  if (walletFrame) {
632  QToolBar* toolbar = new QToolBar(this);
633  toolbar->setOrientation(Qt::Vertical);
634  toolbar->setObjectName("Main-Toolbar"); // Name for CSS addressing
635  toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
636 
637  toolbar->addAction(overviewAction);
638  toolbar->addAction(sendCoinsAction);
639  toolbar->addAction(receiveCoinsAction);
640  toolbar->addAction(historyAction);
641  if (!fLiteMode) {
642  toolbar->addAction(masternodeAction);
643  }
644  toolbar->setMovable(false); // remove unused icon in upper left corner
645  overviewAction->setChecked(true);
646  toolbar->setStyleSheet("QToolBar{spacing:18px;}");
647 
648  // Create NavBar
649  QToolBar* bottomToolbar = new QToolBar(this);
650 
651  bottomToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
652  bottomToolbar->setOrientation(Qt::Vertical);
653  bottomToolbar->addAction(optionsAction);
654  bottomToolbar->addSeparator();
655  bottomToolbar->addAction(stakingAction);
656  bottomToolbar->addWidget(stakingState);
657  bottomToolbar->addAction(networkAction);
658  bottomToolbar->addWidget(connectionCount);
659  bottomToolbar->addWidget(blockCount);
660  bottomToolbar->setStyleSheet("QToolBar{spacing:5px;}");
661  bottomToolbar->setObjectName("bottomToolbar");
662  if (fLiteMode) {
663  stakingAction->setVisible(false);
664  stakingState->setVisible(false);
665  }
666 
667  QHBoxLayout* layout = new QHBoxLayout();
668  QVBoxLayout* navLayout = new QVBoxLayout();
669  QWidget* navWidget = new QWidget(this);
670  navWidget->setObjectName("navLayout");
671 
672  bottomToolbar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
673  toolbar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
674  QLabel* prcyico = new QLabel;
675  prcyico->setPixmap(QIcon(":icons/prcyico").pixmap(117, 117));
676  prcyico->setObjectName("prcyico");
677 
678  navLayout->addWidget(prcyico);
679  navLayout->addWidget(toolbar);
680  navLayout->addWidget(bottomToolbar);
681  navWidget->setLayout(navLayout);
682 
683  layout->addWidget(navWidget);
684  layout->addWidget(walletFrame);
685  layout->setSpacing(0);
686  layout->setContentsMargins(QMargins());
687  QWidget* containerWidget = new QWidget();
688  containerWidget->setLayout(layout);
689  setCentralWidget(containerWidget);
690  }
691 }
692 
694 {
695  this->clientModel = clientModel;
696  if (clientModel) {
697  // Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
698  // while the client has not yet fully loaded
700 
701  // Keep up to date with client
703  connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
704 
706  connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
707 
708  // Receive and report messages from client model
709  connect(clientModel, SIGNAL(message(QString, QString, unsigned int)), this, SLOT(message(QString, QString, unsigned int)));
710 
712 
713  updateTorIcon();
714 
715 #ifdef ENABLE_WALLET
716  if (walletFrame) {
718  }
719 #endif // ENABLE_WALLET
721  } else {
722  // Disable possibility to show main window via action
723  toggleHideAction->setEnabled(false);
724  if (trayIconMenu) {
725  // Disable context menu on tray icon
726  trayIconMenu->clear();
727  }
728  }
729 }
730 
731 void BitcoinGUI::showProgress(const QString &title, int nProgress)
732 {
733  if (nProgress == 0) {
734  progressDialog = new QProgressDialog(title, QString(), 0, 100);
735  progressDialog->setWindowModality(Qt::ApplicationModal);
736  progressDialog->setMinimumDuration(0);
737  progressDialog->setAutoClose(false);
738  progressDialog->setValue(0);
739  } else if (nProgress == 100) {
740  if (progressDialog) {
741  progressDialog->close();
742  progressDialog->deleteLater();
743  }
744  } else if (progressDialog) {
745  progressDialog->setValue(nProgress);
746  }
747 }
748 
749 #ifdef ENABLE_WALLET
750 bool BitcoinGUI::addWallet(const QString& name, WalletModel* walletModel)
751 {
752  if (!walletFrame)
753  return false;
755  return walletFrame->addWallet(name, walletModel);
756 }
757 
758 bool BitcoinGUI::setCurrentWallet(const QString& name)
759 {
760  if (!walletFrame)
761  return false;
763 }
764 
765 void BitcoinGUI::removeAllWallets()
766 {
767  if (!walletFrame)
768  return;
771 }
772 #endif // ENABLE_WALLET
773 
775 {
776  overviewAction->setEnabled(enabled);
777  sendCoinsAction->setEnabled(enabled);
778  receiveCoinsAction->setEnabled(enabled);
779  historyAction->setEnabled(enabled);
780  masternodeAction->setEnabled(enabled);
781  encryptWalletAction->setEnabled(enabled);
782  backupWalletAction->setEnabled(enabled);
783  showSeedAction->setEnabled(enabled);
784  changePassphraseAction->setEnabled(enabled);
785  usedSendingAddressesAction->setEnabled(enabled);
786  usedReceivingAddressesAction->setEnabled(enabled);
787  openAction->setEnabled(enabled);
788 }
789 
790 void BitcoinGUI::createTrayIcon(const NetworkStyle* networkStyle)
791 {
792 #ifndef Q_OS_MAC
793  trayIcon = new QSystemTrayIcon(this);
794  QString toolTip = tr("PRCY client") + " " + networkStyle->getTitleAddText();
795  trayIcon->setToolTip(toolTip);
796  trayIcon->setIcon(networkStyle->getAppIcon());
797  trayIcon->show();
798 #endif
799 
800  notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
801 }
802 
804 {
805 #ifndef Q_OS_MAC
806  // return if trayIcon is unset (only on non-macOSes)
807  if (!trayIcon)
808  return;
809 
810  trayIconMenu = new QMenu(this);
811  trayIcon->setContextMenu(trayIconMenu);
812 
813  connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
814  this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
815 #else
816  // Note: On macOS, the Dock icon is used to provide the tray's functionality.
818  connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, this, &BitcoinGUI::macosDockIconActivated);
819 
820  trayIconMenu = new QMenu(this);
821  trayIconMenu->setAsDockMenu();
822 #endif
823 
824  // Configuration of the tray icon (or Dock icon) icon menu
825  trayIconMenu->addAction(toggleHideAction);
826  trayIconMenu->addSeparator();
827  trayIconMenu->addAction(sendCoinsAction);
828  trayIconMenu->addAction(receiveCoinsAction);
829  trayIconMenu->addAction(historyAction);
830  if (!fLiteMode) {
831  trayIconMenu->addAction(masternodeAction);
832  }
833  trayIconMenu->addSeparator();
834  trayIconMenu->addAction(optionsAction);
835  trayIconMenu->addSeparator();
836  trayIconMenu->addAction(openInfoAction);
838  trayIconMenu->addAction(openNetworkAction);
839  trayIconMenu->addAction(openPeersAction);
840  trayIconMenu->addAction(openRepairAction);
841  trayIconMenu->addSeparator();
844  trayIconMenu->addAction(showDataDirAction);
845  trayIconMenu->addAction(showQtDirAction);
846  trayIconMenu->addAction(showBackupsAction);
848 #ifndef Q_OS_MAC // This is built-in on macOS
849  trayIconMenu->addSeparator();
850  trayIconMenu->addAction(quitAction);
851 #endif
852 }
853 
854 #ifndef Q_OS_MAC
855 void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
856 {
857  if (reason == QSystemTrayIcon::Trigger) {
858  // Click on system tray icon triggers show/hide of the main window
859  toggleHidden();
860  }
861 }
862 #else
863 void BitcoinGUI::macosDockIconActivated()
864  {
865  show();
866  activateWindow();
867  }
868 #endif
869 
871 {
873  return;
874 
875  OptionsDialog dlg(this, enableWallet);
877  dlg.exec();
878 }
879 
881 {
882  QDesktopServices::openUrl(QUrl("https://www.facebook.com/Prcycoin-101534778505838"));
883 }
885 {
886  QDesktopServices::openUrl(QUrl("https://twitter.com/PRCYcoin"));
887 }
889 {
890  QDesktopServices::openUrl(QUrl("https://discord.prcycoin.com"));
891 }
893 {
894  QDesktopServices::openUrl(QUrl("https://t.me/prcycoinofficial"));
895 }
897 {
898  QDesktopServices::openUrl(QUrl("https://t.me/prcylounge"));
899 }
901 {
902  QDesktopServices::openUrl(QUrl("https://prcycoin.medium.com/"));
903 }
905 {
906  QDesktopServices::openUrl(QUrl("https://www.instagram.com/PRCYCoin/"));
907 }
909 {
910  QDesktopServices::openUrl(QUrl("https://www.reddit.com/r/PRCYCoin/"));
911 }
913 {
914  QDesktopServices::openUrl(QUrl("https://steemit.com/@PRCYCoin/"));
915 }
916 
918 {
919  if (!clientModel)
920  return;
921 
922  HelpMessageDialog dlg(this, true);
923  dlg.exec();
924 }
925 
927 {
928  HelpMessageDialog* help = new HelpMessageDialog(this, false);
929  help->setAttribute(Qt::WA_DeleteOnClose);
930  help->show();
931 }
932 
934 {
935  QDesktopServices::openUrl(QUrl("https://prcycoin.com/knowledge-base"));
936 }
937 
939 {
940  QDesktopServices::openUrl(QUrl("https://github.com/PRCYCoin/PRCYCoin/wiki"));
941 }
942 
944 {
945  QDesktopServices::openUrl(QUrl("https://explorer.prcycoin.com/api/getblockcount"));
946 }
947 
949 {
950  QDesktopServices::openUrl(QUrl("https://bootstrap.prcycoin.com"));
951 }
952 
954 {
955  QDesktopServices::openUrl(QUrl("https://t.me/prcySupport"));
956 }
957 
959 {
960  QDesktopServices::openUrl(QUrl("https://t.me/PRCY_MN_Support"));
961 }
962 
964 {
965  QDesktopServices::openUrl(QUrl("https://discord.prcycoin.com"));
966 }
967 
969 {
970  QDesktopServices::openUrl(QUrl("https://bridge.prcycoin.com"));
971 }
972 
974 {
975  QDesktopServices::openUrl(QUrl("https://privacydex.io"));
976 }
977 
979 {
980  QDesktopServices::openUrl(QUrl("https://toolkit.prcycoin.com"));
981 }
982 
984 {
985  LogPrintf("Check For Updates: Checking...\n");
986  QUrl serviceUrl = QUrl("https://raw.githubusercontent.com/PRCYCoin/PRCYCoin/master/version.txt");
987  QNetworkAccessManager *manager = new QNetworkAccessManager(this);
988  connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(serviceRequestFinished(QNetworkReply*)));
989  QNetworkRequest request;
990  request.setUrl(serviceUrl);
991  QNetworkReply* reply = manager->get(request);
992 }
993 
994 void BitcoinGUI::serviceRequestFinished(QNetworkReply* reply)
995 {
996  QString currentVersion = QString::number(CLIENT_VERSION_MAJOR) + "." + QString::number(CLIENT_VERSION_MINOR)+ "." + QString::number(CLIENT_VERSION_REVISION)+ "." + QString::number(CLIENT_VERSION_BUILD);
997  QString currentVersionStripped = currentVersion.remove(QChar('.'), Qt::CaseInsensitive);
998  reply->deleteLater();
999  if(reply->error() == QNetworkReply::NoError) {
1000  QByteArray data = reply->readAll();
1001  QString dataStream = data.trimmed();
1002  QString availableVersionStripped = dataStream.remove(QChar('.'), Qt::CaseInsensitive);
1003  if (availableVersionStripped > currentVersionStripped) {
1004  LogPrintf("Check For Updates: Update Available!\n");
1005  QMessageBox::StandardButton msgReply;
1006  msgReply = QMessageBox::question(this, "Wallet Update Available!", "Wallet update available.\n\nWould you like to go to the GitHub Releases page to download v" + data.trimmed() + "?", QMessageBox::Yes|QMessageBox::No);
1007  if (msgReply == QMessageBox::Yes) {
1008  QDesktopServices::openUrl(QUrl("https://github.com/PRCYCoin/PRCYCoin/releases/latest"));
1009  } else {
1010  LogPrintf("Check For Updates: Update Available, but declined by user.\n");
1011  return;
1012  }
1013  } else {
1014  LogPrintf("Check For Updates: No update available.\n");
1015  if (!isStartup) {
1016  QMessageBox msgBox;
1017  msgBox.setWindowTitle("No Update Available");
1018  msgBox.setText("No update available.\n\nYour wallet is up to date.");
1019  msgBox.setStyleSheet(GUIUtil::loadStyleSheet());
1020  msgBox.setIcon(QMessageBox::Information);
1021  msgBox.exec();
1022  }
1023  }
1024  } else {
1025  LogPrintf("Check For Updates: Error!\n");
1026  QByteArray error = reply->readAll();
1027  QMessageBox msgBox;
1028  msgBox.setWindowTitle("Error");
1029  msgBox.setText("Error checking for updates.\n\n" + error);
1030  msgBox.setStyleSheet(GUIUtil::loadStyleSheet());
1031  msgBox.setIcon(QMessageBox::Critical);
1032  msgBox.exec();
1033  }
1034  isStartup = false;
1035 }
1036 
1037 #ifdef ENABLE_WALLET
1038 void BitcoinGUI::openClicked()
1039 {
1040  OpenURIDialog dlg(this);
1041  if (dlg.exec()) {
1042  Q_EMIT receivedURI(dlg.getURI());
1043  }
1044 }
1045 
1046 void BitcoinGUI::gotoOverviewPage()
1047 {
1048  overviewAction->setChecked(true);
1050 }
1051 
1052 void BitcoinGUI::gotoHistoryPage()
1053 {
1054  historyAction->setChecked(true);
1056 }
1057 
1058 void BitcoinGUI::gotoMasternodePage()
1059 {
1060  masternodeAction->setChecked(true);
1062 
1063 }
1064 
1065 void BitcoinGUI::gotoReceiveCoinsPage()
1066 {
1067  receiveCoinsAction->setChecked(true);
1069 }
1070 
1071 void BitcoinGUI::gotoOptionsPage()
1072 {
1073  optionsAction->setChecked(true);
1075 }
1076 
1077 void BitcoinGUI::gotoSendCoinsPage(QString addr)
1078 {
1079  QSettings settings;
1080  if (settings.value("fLockSendStaking", false).toBool()) {
1081  sendCoinsAction->setChecked(false);
1082  LogPrintf("Attempt to go to Send tab blocked.\n");
1083  return;
1084  }
1085  sendCoinsAction->setChecked(true);
1087 }
1088 
1089 void BitcoinGUI::gotoMultiSendDialog()
1090 {
1091  multiSendAction->setChecked(true);
1092  if (walletFrame)
1094 }
1095 void BitcoinGUI::gotoBlockExplorerPage()
1096 {
1098 }
1099 
1100 void BitcoinGUI::showSeedPhrase()
1101 {
1103 }
1104 #endif // ENABLE_WALLET
1105 
1107 {
1108  QString icon;
1109  switch (count) {
1110  case 0:
1111  icon = ":/icons/connect_0";
1112  break;
1113  case 1:
1114  case 2:
1115  case 3:
1116  icon = ":/icons/connect_1";
1117  break;
1118  case 4:
1119  case 5:
1120  case 6:
1121  icon = ":/icons/connect_2";
1122  break;
1123  case 7:
1124  case 8:
1125  case 9:
1126  icon = ":/icons/connect_3";
1127  break;
1128  default:
1129  icon = ":/icons/connect_4";
1130  break;
1131  }
1132 
1133  if (walletFrame) {
1134  connectionCount->setText(tr("%n Active Connections", "", count));
1135  if (count < 1)
1136  networkAction->setIcon(QIcon(":icons/staking_disabled"));
1137  else
1138  networkAction->setIcon(QIcon(":icons/staking_active"));
1139  }
1140 }
1141 
1143 {
1144  if (!clientModel)
1145  return;
1146 
1147  QString tooltip;
1148 
1149  QDateTime lastBlockDate = clientModel->getLastBlockDate();
1150  QDateTime currentDate = QDateTime::currentDateTime();
1151  int secs = lastBlockDate.secsTo(currentDate);
1152 
1153  tooltip = tr("Processed %n blocks of transaction history.", "", count);
1154 
1155  // Set icon state: spinning if catching up, tick otherwise
1156  // if(secs < 25*60) // 90*60 for bitcoin but we are 4x times faster
1158  QString strSyncStatus;
1159  tooltip = tr("Up to date") + QString(".<br>") + tooltip;
1160 
1161  if (masternodeSync.IsSynced()) {
1162  labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1163  } else {
1164  // int nAttempt;
1165  // int progress = 0;
1166 
1167  labelBlocksIcon->setPixmap(QIcon(QString(
1168  ":/movies/spinner-%1")
1169  .arg(spinnerFrame, 3, 10, QChar('0')))
1170  .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1172 
1173 #ifdef ENABLE_WALLET
1174  if (walletFrame)
1175  walletFrame->showSyncStatus(false);
1176 #endif // ENABLE_WALLET
1177  }
1178 
1179  strSyncStatus = QString(masternodeSync.GetSyncStatus().c_str());
1180  tooltip = strSyncStatus + QString("<br>") + tooltip;
1181  } else {
1182  // Represent time from last generated block in human readable text
1183  QString timeBehindText;
1184  const int HOUR_IN_SECONDS = 60 * 60;
1185  const int DAY_IN_SECONDS = 24 * 60 * 60;
1186  const int WEEK_IN_SECONDS = 7 * 24 * 60 * 60;
1187  const int YEAR_IN_SECONDS = 31556952; // Average length of year in Gregorian calendar
1188  if (secs < 2 * DAY_IN_SECONDS) {
1189  timeBehindText = tr("%n hour(s)", "", secs / HOUR_IN_SECONDS);
1190  } else if (secs < 2 * WEEK_IN_SECONDS) {
1191  timeBehindText = tr("%n day(s)", "", secs / DAY_IN_SECONDS);
1192  } else if (secs < YEAR_IN_SECONDS) {
1193  timeBehindText = tr("%n week(s)", "", secs / WEEK_IN_SECONDS);
1194  } else {
1195  int years = secs / YEAR_IN_SECONDS;
1196  int remainder = secs % YEAR_IN_SECONDS;
1197  timeBehindText = tr("%1 and %2").arg(tr("%n year(s)", "", years)).arg(tr("%n week(s)", "", remainder / WEEK_IN_SECONDS));
1198  }
1199 
1200  tooltip = tr("Catching up...") + QString("<br>") + tooltip;
1201  if (count != prevBlocks) {
1202  labelBlocksIcon->setPixmap(QIcon(QString(
1203  ":/movies/spinner-%1")
1204  .arg(spinnerFrame, 3, 10, QChar('0')))
1205  .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1207  }
1208  prevBlocks = count;
1209 
1210 #ifdef ENABLE_WALLET
1211  if (walletFrame)
1212  walletFrame->showSyncStatus(true);
1213 #endif // ENABLE_WALLET
1214 
1215  tooltip += QString("<br>");
1216  tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
1217  tooltip += QString("<br>");
1218  tooltip += tr("Transactions after this will not yet be visible.");
1219  }
1220  if (walletFrame) {
1221  if (count == 0) {
1222  blockCount->setText(tr("Loading Blocks..."));
1223  } else if (clientModel->inInitialBlockDownload()) {
1224  blockCount->setText(tr("Syncing Blocks..."));
1225  } else {
1226  blockCount->setText(tr("%n Blocks", "", count));
1227  }
1228  blockCount->setToolTip(tooltip);
1229  }
1230 }
1231 
1232 void BitcoinGUI::message(const QString& title, const QString& message, unsigned int style, bool* ret)
1233 {
1234  QString strTitle = tr("PRCY"); // default title
1235  // Default to information icon
1236  int nMBoxIcon = QMessageBox::Information;
1237  int nNotifyIcon = Notificator::Information;
1238 
1239  QString msgType;
1240 
1241  // Prefer supplied title over style based title
1242  if (!title.isEmpty()) {
1243  msgType = title;
1244  } else {
1245  switch (style) {
1247  msgType = tr("Error");
1248  break;
1250  msgType = tr("Warning");
1251  break;
1253  msgType = tr("Information");
1254  break;
1255  default:
1256  break;
1257  }
1258  }
1259  // Append title to "PRCY - "
1260  if (!msgType.isEmpty())
1261  strTitle += " - " + msgType;
1262 
1263  // Check for error/warning icon
1264  if (style & CClientUIInterface::ICON_ERROR) {
1265  nMBoxIcon = QMessageBox::Critical;
1266  nNotifyIcon = Notificator::Critical;
1267  } else if (style & CClientUIInterface::ICON_WARNING) {
1268  nMBoxIcon = QMessageBox::Warning;
1269  nNotifyIcon = Notificator::Warning;
1270  }
1271 
1272  // Display message
1273  if (style & CClientUIInterface::MODAL) {
1274  // Check for buttons, use OK as default, if none was supplied
1275  QMessageBox::StandardButton buttons;
1276  if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
1277  buttons = QMessageBox::Ok;
1278 
1280  QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
1281  int r = mBox.exec();
1282  if (ret != NULL)
1283  *ret = r == QMessageBox::Ok;
1284  } else
1285  notificator->notify((Notificator::Class)nNotifyIcon, strTitle, message);
1286 }
1287 
1289 {
1290  QMainWindow::changeEvent(e);
1291 #ifndef Q_OS_MAC // Ignored on Mac
1292  if (e->type() == QEvent::WindowStateChange) {
1294  QWindowStateChangeEvent* wsevt = static_cast<QWindowStateChangeEvent*>(e);
1295  if (!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) {
1296  QTimer::singleShot(0, this, SLOT(hide()));
1297  e->ignore();
1298  }
1299  }
1300  }
1301 #endif
1302 }
1303 
1304 void BitcoinGUI::closeEvent(QCloseEvent* event)
1305 {
1306 #ifndef Q_OS_MAC // Ignored on Mac
1309  QApplication::quit();
1310  }
1311  }
1312 #endif
1313  QMainWindow::closeEvent(event);
1314 }
1315 
1316 #ifdef ENABLE_WALLET
1317 void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString &confirmations)
1318 {
1319  // Only send notifications when not disabled
1321  // Only show notifications when synced to prevent spam
1322  if (!masternodeSync.IsSynced()) return;
1323  // On new transaction, make an info balloon
1324  message((amount) < 0 ? (pwalletMain->fMultiSendNotify == true ? tr("Sent MultiSend transaction") : tr("Sent transaction")) : tr("Incoming transaction"),
1325  tr("Date: %1\n"
1326  "Amount: %2\n"
1327  "Type: %3\n"
1328  "Address: %4\n"
1329  "Confirmations: %5\n")
1330  .arg(date)
1331  .arg(BitcoinUnits::formatWithUnit(unit, amount, true))
1332  .arg(type)
1333  .arg(address)
1334  .arg(confirmations),
1336 
1337  pwalletMain->fMultiSendNotify = false;
1338  }
1339 }
1340 #endif // ENABLE_WALLET
1341 
1342 void BitcoinGUI::dragEnterEvent(QDragEnterEvent* event)
1343 {
1344  // Accept only URIs
1345  if (event->mimeData()->hasUrls())
1346  event->acceptProposedAction();
1347 }
1348 
1349 bool BitcoinGUI::eventFilter(QObject *obj, QEvent *event)
1350 {
1351  return false;
1352 }
1353 
1354 void BitcoinGUI::dropEvent(QDropEvent* event)
1355 {
1356  if (event->mimeData()->hasUrls()) {
1357  Q_FOREACH (const QUrl& uri, event->mimeData()->urls()) {
1358  Q_EMIT receivedURI(uri.toString());
1359  }
1360  }
1361  event->acceptProposedAction();
1362 }
1363 
1365 {
1366  if (walletFrame) {
1367  bool stkStatus = false;
1368  if (pwalletMain) {
1370  stkStatus = pwalletMain->ReadStakingStatus();
1371  }
1372  if (!stkStatus || pwalletMain->IsLocked()) {
1373  LogPrint(BCLog::STAKING,"Checking Staking Status: Disabled.\n");
1374  stakingState->setText(tr("Staking Disabled"));
1375  stakingState->setToolTip("Staking Disabled");
1376  stakingAction->setIcon(QIcon(":/icons/staking_inactive"));
1377  return;
1378  }
1379  if (vNodes.empty()) {
1380  LogPrint(BCLog::STAKING,"Checking Staking Status: No Active Peers...\n");
1381  stakingState->setText(tr("No Active Peers"));
1382  stakingState->setToolTip("No Active Peers");
1383  stakingAction->setIcon(QIcon(":/icons/staking_inactive"));
1384  return;
1385  }
1387  LogPrint(BCLog::STAKING,"Checking Staking Status: Syncing...\n");
1388  stakingState->setText(tr("Syncing Blocks..."));
1389  stakingState->setToolTip("Syncing Blocks");
1390  stakingAction->setIcon(QIcon(":/icons/staking_waiting"));
1391  return;
1392  }
1393  if (!masternodeSync.IsSynced()) {
1394  LogPrint(BCLog::STAKING,"Checking Staking Status: Syncing MN List...\n");
1395  stakingState->setText(tr("Syncing MN List..."));
1396  stakingState->setToolTip("Syncing Masternode List");
1397  stakingAction->setIcon(QIcon(":/icons/staking_waiting"));
1398  return;
1399  }
1400  LogPrint(BCLog::STAKING,"Checking Staking Status: Enabled.\n");
1401  stakingState->setText(tr("Staking Enabled"));
1402  stakingState->setToolTip("Staking Enabled");
1403  stakingAction->setIcon(QIcon(":/icons/staking_active"));
1404  }
1405 }
1406 
1408 {
1409  if (walletFrame) {
1410  if (inProgress) {
1411  stakingState->setText(tr("Enabling Staking..."));
1412  stakingState->setToolTip("Enabling Staking... Please wait up to 1.5 hours for it to be properly enabled after consolidation.");
1413  stakingAction->setIcon(QIcon(":/icons/staking_active"));
1414  } else {
1415  stakingState->setText(tr("Disabling Staking..."));
1416  stakingState->setToolTip("Disabling Staking...");
1417  stakingAction->setIcon(QIcon(":/icons/staking_inactive"));
1418  }
1419  }
1420 }
1421 
1422 #ifdef ENABLE_WALLET
1423 
1424 void BitcoinGUI::setEncryptionStatus(int status)
1425 {
1426  switch (status) {
1428  labelEncryptionIcon->hide();
1429  encryptWalletAction->setChecked(false);
1430  changePassphraseAction->setEnabled(false);
1431  unlockWalletAction->setVisible(false);
1432  lockWalletAction->setVisible(false);
1433  encryptWalletAction->setEnabled(true);
1434  break;
1435  case WalletModel::Unlocked:
1436  labelEncryptionIcon->show();
1437  labelEncryptionIcon->setIcon(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1438  labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
1439  encryptWalletAction->setChecked(true);
1440  changePassphraseAction->setEnabled(true);
1441  unlockWalletAction->setVisible(false);
1442  lockWalletAction->setVisible(true);
1443  encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
1444  break;
1446  labelEncryptionIcon->show();
1447  labelEncryptionIcon->setIcon(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1448  labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b> for staking only"));
1449  encryptWalletAction->setChecked(true);
1450  changePassphraseAction->setEnabled(true);
1451  unlockWalletAction->setVisible(true);
1452  lockWalletAction->setVisible(true);
1453  encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
1454  break;
1455  case WalletModel::Locked:
1456  labelEncryptionIcon->show();
1457  labelEncryptionIcon->setIcon(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1458  labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
1459  encryptWalletAction->setChecked(true);
1460  changePassphraseAction->setEnabled(true);
1461  unlockWalletAction->setVisible(true);
1462  lockWalletAction->setVisible(false);
1463  encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
1464  break;
1465  }
1466 }
1467 #endif // ENABLE_WALLET
1468 
1470 {
1471  std::string ip_port;
1472  bool tor_enabled = clientModel->getTorInfo(ip_port);
1473 
1474  if (tor_enabled) {
1475  if (labelTorIcon->pixmap() == 0) {
1476  QString ip_port_q = QString::fromStdString(ip_port);
1477  labelTorIcon->setPixmap(QIcon(":/icons/onion").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1478  labelTorIcon->setToolTip(tr("Tor is <b>enabled</b>: %1").arg(ip_port_q));
1479  } else {
1480  labelTorIcon->show();
1481  }
1482  } else {
1483  labelTorIcon->hide();
1484  }
1485 }
1486 
1487 void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
1488 {
1489  if (!clientModel)
1490  return;
1491 
1492  if (!isHidden() && !isMinimized() && !GUIUtil::isObscured(this) && fToggleHidden) {
1493  hide();
1494  } else {
1495  GUIUtil::bringToFront(this);
1496  }
1497 }
1498 
1500 {
1501  showNormalIfMinimized(true);
1502 }
1503 
1505 {
1506  if (ShutdownRequested()) {
1507  if (rpcConsole)
1508  rpcConsole->hide();
1509  qApp->quit();
1510  }
1511 }
1512 
1513 
1514 static bool ThreadSafeMessageBox(BitcoinGUI* gui, const std::string& message, const std::string& caption, unsigned int style)
1515 {
1516  bool modal = (style & CClientUIInterface::MODAL);
1517  style &= ~CClientUIInterface::SECURE;
1518  bool ret = false;
1519  // In case of modal message, use blocking connection to wait for user to click a button
1520  QMetaObject::invokeMethod(gui, "message",
1521  modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection,
1522  Q_ARG(QString, QString::fromStdString(caption)),
1523  Q_ARG(QString, QString::fromStdString(message)),
1524  Q_ARG(unsigned int, style),
1525  Q_ARG(bool*, &ret));
1526  return ret;
1527 }
1528 
1530  QApplication::quit();
1531 }
1532 
1534 {
1535  // Connect signals to client
1536  uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
1537 }
1538 
1540 {
1541  // Disconnect signals from client
1542  uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
1543 }
1544 
1546 void BitcoinGUI::handleRestart(QStringList args)
1547 {
1548  if (!ShutdownRequested())
1549  Q_EMIT requestedRestart(args);
1550 }
1551 
1553  menu(0)
1554 {
1556  setToolTip(tr("Unit to show amounts in. Click to select another unit."));
1557 }
1558 
1561 {
1562  onDisplayUnitsClicked(event->pos());
1563 }
1564 
1567 {
1568  menu = new QMenu(this);
1569  menu->setAttribute(Qt::WA_DeleteOnClose);
1571  QAction* menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
1572  menuAction->setData(QVariant(u));
1573  menu->addAction(menuAction);
1574  }
1575  connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(onMenuSelection(QAction*)));
1576 }
1577 
1580 {
1581  if (optionsModel) {
1582  this->optionsModel = optionsModel;
1583 
1584  // be aware of a display unit change reported by the OptionsModel object.
1585  connect(optionsModel, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit(int)));
1586 
1587  // initialize the display units label with the current value in the model.
1589  }
1590 }
1591 
1594 {
1595  if (Params().NetworkID() == CBaseChainParams::MAIN) {
1596  setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(39, STATUSBAR_ICONSIZE));
1597  } else {
1598  setPixmap(QIcon(":/icons/unit_t" + BitcoinUnits::id(newUnits)).pixmap(39, STATUSBAR_ICONSIZE));
1599  }
1600 }
1601 
1604 {
1605  QPoint globalPos = mapToGlobal(point);
1606  menu->exec(globalPos);
1607 }
1608 
1611 {
1612  if (action) {
1613  optionsModel->setDisplayUnit(action->data());
1614  }
1615 }
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:24
BitcoinGUI::createToolBars
void createToolBars()
Create the toolbars.
Definition: bitcoingui.cpp:629
WalletFrame
Definition: walletframe.h:25
OpenURIDialog
Definition: openuridialog.h:15
CClientUIInterface::MSG_INFORMATION
@ MSG_INFORMATION
Predefined combinations for certain default usage cases.
Definition: guiinterface.h:74
BitcoinGUI::openBridgeClicked
void openBridgeClicked()
Definition: bitcoingui.cpp:968
BitcoinGUI::redditActionClicked
void redditActionClicked()
Definition: bitcoingui.cpp:908
notificator.h
Notificator::Critical
@ Critical
An error occurred.
Definition: notificator.h:39
BitcoinGUI::openGitWikiAction
QAction * openGitWikiAction
Definition: bitcoingui.h:139
BitcoinGUI::trayIcon
QSystemTrayIcon * trayIcon
Definition: bitcoingui.h:157
BitcoinUnits::id
static QString id(int unit)
Identifier, e.g. for image names.
Definition: bitcoinunits.cpp:42
vNodes
std::vector< CNode * > vNodes
Definition: net.cpp:85
BitcoinGUI::discordActionClicked
void discordActionClicked()
Definition: bitcoingui.cpp:888
CClientUIInterface::MODAL
@ MODAL
Force blocking, modal message box dialog (not just OS notification)
Definition: guiinterface.h:68
WalletFrame::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletframe.cpp:125
ShutdownRequested
bool ShutdownRequested()
Definition: init.cpp:135
BitcoinGUI::setWalletActionsEnabled
void setWalletActionsEnabled(bool enabled)
Enable or disable all wallet-related actions.
Definition: bitcoingui.cpp:774
BitcoinGUI::enableWallet
bool enableWallet
Definition: bitcoingui.h:72
BitcoinGUI::DEFAULT_WALLET
static const QString DEFAULT_WALLET
Definition: bitcoingui.h:53
BitcoinGUI::toggleHidden
void toggleHidden()
Simply calls showNormalIfMinimized(true) for use in SLOT() macro.
Definition: bitcoingui.cpp:1499
BitcoinGUI::frameBlocks
QFrame * frameBlocks
Definition: bitcoingui.h:150
CWallet::ReadStakingStatus
bool ReadStakingStatus()
Definition: wallet.cpp:370
CClientUIInterface
Signals for UI communication.
Definition: guiinterface.h:28
ClientModel::inInitialBlockDownload
bool inInitialBlockDownload() const
Return true if core is doing initial block download.
Definition: clientmodel.cpp:176
BitcoinGUI::rpcConsole
RPCConsole * rpcConsole
Definition: bitcoingui.h:160
OptionsModel::getMinimizeOnClose
bool getMinimizeOnClose()
Definition: optionsmodel.h:59
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:102
HelpMessageDialog
"Help message" dialog box
Definition: utilitydialog.h:20
Notificator::notify
void notify(Class cls, const QString &title, const QString &text, const QIcon &icon=QIcon(), int millisTimeout=10000)
Show notification message.
Definition: notificator.cpp:236
BitcoinGUI::createActions
void createActions(const NetworkStyle *networkStyle)
Create the main UI actions.
Definition: bitcoingui.cpp:277
BitcoinGUI::receivedURI
void receivedURI(const QString &uri)
Signal raised when a URI was entered or dragged to the GUI.
GUIUtil::showDataDir
bool showDataDir()
Definition: guiutil.cpp:374
ClientModel::getNumConnections
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
Definition: clientmodel.cpp:61
BitcoinGUI::openPeersAction
QAction * openPeersAction
Definition: bitcoingui.h:118
BitcoinUnits::formatWithUnit
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
Definition: bitcoinunits.cpp:190
CLIENT_VERSION_BUILD
#define CLIENT_VERSION_BUILD
Definition: prcycoin-config.h:12
BitcoinGUI::showDataDirAction
QAction * showDataDirAction
Definition: bitcoingui.h:122
BitcoinGUI::openBlockExplorerAPIClicked
void openBlockExplorerAPIClicked()
Definition: bitcoingui.cpp:943
BitcoinGUI::clientModel
ClientModel * clientModel
Definition: bitcoingui.h:84
UnitDisplayStatusBarControl
Definition: bitcoingui.h:306
uiInterface
CClientUIInterface uiInterface
Definition: init.cpp:101
walletmodel.h
BitcoinGUI::facebookAction
QAction * facebookAction
Definition: bitcoingui.h:127
ClientModel::getTorInfo
bool getTorInfo(std::string &ip_port) const
Definition: clientmodel.cpp:312
utilitydialog.h
BitcoinGUI::showQtDirAction
QAction * showQtDirAction
Definition: bitcoingui.h:123
CClientUIInterface::ICON_WARNING
@ ICON_WARNING
Definition: guiinterface.h:34
CMasternodeSync::IsBlockchainSynced
bool IsBlockchainSynced()
Definition: masternode-sync.cpp:32
BitcoinGUI::setStakingInProgress
void setStakingInProgress(bool)
Definition: bitcoingui.cpp:1407
BitcoinGUI::openGitWikiClicked
void openGitWikiClicked()
Definition: bitcoingui.cpp:938
GUIUtil::showQtDir
void showQtDir()
Definition: guiutil.cpp:384
BitcoinGUI::usedSendingAddressesAction
QAction * usedSendingAddressesAction
Definition: bitcoingui.h:100
WalletModel::Unlocked
@ Unlocked
Definition: walletmodel.h:127
BitcoinGUI::masternodeAction
QAction * masternodeAction
Definition: bitcoingui.h:97
BitcoinGUI::quitAction
QAction * quitAction
Definition: bitcoingui.h:98
masternode-sync.h
BitcoinGUI::overviewAction
QAction * overviewAction
Definition: bitcoingui.h:95
BitcoinGUI::progressDialog
QProgressDialog * progressDialog
Definition: bitcoingui.h:155
BitcoinGUI::serviceRequestFinished
void serviceRequestFinished(QNetworkReply *reply)
Definition: bitcoingui.cpp:994
NetworkStyle
Definition: networkstyle.h:13
BitcoinGUI::dropEvent
void dropEvent(QDropEvent *event)
Definition: bitcoingui.cpp:1354
BitcoinGUI::networkAction
QAction * networkAction
Definition: bitcoingui.h:106
BitcoinGUI::updateTorIcon
void updateTorIcon()
Set the Tor-enabled icon as shown in the UI.
Definition: bitcoingui.cpp:1469
BitcoinGUI::openToolkitClicked
void openToolkitClicked()
Definition: bitcoingui.cpp:978
GUIUtil::bringToFront
void bringToFront(QWidget *w)
Definition: guiutil.cpp:325
OptionsModel::setDisplayUnit
void setDisplayUnit(const QVariant &value)
Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal.
Definition: optionsmodel.cpp:357
BitcoinGUI::openDiscordSupportAction
QAction * openDiscordSupportAction
Definition: bitcoingui.h:144
BitcoinGUI::historyAction
QAction * historyAction
Definition: bitcoingui.h:96
guiinterface.h
BitcoinGUI::createTrayIconMenu
void createTrayIconMenu()
Create system tray menu (or setup the dock menu)
Definition: bitcoingui.cpp:803
WalletFrame::showSeedPhrase
void showSeedPhrase()
Show 24 word seed phrase.
Definition: walletframe.cpp:225
BitcoinGUI::setNumBlocks
void setNumBlocks(int count)
Set number of blocks shown in the UI.
Definition: bitcoingui.cpp:1142
BitcoinGUI::openTGTechSupportClicked
void openTGTechSupportClicked()
Definition: bitcoingui.cpp:953
overviewpage.h
GUIUtil::isObscured
bool isObscured(QWidget *w)
Definition: guiutil.cpp:320
BitcoinGUI::notificator
Notificator * notificator
Definition: bitcoingui.h:159
MacDockIconHandler::instance
static MacDockIconHandler * instance()
Definition: macdockiconhandler.mm:33
UnitDisplayStatusBarControl::setOptionsModel
void setOptionsModel(OptionsModel *optionsModel)
Lets the control know about the Options Model (and its signals)
Definition: bitcoingui.cpp:1579
MacDockIconHandler::cleanup
static void cleanup()
Definition: macdockiconhandler.mm:40
OptionsModel::getDisplayUnit
int getDisplayUnit()
Definition: optionsmodel.h:60
BitcoinGUI::openConfEditorAction
QAction * openConfEditorAction
Definition: bitcoingui.h:120
BitcoinGUI::telegramOfficialAction
QAction * telegramOfficialAction
Definition: bitcoingui.h:130
masternodeSync
CMasternodeSync masternodeSync
Definition: masternode-sync.cpp:19
rpcconsole.h
r
void const uint64_t uint64_t * r
Definition: field_5x52_asm_impl.h:10
UnitDisplayStatusBarControl::menu
QMenu * menu
Definition: bitcoingui.h:321
BitcoinGUI::BitcoinGUI
BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent=0)
Definition: bitcoingui.cpp:72
BitcoinGUI::steemitActionClicked
void steemitActionClicked()
Definition: bitcoingui.cpp:912
WalletFrame::gotoMultiSendDialog
void gotoMultiSendDialog()
Show MultiSend Dialog.
Definition: walletframe.cpp:151
BitcoinGUI::exitApp
void exitApp()
Definition: bitcoingui.cpp:1529
BitcoinGUI::openTGTechSupportAction
QAction * openTGTechSupportAction
Definition: bitcoingui.h:142
BitcoinGUI::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Definition: bitcoingui.cpp:1342
OptionsModel
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:18
BitcoinGUI::explorerWindow
BlockExplorer * explorerWindow
Definition: bitcoingui.h:161
ClientModel::getOptionsModel
OptionsModel * getOptionsModel()
Definition: clientmodel.cpp:198
BitcoinGUI::showProgress
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: bitcoingui.cpp:731
BitcoinUnits::availableUnits
static QList< Unit > availableUnits()
Get list of units, for drop-down box.
Definition: bitcoinunits.cpp:21
Notificator
Cross-platform desktop notification client.
Definition: notificator.h:24
MacDockIconHandler::dockIconClicked
void dockIconClicked()
CWallet::fMultiSendNotify
bool fMultiSendNotify
Definition: wallet.h:325
BitcoinGUI::mediumAction
QAction * mediumAction
Definition: bitcoingui.h:132
BitcoinGUI::stakingAction
QAction * stakingAction
Definition: bitcoingui.h:105
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl
UnitDisplayStatusBarControl()
Definition: bitcoingui.cpp:1552
BitcoinGUI::setClientModel
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: bitcoingui.cpp:693
BitcoinGUI::openRepairAction
QAction * openRepairAction
Definition: bitcoingui.h:119
BASE_WINDOW_MIN_HEIGHT
#define BASE_WINDOW_MIN_HEIGHT
Definition: bitcoingui.cpp:68
BitcoinGUI::redditAction
QAction * redditAction
Definition: bitcoingui.h:135
bdisableSystemnotifications
bool bdisableSystemnotifications
Definition: wallet.cpp:55
BitcoinGUI::unsubscribeFromCoreSignals
void unsubscribeFromCoreSignals()
Disconnect core signals from GUI client.
Definition: bitcoingui.cpp:1539
BitcoinGUI::showSeedAction
QAction * showSeedAction
Definition: bitcoingui.h:110
CLIENT_VERSION_MINOR
#define CLIENT_VERSION_MINOR
Definition: prcycoin-config.h:21
masternodelist.h
BitcoinGUI::openKBAction
QAction * openKBAction
Definition: bitcoingui.h:138
init.h
CClientUIInterface::ThreadSafeMessageBox
boost::signals2::signal< bool(const std::string &message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeMessageBox
Show message box.
Definition: guiinterface.h:80
WalletFrame::gotoOptionsPage
void gotoOptionsPage()
Switch to options page.
Definition: walletframe.cpp:132
Notificator::Information
@ Information
Informational message.
Definition: notificator.h:37
BitcoinGUI::~BitcoinGUI
~BitcoinGUI()
Definition: bitcoingui.cpp:260
BitcoinGUI::instagramActionClicked
void instagramActionClicked()
Definition: bitcoingui.cpp:904
fLiteMode
bool fLiteMode
Definition: util.cpp:100
BASE_WINDOW_WIDTH
#define BASE_WINDOW_WIDTH
Definition: bitcoingui.cpp:66
BitcoinGUI::walletFrame
WalletFrame * walletFrame
Definition: bitcoingui.h:85
GUIUtil::saveWindowGeometry
void saveWindowGeometry(const QString &strSetting, QWidget *parent)
Save window size and position.
Definition: guiutil.cpp:691
miner.h
BitcoinGUI::openBlockExplorerAPIAction
QAction * openBlockExplorerAPIAction
Definition: bitcoingui.h:140
CClientUIInterface::MSG_WARNING
@ MSG_WARNING
Definition: guiinterface.h:75
UnitDisplayStatusBarControl::updateDisplayUnit
void updateDisplayUnit(int newUnits)
When Display Units are changed on OptionsModel it will refresh the display text of the control on the...
Definition: bitcoingui.cpp:1593
GetBoolArg
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
Definition: util.cpp:255
RPCConsole
Local Bitcoin RPC console.
Definition: rpcconsole.h:30
CBaseChainParams::MAIN
@ MAIN
Definition: chainparamsbase.h:19
BitcoinGUI::showHelpMessageAction
QAction * showHelpMessageAction
Definition: bitcoingui.h:137
WalletModel::Unencrypted
@ Unencrypted
Definition: walletmodel.h:125
WalletFrame::gotoBlockExplorerPage
void gotoBlockExplorerPage()
Switch to explorer page.
Definition: walletframe.cpp:118
CAmount
int64_t CAmount
Amount in PRCY (Can be negative)
Definition: amount.h:17
LogPrintf
#define LogPrintf(...)
Definition: logging.h:147
GUIUtil::showBackups
bool showBackups()
Definition: guiutil.cpp:390
BitcoinGUI::telegramLoungeActionClicked
void telegramLoungeActionClicked()
Definition: bitcoingui.cpp:896
OptionsDialog::setModel
void setModel(OptionsModel *model)
Definition: optionsdialog.cpp:120
guiutil.h
BitcoinGUI::showNormalIfMinimized
void showNormalIfMinimized(bool fToggleHidden=false)
Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHid...
Definition: bitcoingui.cpp:1487
BitcoinGUI::eventFilter
bool eventFilter(QObject *object, QEvent *event)
Definition: bitcoingui.cpp:1349
BitcoinGUI::aboutQtAction
QAction * aboutQtAction
Definition: bitcoingui.h:114
BitcoinGUI::telegramOfficialActionClicked
void telegramOfficialActionClicked()
Definition: bitcoingui.cpp:892
BitcoinGUI::fMultiSend
bool fMultiSend
Definition: bitcoingui.h:73
optionsdialog.h
WalletFrame::setCurrentWallet
bool setCurrentWallet(const QString &name)
Definition: walletframe.cpp:60
BitcoinGUI::subscribeToCoreSignals
void subscribeToCoreSignals()
Connect core signals to GUI client.
Definition: bitcoingui.cpp:1533
BitcoinGUI::sendCoinsAction
QAction * sendCoinsAction
Definition: bitcoingui.h:99
BitcoinGUI::lockWalletAction
QAction * lockWalletAction
Definition: bitcoingui.h:113
BitcoinGUI::handleRestart
void handleRestart(QStringList args)
Get restart command-line parameters and request restart.
Definition: bitcoingui.cpp:1546
CMasternodeSync::GetSyncStatus
std::string GetSyncStatus()
Definition: masternode-sync.cpp:161
BitcoinGUI::setNumConnections
void setNumConnections(int count)
Set number of connections shown in the UI.
Definition: bitcoingui.cpp:1106
WalletModel::Locked
@ Locked
Definition: walletmodel.h:126
BitcoinGUI::multiSendAction
QAction * multiSendAction
Definition: bitcoingui.h:149
LogPrint
#define LogPrint(category,...)
Definition: logging.h:162
BitcoinGUI::mediumActionClicked
void mediumActionClicked()
Definition: bitcoingui.cpp:900
BitcoinGUI::openTGMNSupportClicked
void openTGMNSupportClicked()
Definition: bitcoingui.cpp:958
BitcoinGUI::optionsClicked
void optionsClicked()
Show configuration dialog.
Definition: bitcoingui.cpp:870
BitcoinGUI::receiveCoinsAction
QAction * receiveCoinsAction
Definition: bitcoingui.h:103
BitcoinGUI::backupWalletAction
QAction * backupWalletAction
Definition: bitcoingui.h:109
BitcoinGUI::detectShutdown
void detectShutdown()
called by a timer to check if fRequestShutdown has been set
Definition: bitcoingui.cpp:1504
CMasternodeSync::IsSynced
bool IsSynced()
Definition: masternode-sync.cpp:27
BitcoinGUI::showHelpMessageClicked
void showHelpMessageClicked()
Show help message dialog.
Definition: bitcoingui.cpp:926
BitcoinGUI::aboutClicked
void aboutClicked()
Show about dialog.
Definition: bitcoingui.cpp:917
BitcoinGUI::labelBlocksIcon
QLabel * labelBlocksIcon
Definition: bitcoingui.h:92
WalletFrame::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletframe.cpp:139
BitcoinGUI::requestedRestart
void requestedRestart(QStringList args)
Restart handling.
SPINNER_FRAMES
#define SPINNER_FRAMES
Definition: guiconstants.h:55
WalletFrame::gotoMasternodePage
void gotoMasternodePage()
Switch to masternode page.
Definition: walletframe.cpp:111
NetworkStyle::getTitleAddText
const QString & getTitleAddText() const
Definition: networkstyle.h:21
name
const char * name
Definition: rest.cpp:34
BitcoinGUI::twitterAction
QAction * twitterAction
Definition: bitcoingui.h:128
BlockExplorer
Definition: blockexplorer.h:25
BitcoinGUI::instagramAction
QAction * instagramAction
Definition: bitcoingui.h:134
BitcoinGUI::openKBClicked
void openKBClicked()
Definition: bitcoingui.cpp:933
BitcoinGUI::openInfoAction
QAction * openInfoAction
Definition: bitcoingui.h:115
CClientUIInterface::MSG_ERROR
@ MSG_ERROR
Definition: guiinterface.h:76
ClientModel
Model for PRCY network client.
Definition: clientmodel.h:44
BitcoinGUI::openAction
QAction * openAction
Definition: bitcoingui.h:125
CLIENT_VERSION_REVISION
#define CLIENT_VERSION_REVISION
Definition: prcycoin-config.h:24
BitcoinGUI::steemitAction
QAction * steemitAction
Definition: bitcoingui.h:133
guiconstants.h
walletframe.h
WalletFrame::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:34
BitcoinGUI::telegramLoungeAction
QAction * telegramLoungeAction
Definition: bitcoingui.h:131
BitcoinGUI::changePassphraseAction
QAction * changePassphraseAction
Definition: bitcoingui.h:111
help
UniValue help(const UniValue &params, bool fHelp)
Definition: server.cpp:231
BitcoinGUI::openNetworkAction
QAction * openNetworkAction
Definition: bitcoingui.h:117
BitcoinGUI::unlockWalletAction
QAction * unlockWalletAction
Definition: bitcoingui.h:112
networkstyle.h
BitcoinGUI::showBackupsAction
QAction * showBackupsAction
Definition: bitcoingui.h:124
ClientModel::getNumBlocks
int getNumBlocks()
Definition: clientmodel.cpp:84
BitcoinGUI::toggleHideAction
QAction * toggleHideAction
Definition: bitcoingui.h:107
BitcoinGUI::facebookActionClicked
void facebookActionClicked()
Social Networks.
Definition: bitcoingui.cpp:880
BitcoinGUI::openDiscordSupportClicked
void openDiscordSupportClicked()
Definition: bitcoingui.cpp:963
WalletFrame::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletframe.cpp:97
BitcoinGUI::createTrayIcon
void createTrayIcon(const NetworkStyle *networkStyle)
Create system tray icon and notification.
Definition: bitcoingui.cpp:790
OptionsModel::getMinimizeToTray
bool getMinimizeToTray()
Definition: optionsmodel.h:58
BitcoinGUI::trayIconActivated
void trayIconActivated(QSystemTrayIcon::ActivationReason reason)
Handle tray icon clicked.
Definition: bitcoingui.cpp:855
BCLog::STAKING
@ STAKING
Definition: logging.h:61
BitcoinUnits::Unit
Unit
PRCY units.
Definition: bitcoinunits.h:60
BitcoinGUI::openTGMNSupportAction
QAction * openTGMNSupportAction
Definition: bitcoingui.h:143
GUIUtil::blockingGUIThreadConnection
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
Definition: guiutil.cpp:304
BitcoinGUI::openMNConfEditorAction
QAction * openMNConfEditorAction
Definition: bitcoingui.h:121
BitcoinGUI::optionsAction
QAction * optionsAction
Definition: bitcoingui.h:104
Params
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:463
BitcoinGUI::usedReceivingAddressesAction
QAction * usedReceivingAddressesAction
Definition: bitcoingui.h:101
BitcoinGUI::twitterActionClicked
void twitterActionClicked()
Definition: bitcoingui.cpp:884
bitcoinunits.h
bitcoingui.h
BitcoinGUI::labelEncryptionIcon
QPushButton * labelEncryptionIcon
Definition: bitcoingui.h:89
BitcoinGUI::openBootStrapClicked
void openBootStrapClicked()
Definition: bitcoingui.cpp:948
BitcoinGUI::openBridgeAction
QAction * openBridgeAction
Definition: bitcoingui.h:145
BitcoinGUI::unitDisplayControl
UnitDisplayStatusBarControl * unitDisplayControl
Definition: bitcoingui.h:87
CClientUIInterface::ICON_ERROR
@ ICON_ERROR
Definition: guiinterface.h:35
CClientUIInterface::BTN_MASK
@ BTN_MASK
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated,...
Definition: guiinterface.h:59
BitcoinGUI::closeEvent
void closeEvent(QCloseEvent *event)
Definition: bitcoingui.cpp:1304
BitcoinGUI::openBootStrapAction
QAction * openBootStrapAction
Definition: bitcoingui.h:141
BitcoinGUI::message
void message(const QString &title, const QString &message, unsigned int style, bool *ret=NULL)
Notify the user of an event from the core network or transaction handling code.
Definition: bitcoingui.cpp:1232
WalletFrame::removeAllWallets
void removeAllWallets()
Definition: walletframe.cpp:81
WalletModel::UnlockedForStakingOnly
@ UnlockedForStakingOnly
Definition: walletmodel.h:128
BitcoinGUI::setStakingStatus
void setStakingStatus()
Definition: bitcoingui.cpp:1364
BitcoinGUI::trayIconMenu
QMenu * trayIconMenu
Definition: bitcoingui.h:158
BitcoinGUI::prevBlocks
int prevBlocks
Keep track of previous number of blocks, to detect progress.
Definition: bitcoingui.h:165
BitcoinGUI::createMenuBar
void createMenuBar()
Create the menu bar and sub-menus.
Definition: bitcoingui.cpp:540
BitcoinGUI::checkForUpdatesClicked
void checkForUpdatesClicked()
Definition: bitcoingui.cpp:983
UnitDisplayStatusBarControl::createContextMenu
void createContextMenu()
Creates context menu, its actions, and wires up all the relevant signals for mouse events.
Definition: bitcoingui.cpp:1566
BitcoinGUI::aboutAction
QAction * aboutAction
Definition: bitcoingui.h:102
RPCConsole::setClientModel
void setClientModel(ClientModel *model)
Definition: rpcconsole.cpp:388
UnitDisplayStatusBarControl::onMenuSelection
void onMenuSelection(QAction *action)
Tells underlying optionsModel to update its current display unit.
Definition: bitcoingui.cpp:1610
blockexplorer.h
optionsmodel.h
BitcoinGUI::labelTorIcon
QLabel * labelTorIcon
Definition: bitcoingui.h:90
BitcoinGUI::blockCount
QLabel * blockCount
Definition: bitcoingui.h:153
BitcoinGUI::changeEvent
void changeEvent(QEvent *e)
Definition: bitcoingui.cpp:1288
BitcoinUnits::name
static QString name(int unit)
Short name.
Definition: bitcoinunits.cpp:56
macdockiconhandler.h
NetworkStyle::getAppIcon
const QIcon & getAppIcon() const
Definition: networkstyle.h:20
GUIUtil::loadStyleSheet
QString loadStyleSheet()
Load global CSS theme.
Definition: guiutil.cpp:721
Notificator::Class
Class
Definition: notificator.h:36
BitcoinGUI::connectionCount
QLabel * connectionCount
Definition: bitcoingui.h:152
GetArg
std::string GetArg(const std::string &strArg, const std::string &strDefault)
Return string argument or default value.
Definition: util.cpp:241
BitcoinGUI::labelStakingIcon
QLabel * labelStakingIcon
Definition: bitcoingui.h:88
CWallet::isMultiSendEnabled
bool isMultiSendEnabled()
Definition: wallet.cpp:6142
pwalletMain
CWallet * pwalletMain
Definition: wallet.cpp:49
BitcoinGUI::checkForUpdatesAction
QAction * checkForUpdatesAction
Definition: bitcoingui.h:148
ClientModel::getLastBlockDate
QDateTime getLastBlockDate() const
Definition: clientmodel.cpp:109
BitcoinGUI
Bitcoin GUI main class.
Definition: bitcoingui.h:48
WalletFrame::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletframe.cpp:104
BitcoinGUI::openBlockExplorerAction
QAction * openBlockExplorerAction
Definition: bitcoingui.h:126
BitcoinGUI::spinnerFrame
int spinnerFrame
Definition: bitcoingui.h:166
openuridialog.h
BitcoinGUI::appMenuBar
QMenuBar * appMenuBar
Definition: bitcoingui.h:94
BitcoinGUI::encryptWalletAction
QAction * encryptWalletAction
Definition: bitcoingui.h:108
WalletFrame::showSyncStatus
void showSyncStatus(bool fShow)
Definition: walletframe.cpp:89
BitcoinGUI::stakingState
QLabel * stakingState
Definition: bitcoingui.h:151
BitcoinGUI::discordAction
QAction * discordAction
Definition: bitcoingui.h:129
WalletFrame::addWallet
bool addWallet(const QString &name, WalletModel *walletModel)
Definition: walletframe.cpp:39
BASE_WINDOW_HEIGHT
#define BASE_WINDOW_HEIGHT
Definition: bitcoingui.cpp:67
BitcoinGUI::openDexClicked
void openDexClicked()
Definition: bitcoingui.cpp:973
BitcoinGUI::openRPCConsoleAction
QAction * openRPCConsoleAction
Definition: bitcoingui.h:116
CLIENT_VERSION_MAJOR
#define CLIENT_VERSION_MAJOR
Definition: prcycoin-config.h:18
MacDockIconHandler
Macintosh-specific dock icon handler.
Definition: macdockiconhandler.h:13
BitcoinGUI::isStartup
bool isStartup
Definition: bitcoingui.h:74
clientmodel.h
UnitDisplayStatusBarControl::onDisplayUnitsClicked
void onDisplayUnitsClicked(const QPoint &point)
Shows context menu with Display Unit options by the mouse coordinates.
Definition: bitcoingui.cpp:1603
GUIUtil::restoreWindowGeometry
void restoreWindowGeometry(const QString &strSetting, const QSize &defaultSize, QWidget *parent)
Restore window size and position.
Definition: guiutil.cpp:704
CCryptoKeyStore::IsLocked
bool IsLocked() const
Definition: crypter.h:159
error
bool error(const char *fmt, const Args &... args)
Definition: util.h:61
BitcoinGUI::labelConnectionsIcon
QPushButton * labelConnectionsIcon
Definition: bitcoingui.h:91
UnitDisplayStatusBarControl::mousePressEvent
void mousePressEvent(QMouseEvent *event)
So that it responds to left-button clicks.
Definition: bitcoingui.cpp:1560
Notificator::Warning
@ Warning
Notify user of potential problem.
Definition: notificator.h:38
BitcoinGUI::openDexAction
QAction * openDexAction
Definition: bitcoingui.h:146
BitcoinGUI::openToolkitAction
QAction * openToolkitAction
Definition: bitcoingui.h:147
UnitDisplayStatusBarControl::optionsModel
OptionsModel * optionsModel
Definition: bitcoingui.h:320