Permalink
Browse files

Add BlockExplorer

Also add menu Network
  • Loading branch information...
Tranz5 committed Aug 27, 2014
1 parent 7f7cc91 commit 65d5e58907dfd86acb8eafffab2ba9a81c824204
View
@@ -49,6 +49,7 @@
<file alias="export2">res/icons/export2.png</file>
<file alias="repair">res/icons/repair.png</file>
<file alias="transaction_conflicted">res/icons/transaction_conflicted.png</file>
<file alias="blexp">res/icons/blexp.png</file>
</qresource>
<qresource prefix="/images">
<file alias="about">res/images/about.png</file>
View
@@ -255,6 +255,13 @@ void BitcoinGUI::createActions()
addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
tabGroup->addAction(addressBookAction);
blockAction = new QAction(QIcon(":/icons/blexp"), tr("&Block Explorer"), this);
blockAction->setStatusTip(tr("Explore the BlockChain"));
blockAction->setToolTip(blockAction->statusTip());
blockAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
blockAction->setCheckable(true);
tabGroup->addAction(blockAction);
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
@@ -366,6 +373,7 @@ void BitcoinGUI::createActions()
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
connect(unlockWalletAction, SIGNAL(triggered()), this, SLOT(unlockWalletForMint()));
connect(lockWalletAction, SIGNAL(triggered()), this, SLOT(lockWallet()));
connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockBrowser()));
}
void BitcoinGUI::createMenuBar()
@@ -407,14 +415,14 @@ void BitcoinGUI::createMenuBar()
wallet->addAction(signMessageAction);
wallet->addAction(verifyMessageAction);
QMenu *network = appMenuBar->addMenu(tr("&Network"));
network->addAction(blockAction);
QMenu *help = appMenuBar->addMenu(tr("&Help"));
help->addAction(openRPCConsoleAction);
help->addSeparator();
help->addAction(aboutAction);
help->addAction(aboutQtAction);
}
void BitcoinGUI::createToolBars()
@@ -431,6 +439,7 @@ void BitcoinGUI::createToolBars()
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar2->addAction(exportAction);
toolbar2->addAction(openRPCConsoleAction);
toolbar2->addAction(blockAction);
}
void BitcoinGUI::setClientModel(ClientModel *clientModel)
@@ -715,6 +724,11 @@ void BitcoinGUI::stakingIconClicked()
,CClientUIInterface::MODAL);
}
void BitcoinGUI::gotoBlockBrowser()
{
if (walletStack) walletStack->gotoBlockBrowser();
}
void BitcoinGUI::gotoOverviewPage()
{
if (walletStack) walletStack->gotoOverviewPage();
View
@@ -17,6 +17,7 @@ class SendCoinsDialog;
class SignVerifyMessageDialog;
class Notificator;
class RPCConsole;
class BlockBrowser;
class CWallet;
class CWalletManager;
@@ -71,6 +72,7 @@ class BitcoinGUI : public QMainWindow
private:
ClientModel *clientModel;
CWalletManager *walletManager;
BlockBrowser *blockBrowser;
QMap<QString, WalletModel*> mapWalletModels;
QListWidget *walletList;
WalletStack *walletStack;
@@ -114,6 +116,7 @@ class BitcoinGUI : public QMainWindow
QAction *loadWalletAction;
QAction *unloadWalletAction;
QAction *newWalletAction;
QAction *blockAction;
QSystemTrayIcon *trayIcon;
Notificator *notificator;
@@ -146,6 +149,8 @@ public slots:
void gotoReceiveCoinsPage(bool fExportOnly=false, bool fExportConnect=true, bool fExportFirstTime=false);
/** Switch to send coins page */
void gotoSendCoinsPage();
/** Switch to block explorer page */
void gotoBlockBrowser();
/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
Oops, something went wrong.

0 comments on commit 65d5e58

Please sign in to comment.