mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
[Qt] add shortcurts for debug-/console-window
This commit is contained in:
parent
5fcc14ee05
commit
773ae4654e
@ -44,6 +44,7 @@
|
|||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QShortcut>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
@ -364,6 +365,9 @@ void BitcoinGUI::createActions()
|
|||||||
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
|
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
|
||||||
}
|
}
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
|
||||||
|
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this, SLOT(showDebugWindowActivateConsole()));
|
||||||
|
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D), this, SLOT(showDebugWindow()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::createMenuBar()
|
void BitcoinGUI::createMenuBar()
|
||||||
@ -597,6 +601,12 @@ void BitcoinGUI::showDebugWindow()
|
|||||||
rpcConsole->activateWindow();
|
rpcConsole->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BitcoinGUI::showDebugWindowActivateConsole()
|
||||||
|
{
|
||||||
|
rpcConsole->setTabFocus(RPCConsole::TAB_CONSOLE);
|
||||||
|
showDebugWindow();
|
||||||
|
}
|
||||||
|
|
||||||
void BitcoinGUI::showHelpMessageClicked()
|
void BitcoinGUI::showHelpMessageClicked()
|
||||||
{
|
{
|
||||||
helpMessageDialog->show();
|
helpMessageDialog->show();
|
||||||
|
@ -198,6 +198,8 @@ private Q_SLOTS:
|
|||||||
void aboutClicked();
|
void aboutClicked();
|
||||||
/** Show debug window */
|
/** Show debug window */
|
||||||
void showDebugWindow();
|
void showDebugWindow();
|
||||||
|
/** Show debug window and set focus to the console */
|
||||||
|
void showDebugWindowActivateConsole();
|
||||||
/** Show help message dialog */
|
/** Show help message dialog */
|
||||||
void showHelpMessageClicked();
|
void showHelpMessageClicked();
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
|
@ -856,3 +856,8 @@ void RPCConsole::showOrHideBanTableIfRequired()
|
|||||||
ui->banlistWidget->setVisible(visible);
|
ui->banlistWidget->setVisible(visible);
|
||||||
ui->banHeading->setVisible(visible);
|
ui->banHeading->setVisible(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RPCConsole::setTabFocus(enum TabTypes tabType)
|
||||||
|
{
|
||||||
|
ui->tabWidget->setCurrentIndex(tabType);
|
||||||
|
}
|
||||||
|
@ -44,6 +44,13 @@ public:
|
|||||||
CMD_ERROR
|
CMD_ERROR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TabTypes {
|
||||||
|
TAB_INFO = 0,
|
||||||
|
TAB_CONSOLE = 1,
|
||||||
|
TAB_GRAPH = 2,
|
||||||
|
TAB_PEERS = 3
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject* obj, QEvent *event);
|
virtual bool eventFilter(QObject* obj, QEvent *event);
|
||||||
void keyPressEvent(QKeyEvent *);
|
void keyPressEvent(QKeyEvent *);
|
||||||
@ -91,6 +98,8 @@ public Q_SLOTS:
|
|||||||
void banSelectedNode(int bantime);
|
void banSelectedNode(int bantime);
|
||||||
/** Unban a selected node on the Bans tab */
|
/** Unban a selected node on the Bans tab */
|
||||||
void unbanSelectedNode();
|
void unbanSelectedNode();
|
||||||
|
/** set which tab has the focus (is visible) */
|
||||||
|
void setTabFocus(enum TabTypes tabType);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
// For RPC command executor
|
// For RPC command executor
|
||||||
|
Loading…
Reference in New Issue
Block a user