diff options
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r-- | src/qt/rpcconsole.h | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index e5da01546a..8737be35d1 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -1,11 +1,16 @@ -// Copyright (c) 2011-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Copyright (c) 2011-2014 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef RPCCONSOLE_H -#define RPCCONSOLE_H +#ifndef BITCOIN_QT_RPCCONSOLE_H +#define BITCOIN_QT_RPCCONSOLE_H -#include <QDialog> +#include "guiutil.h" +#include "peertablemodel.h" + +#include "net.h" + +#include <QWidget> class ClientModel; @@ -13,8 +18,12 @@ namespace Ui { class RPCConsole; } +QT_BEGIN_NAMESPACE +class QItemSelection; +QT_END_NAMESPACE + /** Local Bitcoin RPC console. */ -class RPCConsole: public QDialog +class RPCConsole: public QWidget { Q_OBJECT @@ -34,6 +43,7 @@ public: protected: virtual bool eventFilter(QObject* obj, QEvent *event); + void keyPressEvent(QKeyEvent *); private slots: void on_lineEdit_returnPressed(); @@ -44,18 +54,25 @@ private slots: void on_sldGraphRange_valueChanged(int value); /** update traffic statistics */ void updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut); + void resizeEvent(QResizeEvent *event); + void showEvent(QShowEvent *event); + void hideEvent(QHideEvent *event); public slots: void clear(); void message(int category, const QString &message, bool html = false); /** Set number of connections shown in the UI */ void setNumConnections(int count); - /** Set number of blocks shown in the UI */ - void setNumBlocks(int count, int countOfPeers); + /** Set number of blocks and last block date shown in the UI */ + void setNumBlocks(int count, const QDateTime& blockDate); /** Go forward or back in history */ void browseHistory(int offset); /** Scroll console view to end */ void scrollToEnd(); + /** Handle selection of peer in peers list */ + void peerSelected(const QItemSelection &selected, const QItemSelection &deselected); + /** Handle updated peer information */ + void peerLayoutChanged(); signals: // For RPC command executor @@ -64,14 +81,23 @@ signals: private: static QString FormatBytes(quint64 bytes); + void startExecutor(); void setTrafficGraphRange(int mins); + /** show detailed information on ui about selected node */ + void updateNodeDetail(const CNodeCombinedStats *stats); + + enum ColumnWidths + { + ADDRESS_COLUMN_WIDTH = 200, + SUBVERSION_COLUMN_WIDTH = 100, + PING_COLUMN_WIDTH = 80 + }; Ui::RPCConsole *ui; ClientModel *clientModel; QStringList history; int historyPtr; - - void startExecutor(); + NodeId cachedNodeid; }; -#endif // RPCCONSOLE_H +#endif // BITCOIN_QT_RPCCONSOLE_H |