29 #endif // ENABLE_WALLET
43 #include <QApplication>
45 #include <QDesktopWidget>
46 #include <QDragEnterEvent>
48 #include <QListWidget>
50 #include <QMessageBox>
52 #include <QMouseEvent>
55 #include <QStackedWidget>
60 #include <QVBoxLayout>
61 #include <QPushButton>
62 #include <QDesktopServices>
63 #include <QNetworkAccessManager>
66 #define BASE_WINDOW_WIDTH 800
67 #define BASE_WINDOW_HEIGHT 768
68 #define BASE_WINDOW_MIN_HEIGHT 600
75 unitDisplayControl(0),
77 labelEncryptionIcon(0),
79 labelConnectionsIcon(0),
87 usedSendingAddressesAction(0),
88 usedReceivingAddressesAction(0),
90 receiveCoinsAction(0),
94 encryptWalletAction(0),
95 backupWalletAction(0),
96 changePassphraseAction(0),
98 openRPCConsoleAction(0),
100 showHelpMessageAction(0),
118 QRect rec = QApplication::desktop()->screenGeometry();
126 QString windowTitle = tr(
"PRivaCY Coin") +
" ";
133 #endif // ENABLE_WALLET
135 windowTitle += tr(
"Wallet");
137 windowTitle += tr(
"Node");
140 windowTitle += tr(
" - Lite Mode");
142 QString userWindowTitle = QString::fromStdString(
GetArg(
"-windowtitle",
""));
143 if (!userWindowTitle.isEmpty()) windowTitle +=
" - " + userWindowTitle;
145 QApplication::setWindowIcon(networkStyle->
getAppIcon());
147 setWindowTitle(windowTitle);
156 #endif // ENABLE_WALLET
165 setAcceptDrops(
true);
183 frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
184 QHBoxLayout* frameBlocksLayout =
new QHBoxLayout(
frameBlocks);
185 frameBlocksLayout->setContentsMargins(3, 0, 3, 0);
186 frameBlocksLayout->setSpacing(3);
191 labelEncryptionIcon->setStyleSheet(
".QPushButton { background-color: rgba(255, 255, 255, 0);}");
196 labelConnectionsIcon->setStyleSheet(
".QPushButton { background-color: rgba(255, 255, 255, 0);}");
201 frameBlocksLayout->addStretch();
203 frameBlocksLayout->addStretch();
205 frameBlocksLayout->addStretch();
209 frameBlocksLayout->addStretch();
211 frameBlocksLayout->addStretch();
213 frameBlocksLayout->addStretch();
241 this->installEventFilter(
this);
253 connect(timerStakingIcon, SIGNAL(timeout()),
this, SLOT(
setStakingStatus()));
254 timerStakingIcon->start(10000);
279 QActionGroup* tabGroup =
new QActionGroup(
this);
281 overviewAction =
new QAction(QIcon(
":/icons/overview"), tr(
"&Overview"),
this);
293 sendCoinsAction =
new QAction(QIcon(
":/icons/send"), tr(
"&Send"),
this);
304 receiveCoinsAction =
new QAction(QIcon(
":/icons/receiving_addresses"), tr(
"&Receive"),
this);
315 historyAction =
new QAction(QIcon(
":/icons/history"), tr(
"&History"),
this);
320 historyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_4));
322 historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
327 masternodeAction =
new QAction(QIcon(
":/icons/masternodes"), tr(
"&Masternodes"),
this);
341 connect(
masternodeAction, SIGNAL(triggered()),
this, SLOT(gotoMasternodePage()));
346 connect(
overviewAction, SIGNAL(triggered()),
this, SLOT(gotoOverviewPage()));
348 connect(
sendCoinsAction, SIGNAL(triggered()),
this, SLOT(gotoSendCoinsPage()));
352 connect(
historyAction, SIGNAL(triggered()),
this, SLOT(gotoHistoryPage()));
353 #endif // ENABLE_WALLET
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));
360 aboutAction->setStatusTip(tr(
"Show information about PRCY"));
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"));
365 optionsAction =
new QAction(QIcon(
":/icons/options"), tr(
"&Settings"),
this);
372 optionsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_6));
374 optionsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
379 stakingAction =
new QAction(QIcon(
":/icons/options"), tr(
"&Staking"),
this);
386 networkAction =
new QAction(QIcon(
":/icons/options"), tr(
"&Network"),
this);
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"));
402 backupWalletAction =
new QAction(QIcon(
":/icons/filesave"), tr(
"&Backup Wallet..."),
this);
404 showSeedAction =
new QAction(QIcon(
":/icons/seedphrase"), tr(
"&Show Seed Phrase"),
this);
405 showSeedAction->setStatusTip(tr(
"Show 24 word wallet seed phrase"));
411 multiSendAction =
new QAction(QIcon(
":/icons/edit"), tr(
"&MultiSend"),
this);
415 openInfoAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Information"),
this);
420 openNetworkAction =
new QAction(QIcon(
":/icons/connect_4"), tr(
"&Network Monitor"),
this);
422 openPeersAction =
new QAction(QIcon(
":/icons/connect_4"), tr(
"&Peers List"),
this);
424 openRepairAction =
new QAction(QIcon(
":/icons/options"), tr(
"Wallet &Repair"),
this);
426 openConfEditorAction =
new QAction(QIcon(
":/icons/edit"), tr(
"Open Wallet &Configuration File"),
this);
429 openMNConfEditorAction =
new QAction(QIcon(
":/icons/edit"), tr(
"Open &Masternode Configuration File"),
this);
432 showDataDirAction =
new QAction(QIcon(
":/icons/browse"), tr(
"Show &PRCYcoin Folder"),
this);
435 showQtDirAction =
new QAction(QIcon(
":/icons/browse"), tr(
"Show &Qt Folder"),
this);
438 showBackupsAction =
new QAction(QIcon(
":/icons/browse"), tr(
"Show Automatic &Backups"),
this);
439 showBackupsAction->setStatusTip(tr(
"Show automatically created wallet backups"));
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"));
451 facebookAction =
new QAction(QIcon(
":/icons/facebook"), tr(
"Facebook"),
this);
453 twitterAction =
new QAction(QIcon(
":/icons/twitter"), tr(
"Twitter"),
this);
455 discordAction =
new QAction(QIcon(
":/icons/discord"), tr(
"Discord"),
this);
461 mediumAction =
new QAction(QIcon(
":/icons/medium"), tr(
"Medium"),
this);
463 steemitAction =
new QAction(QIcon(
":/icons/steemit"), tr(
"Steemit"),
this);
465 instagramAction =
new QAction(QIcon(
":/icons/instagram"), tr(
"Instagram"),
this);
467 redditAction =
new QAction(QIcon(
":/icons/reddit"), tr(
"Reddit"),
this);
470 showHelpMessageAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Command-line Options"),
this);
472 showHelpMessageAction->setStatusTip(tr(
"Show the PRCY help message to get a list with possible PRCY command-line options"));
475 openKBAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Knowledge Base"),
this);
477 openGitWikiAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&GitHub Wiki"),
this);
479 openBlockExplorerAPIAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Blockchain Explorer API"),
this);
481 openBootStrapAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&BootStrap"),
this);
483 openBridgeAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Bridge"),
this);
485 openDexAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&PRivaCY DEX"),
this);
487 openToolkitAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&PRCY Toolkit"),
this);
491 openTGMNSupportAction =
new QAction(QIcon(
":/icons/telegram"), tr(
"&Telegram Masternode Support"),
this);
495 checkForUpdatesAction =
new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr(
"&Check For Updates"),
this);
498 connect(
quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
500 connect(
aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
501 connect(
optionsAction, SIGNAL(triggered()),
this, SLOT(gotoOptionsPage()));
519 connect(
showSeedAction, SIGNAL(triggered()),
this, SLOT(showSeedPhrase()));
525 connect(
openAction, SIGNAL(triggered()),
this, SLOT(openClicked()));
526 connect(
multiSendAction, SIGNAL(triggered()),
this, SLOT(gotoMultiSendDialog()));
528 #endif // ENABLE_WALLET
551 QMenu* file =
appMenuBar->addMenu(tr(
"&File"));
555 file->addSeparator();
579 QMenu* tools =
appMenuBar->addMenu(tr(
"&Tools"));
585 tools->addSeparator();
594 QMenu* socials =
appMenuBar->addMenu(tr(
"Social"));
607 help->addSeparator();
610 help->addSeparator();
616 help->addSeparator();
621 help->addSeparator();
623 help->addSeparator();
632 QToolBar* toolbar =
new QToolBar(
this);
633 toolbar->setOrientation(Qt::Vertical);
634 toolbar->setObjectName(
"Main-Toolbar");
635 toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
644 toolbar->setMovable(
false);
646 toolbar->setStyleSheet(
"QToolBar{spacing:18px;}");
649 QToolBar* bottomToolbar =
new QToolBar(
this);
651 bottomToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
652 bottomToolbar->setOrientation(Qt::Vertical);
654 bottomToolbar->addSeparator();
660 bottomToolbar->setStyleSheet(
"QToolBar{spacing:5px;}");
661 bottomToolbar->setObjectName(
"bottomToolbar");
667 QHBoxLayout* layout =
new QHBoxLayout();
668 QVBoxLayout* navLayout =
new QVBoxLayout();
669 QWidget* navWidget =
new QWidget(
this);
670 navWidget->setObjectName(
"navLayout");
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");
678 navLayout->addWidget(prcyico);
679 navLayout->addWidget(toolbar);
680 navLayout->addWidget(bottomToolbar);
681 navWidget->setLayout(navLayout);
683 layout->addWidget(navWidget);
685 layout->setSpacing(0);
686 layout->setContentsMargins(QMargins());
687 QWidget* containerWidget =
new QWidget();
688 containerWidget->setLayout(layout);
689 setCentralWidget(containerWidget);
709 connect(
clientModel, SIGNAL(
message(QString, QString,
unsigned int)),
this, SLOT(
message(QString, QString,
unsigned int)));
719 #endif // ENABLE_WALLET
733 if (nProgress == 0) {
739 }
else if (nProgress == 100) {
750 bool BitcoinGUI::addWallet(
const QString&
name,
WalletModel* walletModel)
758 bool BitcoinGUI::setCurrentWallet(
const QString&
name)
765 void BitcoinGUI::removeAllWallets()
772 #endif // ENABLE_WALLET
793 trayIcon =
new QSystemTrayIcon(
this);
794 QString toolTip = tr(
"PRCY client") +
" " + networkStyle->
getTitleAddText();
813 connect(
trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
848 #ifndef Q_OS_MAC // This is built-in on macOS
857 if (reason == QSystemTrayIcon::Trigger) {
863 void BitcoinGUI::macosDockIconActivated()
882 QDesktopServices::openUrl(QUrl(
"https://www.facebook.com/Prcycoin-101534778505838"));
886 QDesktopServices::openUrl(QUrl(
"https://twitter.com/PRCYcoin"));
890 QDesktopServices::openUrl(QUrl(
"https://discord.prcycoin.com"));
894 QDesktopServices::openUrl(QUrl(
"https://t.me/prcycoinofficial"));
898 QDesktopServices::openUrl(QUrl(
"https://t.me/prcylounge"));
902 QDesktopServices::openUrl(QUrl(
"https://prcycoin.medium.com/"));
906 QDesktopServices::openUrl(QUrl(
"https://www.instagram.com/PRCYCoin/"));
910 QDesktopServices::openUrl(QUrl(
"https://www.reddit.com/r/PRCYCoin/"));
914 QDesktopServices::openUrl(QUrl(
"https://steemit.com/@PRCYCoin/"));
929 help->setAttribute(Qt::WA_DeleteOnClose);
935 QDesktopServices::openUrl(QUrl(
"https://prcycoin.com/knowledge-base"));
940 QDesktopServices::openUrl(QUrl(
"https://github.com/PRCYCoin/PRCYCoin/wiki"));
945 QDesktopServices::openUrl(QUrl(
"https://explorer.prcycoin.com/api/getblockcount"));
950 QDesktopServices::openUrl(QUrl(
"https://bootstrap.prcycoin.com"));
955 QDesktopServices::openUrl(QUrl(
"https://t.me/prcySupport"));
960 QDesktopServices::openUrl(QUrl(
"https://t.me/PRCY_MN_Support"));
965 QDesktopServices::openUrl(QUrl(
"https://discord.prcycoin.com"));
970 QDesktopServices::openUrl(QUrl(
"https://bridge.prcycoin.com"));
975 QDesktopServices::openUrl(QUrl(
"https://privacydex.io"));
980 QDesktopServices::openUrl(QUrl(
"https://toolkit.prcycoin.com"));
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);
989 QNetworkRequest request;
990 request.setUrl(serviceUrl);
991 QNetworkReply* reply = manager->get(request);
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"));
1010 LogPrintf(
"Check For Updates: Update Available, but declined by user.\n");
1014 LogPrintf(
"Check For Updates: No update available.\n");
1017 msgBox.setWindowTitle(
"No Update Available");
1018 msgBox.setText(
"No update available.\n\nYour wallet is up to date.");
1020 msgBox.setIcon(QMessageBox::Information);
1025 LogPrintf(
"Check For Updates: Error!\n");
1026 QByteArray
error = reply->readAll();
1028 msgBox.setWindowTitle(
"Error");
1029 msgBox.setText(
"Error checking for updates.\n\n" +
error);
1031 msgBox.setIcon(QMessageBox::Critical);
1037 #ifdef ENABLE_WALLET
1038 void BitcoinGUI::openClicked()
1046 void BitcoinGUI::gotoOverviewPage()
1052 void BitcoinGUI::gotoHistoryPage()
1058 void BitcoinGUI::gotoMasternodePage()
1065 void BitcoinGUI::gotoReceiveCoinsPage()
1071 void BitcoinGUI::gotoOptionsPage()
1077 void BitcoinGUI::gotoSendCoinsPage(QString addr)
1080 if (settings.value(
"fLockSendStaking",
false).toBool()) {
1082 LogPrintf(
"Attempt to go to Send tab blocked.\n");
1089 void BitcoinGUI::gotoMultiSendDialog()
1095 void BitcoinGUI::gotoBlockExplorerPage()
1100 void BitcoinGUI::showSeedPhrase()
1104 #endif // ENABLE_WALLET
1111 icon =
":/icons/connect_0";
1116 icon =
":/icons/connect_1";
1121 icon =
":/icons/connect_2";
1126 icon =
":/icons/connect_3";
1129 icon =
":/icons/connect_4";
1150 QDateTime currentDate = QDateTime::currentDateTime();
1151 int secs = lastBlockDate.secsTo(currentDate);
1153 tooltip = tr(
"Processed %n blocks of transaction history.",
"", count);
1158 QString strSyncStatus;
1159 tooltip = tr(
"Up to date") + QString(
".<br>") + tooltip;
1162 labelBlocksIcon->setPixmap(QIcon(
":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1168 ":/movies/spinner-%1")
1170 .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1173 #ifdef ENABLE_WALLET
1176 #endif // ENABLE_WALLET
1180 tooltip = strSyncStatus + QString(
"<br>") + tooltip;
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;
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);
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));
1200 tooltip = tr(
"Catching up...") + QString(
"<br>") + tooltip;
1203 ":/movies/spinner-%1")
1205 .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
1210 #ifdef ENABLE_WALLET
1213 #endif // ENABLE_WALLET
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.");
1222 blockCount->setText(tr(
"Loading Blocks..."));
1224 blockCount->setText(tr(
"Syncing Blocks..."));
1226 blockCount->setText(tr(
"%n Blocks",
"", count));
1234 QString strTitle = tr(
"PRCY");
1236 int nMBoxIcon = QMessageBox::Information;
1242 if (!title.isEmpty()) {
1247 msgType = tr(
"Error");
1250 msgType = tr(
"Warning");
1253 msgType = tr(
"Information");
1260 if (!msgType.isEmpty())
1261 strTitle +=
" - " + msgType;
1265 nMBoxIcon = QMessageBox::Critical;
1268 nMBoxIcon = QMessageBox::Warning;
1275 QMessageBox::StandardButton buttons;
1277 buttons = QMessageBox::Ok;
1280 QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle,
message, buttons,
this);
1281 int r = mBox.exec();
1283 *ret =
r == QMessageBox::Ok;
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()));
1306 #ifndef Q_OS_MAC // Ignored on Mac
1309 QApplication::quit();
1313 QMainWindow::closeEvent(event);
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)
1329 "Confirmations: %5\n")
1334 .arg(confirmations),
1340 #endif // ENABLE_WALLET
1345 if (event->mimeData()->hasUrls())
1346 event->acceptProposedAction();
1356 if (event->mimeData()->hasUrls()) {
1357 Q_FOREACH (
const QUrl& uri, event->mimeData()->urls()) {
1361 event->acceptProposedAction();
1367 bool stkStatus =
false;
1412 stakingState->setToolTip(
"Enabling Staking... Please wait up to 1.5 hours for it to be properly enabled after consolidation.");
1422 #ifdef ENABLE_WALLET
1424 void BitcoinGUI::setEncryptionStatus(
int status)
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>"));
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"));
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>"));
1467 #endif // ENABLE_WALLET
1471 std::string ip_port;
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));
1514 static bool ThreadSafeMessageBox(
BitcoinGUI* gui,
const std::string& message,
const std::string& caption,
unsigned int style)
1520 QMetaObject::invokeMethod(gui,
"message",
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));
1530 QApplication::quit();
1556 setToolTip(tr(
"Unit to show amounts in. Click to select another unit."));
1568 menu =
new QMenu(
this);
1569 menu->setAttribute(Qt::WA_DeleteOnClose);
1572 menuAction->setData(QVariant(u));
1573 menu->addAction(menuAction);
1596 setPixmap(QIcon(
":/icons/unit_" +
BitcoinUnits::id(newUnits)).pixmap(39, STATUSBAR_ICONSIZE));
1598 setPixmap(QIcon(
":/icons/unit_t" +
BitcoinUnits::id(newUnits)).pixmap(39, STATUSBAR_ICONSIZE));
1605 QPoint globalPos = mapToGlobal(point);
1606 menu->exec(globalPos);