Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ QT_FORMS_UI = \
qt/forms/sendcoinsdialog.ui \
qt/forms/sendcoinsentry.ui \
qt/forms/signverifymessagedialog.ui \
qt/forms/tradingdialog.ui \
qt/forms/transactiondescdialog.ui

QT_MOC_CPP = \
Expand Down Expand Up @@ -76,6 +77,7 @@ QT_MOC_CPP = \
qt/moc_sendcoinsentry.cpp \
qt/moc_signverifymessagedialog.cpp \
qt/moc_splashscreen.cpp \
qt/moc_tradingdialog.cpp \
qt/moc_trafficgraphwidget.cpp \
qt/moc_transactiondesc.cpp \
qt/moc_transactiondescdialog.cpp \
Expand Down Expand Up @@ -147,6 +149,7 @@ BITCOIN_QT_H = \
qt/sendcoinsentry.h \
qt/signverifymessagedialog.h \
qt/splashscreen.h \
qt/tradingdialog.h \
qt/trafficgraphwidget.h \
qt/transactiondesc.h \
qt/transactiondescdialog.h \
Expand Down Expand Up @@ -215,6 +218,7 @@ RES_ICONS = \
qt/res/icons/staking_active.png \
qt/res/icons/staking_inactive.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/qvaluecombobox.cpp \
qt/rpcconsole.cpp \
qt/splashscreen.cpp \
qt/tradingdialog.cpp \
qt/trafficgraphwidget.cpp \
qt/utilitydialog.cpp \
qt/winshutdownmonitor.cpp
Expand All @@ -273,6 +278,7 @@ BITCOIN_QT_CPP += \
qt/sendcoinsdialog.cpp \
qt/sendcoinsentry.cpp \
qt/signverifymessagedialog.cpp \
qt/tradingdialog.cpp \
qt/transactiondesc.cpp \
qt/transactiondescdialog.cpp \
qt/transactionfilterproxy.cpp \
Expand Down
20 changes: 20 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifdef ENABLE_WALLET
#include "walletframe.h"
#include "walletmodel.h"
#include "tradingdialog.h"
#endif // ENABLE_WALLET

#ifdef Q_OS_MAC
Expand Down Expand Up @@ -101,6 +102,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
trayIconMenu(0),
notificator(0),
rpcConsole(0),
tradingWindow(0),
prevBlocks(0),
spinnerFrame(0)
{
Expand Down Expand Up @@ -241,6 +243,11 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
// prevents an open debug window from becoming stuck/unusable on client shutdown
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));

connect(openTradingwindowAction, SIGNAL(triggered()), tradingWindow, SLOT(show()));

// prevents an oben debug window from becoming stuck/unusable on client shutdown
connect(quitAction, SIGNAL(triggered()), tradingWindow, SLOT(hide()));

// Install event filter to be able to catch status tip events (QEvent::StatusTip)
this->installEventFilter(this);

Expand Down Expand Up @@ -406,6 +413,9 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this);
openAction->setStatusTip(tr("Open a DarkNet: URI or payment request"));

openTradingwindowAction = new QAction(QIcon(":/icons/trade"), tr("&Trading window"), this);
openTradingwindowAction->setStatusTip(tr("Bittrex trading window"));

showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
showHelpMessageAction->setMenuRole(QAction::NoRole);
showHelpMessageAction->setStatusTip(tr("Show the DarkNet Core help message to get a list with possible DarkNet command-line options"));
Expand Down Expand Up @@ -469,6 +479,9 @@ void BitcoinGUI::createMenuBar()
}
settings->addAction(optionsAction);

QMenu *trading = appMenuBar->addMenu(tr("&Trade"));
trading->addAction(openTradingwindowAction);

if(walletFrame)
{
QMenu *tools = appMenuBar->addMenu(tr("&Tools"));
Expand Down Expand Up @@ -649,6 +662,7 @@ void BitcoinGUI::createTrayIconMenu()
trayIconMenu->addAction(verifyMessageAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(optionsAction);
trayIconMenu->addAction(openTradingwindowAction);
trayIconMenu->addAction(openInfoAction);
trayIconMenu->addAction(openRPCConsoleAction);
trayIconMenu->addAction(openNetworkAction);
Expand Down Expand Up @@ -753,6 +767,12 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr)
if (walletFrame) walletFrame->gotoVerifyMessageTab(addr);
}

