|
22 | 22 | #ifdef ENABLE_WALLET |
23 | 23 | #include "walletframe.h" |
24 | 24 | #include "walletmodel.h" |
| 25 | +#include "tradingdialog.h" |
25 | 26 | #endif // ENABLE_WALLET |
26 | 27 |
|
27 | 28 | #ifdef Q_OS_MAC |
@@ -101,6 +102,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : |
101 | 102 | trayIconMenu(0), |
102 | 103 | notificator(0), |
103 | 104 | rpcConsole(0), |
| 105 | + tradingWindow(0), |
104 | 106 | prevBlocks(0), |
105 | 107 | spinnerFrame(0) |
106 | 108 | { |
@@ -241,6 +243,11 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : |
241 | 243 | // prevents an open debug window from becoming stuck/unusable on client shutdown |
242 | 244 | connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); |
243 | 245 |
|
| 246 | + connect(openTradingwindowAction, SIGNAL(triggered()), tradingWindow, SLOT(show())); |
| 247 | + |
| 248 | + // prevents an oben debug window from becoming stuck/unusable on client shutdown |
| 249 | + connect(quitAction, SIGNAL(triggered()), tradingWindow, SLOT(hide())); |
| 250 | + |
244 | 251 | // Install event filter to be able to catch status tip events (QEvent::StatusTip) |
245 | 252 | this->installEventFilter(this); |
246 | 253 |
|
@@ -406,6 +413,9 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle) |
406 | 413 | openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); |
407 | 414 | openAction->setStatusTip(tr("Open a DarkNet: URI or payment request")); |
408 | 415 |
|
| 416 | + openTradingwindowAction = new QAction(QIcon(":/icons/trade"), tr("&Trading window"), this); |
| 417 | + openTradingwindowAction->setStatusTip(tr("Bittrex trading window")); |
| 418 | + |
409 | 419 | showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this); |
410 | 420 | showHelpMessageAction->setMenuRole(QAction::NoRole); |
411 | 421 | showHelpMessageAction->setStatusTip(tr("Show the DarkNet Core help message to get a list with possible DarkNet command-line options")); |
@@ -469,6 +479,9 @@ void BitcoinGUI::createMenuBar() |
469 | 479 | } |
470 | 480 | settings->addAction(optionsAction); |
471 | 481 |
|
| 482 | + QMenu *trading = appMenuBar->addMenu(tr("&Trade")); |
| 483 | + trading->addAction(openTradingwindowAction); |
| 484 | + |
472 | 485 | if(walletFrame) |
473 | 486 | { |
474 | 487 | QMenu *tools = appMenuBar->addMenu(tr("&Tools")); |
@@ -649,6 +662,7 @@ void BitcoinGUI::createTrayIconMenu() |
649 | 662 | trayIconMenu->addAction(verifyMessageAction); |
650 | 663 | trayIconMenu->addSeparator(); |
651 | 664 | trayIconMenu->addAction(optionsAction); |
| 665 | + trayIconMenu->addAction(openTradingwindowAction); |
652 | 666 | trayIconMenu->addAction(openInfoAction); |
653 | 667 | trayIconMenu->addAction(openRPCConsoleAction); |
654 | 668 | trayIconMenu->addAction(openNetworkAction); |
@@ -753,6 +767,12 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr) |
753 | 767 | if (walletFrame) walletFrame->gotoVerifyMessageTab(addr); |
754 | 768 | } |
755 | 769 |
|
| 770 | +void BitcoinGUI::gotoTradingPage() |
| 771 | +{ |
| 772 | + openTradingwindowAction->setChecked(true); |
| 773 | + if (walletFrame) walletFrame->gotoTradingPage(); |
| 774 | +} |
| 775 | + |
756 | 776 | #endif // ENABLE_WALLET |
757 | 777 |
|
758 | 778 | void BitcoinGUI::setNumConnections(int count) |
|
0 commit comments