aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r--src/qt/rpcconsole.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 6f42aa08b7..b86f776786 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -13,6 +13,8 @@
#include <QWidget>
class ClientModel;
+class PlatformStyle;
+class RPCTimerInterface;
namespace Ui {
class RPCConsole;
@@ -29,7 +31,7 @@ class RPCConsole: public QWidget
Q_OBJECT
public:
- explicit RPCConsole(QWidget *parent);
+ explicit RPCConsole(const PlatformStyle *platformStyle, QWidget *parent);
~RPCConsole();
void setClientModel(ClientModel *model);
@@ -59,7 +61,13 @@ private Q_SLOTS:
void showEvent(QShowEvent *event);
void hideEvent(QHideEvent *event);
/** Show custom context menu on Peers tab */
- void showMenu(const QPoint& point);
+ void showPeersTableContextMenu(const QPoint& point);
+ /** Show custom context menu on Bans tab */
+ void showBanTableContextMenu(const QPoint& point);
+ /** Hides ban table if no bans are present */
+ void showOrHideBanTableIfRequired();
+ /** clear the selected node */
+ void clearSelectedNode();
public Q_SLOTS:
void clear();
@@ -78,6 +86,10 @@ public Q_SLOTS:
void peerLayoutChanged();
/** Disconnect a selected node on the Peers tab */
void disconnectSelectedNode();
+ /** Ban a selected node on the Peers tab */
+ void banSelectedNode(int bantime);
+ /** Unban a selected node on the Bans tab */
+ void unbanSelectedNode();
Q_SIGNALS:
// For RPC command executor
@@ -90,14 +102,15 @@ private:
void setTrafficGraphRange(int mins);
/** show detailed information on ui about selected node */
void updateNodeDetail(const CNodeCombinedStats *stats);
- /** clear the selected node */
- void clearSelectedNode();
enum ColumnWidths
{
ADDRESS_COLUMN_WIDTH = 200,
SUBVERSION_COLUMN_WIDTH = 100,
- PING_COLUMN_WIDTH = 80
+ PING_COLUMN_WIDTH = 80,
+ BANSUBNET_COLUMN_WIDTH = 200,
+ BANTIME_COLUMN_WIDTH = 250
+
};
Ui::RPCConsole *ui;
@@ -105,7 +118,10 @@ private:
QStringList history;
int historyPtr;
NodeId cachedNodeid;
- QMenu *contextMenu;
+ const PlatformStyle *platformStyle;
+ RPCTimerInterface *rpcTimerInterface;
+ QMenu *peersTableContextMenu;
+ QMenu *banTableContextMenu;
};
#endif // BITCOIN_QT_RPCCONSOLE_H