diff options
author | Ashley Holman <dscvlt@gmail.com> | 2014-05-23 12:09:59 -0500 |
---|---|---|
committer | Ashley Holman <dscvlt@gmail.com> | 2014-06-03 17:37:34 +0930 |
commit | 65f78a111ff52c2212cc0a423662e7a41d1206dd (patch) | |
tree | e3f986034d79e48a13986e1a144a0f7b2a879a7f /src/qt/rpcconsole.h | |
parent | 9d97e83bf677ce595c6b2dc5d6805c2fcb1bc05b (diff) |
Qt: Add GUI view of peer information. #4133
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r-- | src/qt/rpcconsole.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 091a6d294f..c17d5397ec 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -5,10 +5,18 @@ #ifndef RPCCONSOLE_H #define RPCCONSOLE_H +#include "guiutil.h" +#include "net.h" + +#include "peertablemodel.h" + #include <QDialog> class ClientModel; +class QItemSelection; +class CNodeCombinedStats; + namespace Ui { class RPCConsole; } @@ -35,6 +43,19 @@ public: protected: virtual bool eventFilter(QObject* obj, QEvent *event); +private: + /** show detailed information on ui about selected node */ + void updateNodeDetail(const CNodeCombinedStats *combinedStats); + + enum ColumnWidths + { + ADDRESS_COLUMN_WIDTH = 250, + MINIMUM_COLUMN_WIDTH = 120 + }; + + /** track the node that we are currently viewing detail on in the peers tab */ + CNodeCombinedStats detailNodeStats; + private slots: void on_lineEdit_returnPressed(); void on_tabWidget_currentChanged(int index); @@ -44,6 +65,9 @@ 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(); @@ -57,6 +81,10 @@ public slots: 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 @@ -70,6 +98,7 @@ private: Ui::RPCConsole *ui; ClientModel *clientModel; QStringList history; + GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer; int historyPtr; void startExecutor(); |