void BitcoinGUI::gotoTradingPage()
{
openTradingwindowAction->setChecked(true);
if (walletFrame) walletFrame->gotoTradingPage();
}

#endif // ENABLE_WALLET

void BitcoinGUI::setNumConnections(int count)
Expand Down
4 changes: 4 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ClientModel;
class NetworkStyle;
class Notificator;
class OptionsModel;
class tradingDialog;
class RPCConsole;
class SendCoinsRecipient;
class UnitDisplayStatusBarControl;
Expand Down Expand Up @@ -123,6 +124,7 @@ class BitcoinGUI : public QMainWindow
QMenu *trayIconMenu;
Notificator *notificator;
RPCConsole *rpcConsole;
tradingDialog *tradingWindow;

/** Keep track of previous number of blocks, to detect progress */
int prevBlocks;
Expand Down Expand Up @@ -191,6 +193,8 @@ private slots:
void gotoOverviewPage();
/** Switch to history (transactions) page */
void gotoHistoryPage();
/** Switch to Trading Page */
void gotoTradingPage();
/** Switch to masternode page */
void gotoMasternodePage();
/** Switch to receive coins page */
Expand Down
Binary file added src/qt/res/icons/bittrex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/qt/walletframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ void WalletFrame::gotoMasternodePage() // Masternode list
}

void WalletFrame::gotoTradingPage() // Bittrex trading

{
QMap<QString, WalletView*>::const_iterator i;
for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i)
Expand Down
4 changes: 2 additions & 2 deletions src/qt/walletframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ClientModel;
class SendCoinsRecipient;
class WalletModel;
class WalletView;
class TradingDialog;

QT_BEGIN_NAMESPACE
class QStackedWidget;
Expand Down Expand Up @@ -58,9 +59,8 @@ public slots:
void gotoReceiveCoinsPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Switch to Bittrex trading page */
/** Switch to Bittrex trading page */
void gotoTradingPage();

/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
/** Show Sign/Verify Message dialog and switch to verify message tab */
Expand Down
10 changes: 8 additions & 2 deletions src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "transactiontablemodel.h"
#include "transactionview.h"
#include "walletmodel.h"
#include "tradingdialog.h"

#include "ui_interface.h"

Expand All @@ -38,7 +39,7 @@ WalletView::WalletView(QWidget *parent):
{
// Create tabs
overviewPage = new OverviewPage();
tradingPage = new tradingDialog(this);
tradingPage = new tradingDialog(this);
transactionsPage = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout();
QHBoxLayout *hbox_buttons = new QHBoxLayout();
Expand Down Expand Up @@ -74,6 +75,7 @@ WalletView::WalletView(QWidget *parent):
addWidget(transactionsPage);
addWidget(receiveCoinsPage);
addWidget(sendCoinsPage);
addWidget(tradingPage);

QSettings settings;
if (settings.value("fShowMasternodesTab").toBool()) {
Expand Down Expand Up @@ -197,12 +199,16 @@ void WalletView::gotoHistoryPage()
setCurrentWidget(transactionsPage);
}

void WalletView::gotoTradingPage()
{
setCurrentWidget(tradingPage);
}

void WalletView::gotoMasternodePage()
{
QSettings settings;
if (settings.value("fShowMasternodesTab").toBool()) {
setCurrentWidget(masternodeListPage);
}
}

void WalletView::gotoReceiveCoinsPage()
Expand Down
4 changes: 4 additions & 0 deletions src/qt/walletview.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class SendCoinsDialog;
class SendCoinsRecipient;
class TransactionView;
class WalletModel;
class tradingDialog;

QT_BEGIN_NAMESPACE
class QLabel;
Expand Down Expand Up @@ -62,6 +63,7 @@ class WalletView : public QStackedWidget
QWidget *transactionsPage;
ReceiveCoinsDialog *receiveCoinsPage;
SendCoinsDialog *sendCoinsPage;
tradingDialog *tradingPage;
MasternodeList *masternodeListPage;

TransactionView *transactionView;
Expand All @@ -74,6 +76,8 @@ public slots:
void gotoOverviewPage();
/** Switch to history (transactions) page */
void gotoHistoryPage();
/** Switch to Bittrex trading page */
void gotoTradingPage();
/** Switch to masternode page */
void gotoMasternodePage();
/** Switch to Bittrex trading page */
Expand Down