Skip to content

Commit

Permalink
Stake Report 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tillkoeln committed Dec 23, 2018
1 parent 9f214f2 commit cd33760
Show file tree
Hide file tree
Showing 12 changed files with 1,471 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Project-X-qt.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = Project-X
VERSION = 0.9.1
VERSION = 0.9.3
INCLUDEPATH += src src/json src/qt
QT += core gui network
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
Expand Down Expand Up @@ -288,7 +288,8 @@ HEADERS += src/qt/bitcoingui.h \
src/sph_types.h \
src/clientversion.h \
src/clientversion.h \
src/qt/merchantpage.h
src/qt/merchantpage.h \
src/qt/stakereportdialog.h

SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \
Expand Down Expand Up @@ -353,6 +354,7 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/qtipcserver.cpp \
src/qt/rpcconsole.cpp \
src/qt/multisenddialog.cpp \
src/qt/stakereportdialog.cpp \
src/noui.cpp \
src/kernel.cpp \
src/scrypt-arm.S \
Expand Down Expand Up @@ -390,6 +392,7 @@ FORMS += \
src/qt/forms/rpcconsole.ui \
src/qt/forms/optionsdialog.ui \
src/qt/forms/merchants.ui \
src/qt/forms/stakereportdialog.ui

contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
Expand Down
3 changes: 2 additions & 1 deletion src/bitcoinrpc.cpp
Expand Up @@ -306,7 +306,8 @@ static const CRPCCommand vRPCCommands[] =
{ "resendtx", &resendtx, false, true},
{ "makekeypair", &makekeypair, false, true},
{ "sendalert", &sendalert, false, false},
{ "multisend", &multisend, false, false },
{ "multisend", &multisend, false, false },
{ "getstakereport", &getstakereport, false, false},
};

CRPCTable::CRPCTable()
Expand Down
2 changes: 2 additions & 0 deletions src/bitcoinrpc.h
Expand Up @@ -219,4 +219,6 @@ extern json_spirit::Value getblock(const json_spirit::Array& params, bool fHelp)
extern json_spirit::Value getblockbynumber(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getcheckpoint(const json_spirit::Array& params, bool fHelp);

extern json_spirit::Value getstakereport(const json_spirit::Array& params, bool fHelp);

#endif
6 changes: 3 additions & 3 deletions src/clientversion.h
Expand Up @@ -6,9 +6,9 @@
//

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 1
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 3
#define CLIENT_VERSION_BUILD 0

// Converts the parameter X to a string after macro replacement on X has been performed.
Expand Down
17 changes: 17 additions & 0 deletions src/qt/bitcoingui.cpp
Expand Up @@ -28,6 +28,7 @@
#include "guiutil.h"
#include "rpcconsole.h"
#include "wallet.h"
#include "stakereportdialog.h"

#ifdef Q_OS_MAC
#include "macdockiconhandler.h"
Expand Down Expand Up @@ -309,6 +310,9 @@ void BitcoinGUI::createActions()
signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);

stakeReportAction = new QAction(QIcon(":/icons/minting"), tr("Show stake report"), this);
stakeReportAction->setToolTip(tr("Open the Stake Report Box"));

exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this);
exportAction->setToolTip(tr("Export the data in the current tab to a file"));
openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug Window"), this);
Expand All @@ -326,6 +330,7 @@ void BitcoinGUI::createActions()
connect(lockWalletAction, SIGNAL(triggered()), this, SLOT(lockWallet()));
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
connect(stakeReportAction, SIGNAL(triggered()), this, SLOT(stakeReportClicked()));
}

void BitcoinGUI::createMenuBar()
Expand Down Expand Up @@ -355,6 +360,9 @@ void BitcoinGUI::createMenuBar()
settings->addAction(multiSendAction);
settings->addSeparator();
settings->addAction(optionsAction);

QMenu *information = appMenuBar->addMenu(tr("Information"));
information->addAction(stakeReportAction);

QMenu *help = appMenuBar->addMenu(tr("&Help"));
help->addAction(openRPCConsoleAction);
Expand Down Expand Up @@ -528,6 +536,15 @@ void BitcoinGUI::multiSendClicked(QString addr)
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}

// Stake report dialog
void BitcoinGUI::stakeReportClicked()
{
static StakeReportDialog dlg;
dlg.setModel(walletModel);
dlg.show();
}


void BitcoinGUI::setNumConnections(int count)
{
QString icon;
Expand Down
4 changes: 4 additions & 0 deletions src/qt/bitcoingui.h
Expand Up @@ -102,6 +102,7 @@ class BitcoinGUI : public QMainWindow
QAction *aboutQtAction;
QAction *openRPCConsoleAction;
QAction * multiSendAction;
QAction *stakeReportAction;

QSystemTrayIcon *trayIcon;
Notificator *notificator;
Expand Down Expand Up @@ -185,6 +186,9 @@ private slots:
void unlockWallet();

void lockWallet();

/** Open stake report dialog */
void stakeReportClicked();

/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
void showNormalIfMinimized(bool fToggleHidden = false);
Expand Down

0 comments on commit cd33760

Please sign in to comment.