Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ QT_TS = \
QT_FORMS_UI = \
qt/forms/addressbookpage.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/bittrextradingtab.ui \
qt/forms/coincontroldialog.ui \
qt/forms/obfuscationconfig.ui \
qt/forms/editaddressdialog.ui \
Expand All @@ -47,6 +48,7 @@ QT_MOC_CPP = \
qt/moc_bitcoinamountfield.cpp \
qt/moc_bitcoingui.cpp \
qt/moc_bitcoinunits.cpp \
qt/moc_bittrextradingtab.cpp \
qt/moc_clientmodel.cpp \
qt/moc_coincontroldialog.cpp \
qt/moc_coincontroltreewidget.cpp \
Expand Down Expand Up @@ -113,6 +115,7 @@ BITCOIN_QT_H = \
qt/bitcoinamountfield.h \
qt/bitcoingui.h \
qt/bitcoinunits.h \
qt/bittrextradingtab.h \
qt/clientmodel.h \
qt/coincontroldialog.h \
qt/coincontroltreewidget.h \
Expand Down Expand Up @@ -208,6 +211,7 @@ RES_ICONS = \
qt/res/icons/remove.png \
qt/res/icons/send.png \
qt/res/icons/synced.png \
qt/res/icons/trade.png \
qt/res/icons/transaction0.png \
qt/res/icons/transaction2.png \
qt/res/icons/transaction_conflicted.png \
Expand Down Expand Up @@ -249,6 +253,7 @@ BITCOIN_QT_CPP += \
qt/addressbookpage.cpp \
qt/addresstablemodel.cpp \
qt/askpassphrasedialog.cpp \
qt/bittrextradingtab.cpp \
qt/coincontroldialog.cpp \
qt/coincontroltreewidget.cpp \
qt/obfuscationconfig.cpp \
Expand Down
17 changes: 17 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "bitcoingui.h"

#include "bitcoinunits.h"
#include "bittrextradingtab.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
Expand Down Expand Up @@ -315,6 +316,13 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
#endif
tabGroup->addAction(historyAction);

bittrexTradingAction = new QAction(QIcon(":/icons/trade"), tr("&Trade"), this);
bittrexTradingAction->setStatusTip(tr("Buy/Sell at Bittrex"));
bittrexTradingAction->setToolTip(bittrexTradingAction->statusTip());
bittrexTradingAction->setCheckable(true);
bittrexTradingAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
tabGroup->addAction(bittrexTradingAction);

#ifdef ENABLE_WALLET
// These showNormalIfMinimized are needed because Send Coins and Receive Coins
// can be triggered from the tray menu, and need to show the GUI to be useful.
Expand All @@ -326,6 +334,8 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
connect(bittrexTradingAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(bittrexTradingAction, SIGNAL(triggered()), this, SLOT(gotoBittrexTradingTab()));
#endif // ENABLE_WALLET

quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
Expand Down Expand Up @@ -479,6 +489,7 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(bittrexTradingAction);
toolbar->setMovable(false); // remove unused icon in upper left corner
overviewAction->setChecked(true);

Expand Down Expand Up @@ -705,6 +716,12 @@ void BitcoinGUI::gotoSendCoinsPage(QString addr)
if (walletFrame) walletFrame->gotoSendCoinsPage(addr);
}

void BitcoinGUI::gotoBittrexTradingTab()
{
bittrexTradingAction->setChecked(true);
if (walletFrame) walletFrame->gotoBittrexTradingTab();
}

void BitcoinGUI::gotoSignMessageTab(QString addr)
{
if (walletFrame) walletFrame->gotoSignMessageTab(addr);
Expand Down
3 changes: 3 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class BitcoinGUI : public QMainWindow
QAction *sendCoinsAction;
QAction *usedSendingAddressesAction;
QAction *usedReceivingAddressesAction;
QAction *bittrexTradingAction;
QAction *signMessageAction;
QAction *verifyMessageAction;
QAction *aboutAction;
Expand Down Expand Up @@ -192,6 +193,8 @@ private slots:
void gotoReceiveCoinsPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Switch to manage names page */
void gotoBittrexTradingTab();

/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
Expand Down
Loading