Creat a tools menu with info, console and network items.
This commit is contained in:
parent
60b6ef59dd
commit
333d5ae781
@ -187,7 +187,10 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
|
|||||||
statusBar()->addWidget(progressBar);
|
statusBar()->addWidget(progressBar);
|
||||||
statusBar()->addPermanentWidget(frameBlocks);
|
statusBar()->addPermanentWidget(frameBlocks);
|
||||||
|
|
||||||
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
|
connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
|
||||||
|
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
|
||||||
|
connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
|
||||||
|
|
||||||
|
|
||||||
// prevents an oben debug window from becoming stuck/unusable on client shutdown
|
// prevents an oben debug window from becoming stuck/unusable on client shutdown
|
||||||
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
|
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
|
||||||
@ -300,8 +303,12 @@ void BitcoinGUI::createActions(bool fIsTestnet)
|
|||||||
verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
|
verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
|
||||||
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Darkcoin addresses"));
|
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Darkcoin addresses"));
|
||||||
|
|
||||||
openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this);
|
openInfoAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Information"), this);
|
||||||
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
|
openInfoAction->setStatusTip(tr("Show diagnostic information"));
|
||||||
|
openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug console"), this);
|
||||||
|
openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
|
||||||
|
openNetworkAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
|
||||||
|
openNetworkAction->setStatusTip(tr("Show network monitor"));
|
||||||
|
|
||||||
usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
|
usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
|
||||||
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
|
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
|
||||||
@ -373,11 +380,15 @@ void BitcoinGUI::createMenuBar()
|
|||||||
}
|
}
|
||||||
settings->addAction(optionsAction);
|
settings->addAction(optionsAction);
|
||||||
|
|
||||||
QMenu *help = appMenuBar->addMenu(tr("&Help"));
|
|
||||||
if(walletFrame)
|
if(walletFrame)
|
||||||
{
|
{
|
||||||
help->addAction(openRPCConsoleAction);
|
QMenu *tools = appMenuBar->addMenu(tr("&Tools"));
|
||||||
|
tools->addAction(openInfoAction);
|
||||||
|
tools->addAction(openRPCConsoleAction);
|
||||||
|
tools->addAction(openNetworkAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMenu *help = appMenuBar->addMenu(tr("&Help"));
|
||||||
help->addAction(showHelpMessageAction);
|
help->addAction(showHelpMessageAction);
|
||||||
help->addSeparator();
|
help->addSeparator();
|
||||||
help->addAction(aboutAction);
|
help->addAction(aboutAction);
|
||||||
@ -520,7 +531,9 @@ void BitcoinGUI::createTrayIconMenu()
|
|||||||
trayIconMenu->addAction(verifyMessageAction);
|
trayIconMenu->addAction(verifyMessageAction);
|
||||||
trayIconMenu->addSeparator();
|
trayIconMenu->addSeparator();
|
||||||
trayIconMenu->addAction(optionsAction);
|
trayIconMenu->addAction(optionsAction);
|
||||||
|
trayIconMenu->addAction(openInfoAction);
|
||||||
trayIconMenu->addAction(openRPCConsoleAction);
|
trayIconMenu->addAction(openRPCConsoleAction);
|
||||||
|
trayIconMenu->addAction(openNetworkAction);
|
||||||
#ifndef Q_OS_MAC // This is built-in on Mac
|
#ifndef Q_OS_MAC // This is built-in on Mac
|
||||||
trayIconMenu->addSeparator();
|
trayIconMenu->addSeparator();
|
||||||
trayIconMenu->addAction(quitAction);
|
trayIconMenu->addAction(quitAction);
|
||||||
|
@ -93,7 +93,9 @@ private:
|
|||||||
QAction *unlockWalletAction;
|
QAction *unlockWalletAction;
|
||||||
QAction *lockWalletAction;
|
QAction *lockWalletAction;
|
||||||
QAction *aboutQtAction;
|
QAction *aboutQtAction;
|
||||||
|
QAction *openInfoAction;
|
||||||
QAction *openRPCConsoleAction;
|
QAction *openRPCConsoleAction;
|
||||||
|
QAction *openNetworkAction;
|
||||||
QAction *openAction;
|
QAction *openAction;
|
||||||
QAction *showHelpMessageAction;
|
QAction *showHelpMessageAction;
|
||||||
|
|
||||||
|
@ -499,3 +499,21 @@ void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
|
|||||||
ui->lblBytesIn->setText(FormatBytes(totalBytesIn));
|
ui->lblBytesIn->setText(FormatBytes(totalBytesIn));
|
||||||
ui->lblBytesOut->setText(FormatBytes(totalBytesOut));
|
ui->lblBytesOut->setText(FormatBytes(totalBytesOut));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RPCConsole::showInfo()
|
||||||
|
{
|
||||||
|
ui->tabWidget->setCurrentIndex(0);
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPCConsole::showConsole()
|
||||||
|
{
|
||||||
|
ui->tabWidget->setCurrentIndex(1);
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPCConsole::showNetwork()
|
||||||
|
{
|
||||||
|
ui->tabWidget->setCurrentIndex(2);
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
@ -57,6 +57,12 @@ public slots:
|
|||||||
void browseHistory(int offset);
|
void browseHistory(int offset);
|
||||||
/** Scroll console view to end */
|
/** Scroll console view to end */
|
||||||
void scrollToEnd();
|
void scrollToEnd();
|
||||||
|
/** Switch to info tab and show */
|
||||||
|
void showInfo();
|
||||||
|
/** Switch to console tab and show */
|
||||||
|
void showConsole();
|
||||||
|
/** Switch to network tab and show */
|
||||||
|
void showNetwork();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// For RPC command executor
|
// For RPC command executor
|
||||||
|
Loading…
Reference in New Issue
Block a user