mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 22:52:54 -04:00
added a display of turtle search/tunnel requests over time, to help spotting potential spammers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4216 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0429baf807
commit
3f21835114
7 changed files with 270 additions and 52 deletions
|
@ -1,16 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include <QPoint>
|
||||
#include <retroshare/rsturtle.h>
|
||||
#include "ui_TurtleRouterDialog.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
class TurtleRouterStatisticsWidget ;
|
||||
|
||||
class TurtleRouterDialog: public RsAutoUpdatePage, public Ui::TurtleRouterDialogForm
|
||||
{
|
||||
public:
|
||||
TurtleRouterDialog(QWidget *parent = NULL) ;
|
||||
|
||||
/** Default Constructor */
|
||||
// Cache for peer names.
|
||||
static QString getPeerName(const std::string& peer_id) ;
|
||||
|
||||
private:
|
||||
void updateTunnelRequests( const std::vector<std::vector<std::basic_string<char> > >&,
|
||||
const std::vector<std::vector<std::basic_string<char> > >&,
|
||||
const std::vector<TurtleRequestDisplayInfo >&,
|
||||
const std::vector<TurtleRequestDisplayInfo >&) ;
|
||||
|
||||
virtual void updateDisplay() ;
|
||||
QTreeWidgetItem *findParentHashItem(const std::string& hash) ;
|
||||
|
||||
|
@ -18,4 +28,25 @@ class TurtleRouterDialog: public RsAutoUpdatePage, public Ui::TurtleRouterDialog
|
|||
QTreeWidgetItem *top_level_unknown_hashes ;
|
||||
QTreeWidgetItem *top_level_s_requests ;
|
||||
QTreeWidgetItem *top_level_t_requests ;
|
||||
|
||||
TurtleRouterStatisticsWidget *_tst_CW ;
|
||||
} ;
|
||||
|
||||
class TurtleRouterStatisticsWidget: public QWidget
|
||||
{
|
||||
public:
|
||||
TurtleRouterStatisticsWidget(QWidget *parent = NULL) ;
|
||||
|
||||
virtual void paintEvent(QPaintEvent *event) ;
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
void updateTunnelStatistics( const std::vector<std::vector<std::basic_string<char> > >&,
|
||||
const std::vector<std::vector<std::basic_string<char> > >&,
|
||||
const std::vector<TurtleRequestDisplayInfo >&,
|
||||
const std::vector<TurtleRequestDisplayInfo >&) ;
|
||||
|
||||
private:
|
||||
QPixmap pixmap ;
|
||||
int maxWidth,maxHeight ;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue