mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
put the tunnel info as a new tab in the transfer page.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2310 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
850e756fe3
commit
c37679e807
@ -32,6 +32,7 @@
|
||||
#include "DLListDelegate.h"
|
||||
#include "ULListDelegate.h"
|
||||
#include "FileTransferInfoWidget.h"
|
||||
#include "TurtleRouterDialog.h"
|
||||
#include "xprogressbar.h"
|
||||
|
||||
#include <QContextMenuEvent>
|
||||
@ -221,6 +222,15 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
||||
|
||||
QObject::connect(ui.downloadList,SIGNAL(clicked(const QModelIndex&)),this,SLOT(showFileDetails())) ;
|
||||
|
||||
TurtleRouterDialog *trdl = new TurtleRouterDialog();
|
||||
ui.tunnelInfoWidget->setWidget(trdl);
|
||||
ui.tunnelInfoWidget->setWidgetResizable(true);
|
||||
ui.tunnelInfoWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui.tunnelInfoWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
ui.tunnelInfoWidget->viewport()->setBackgroundRole(QPalette::NoRole);
|
||||
ui.tunnelInfoWidget->setFrameStyle(QFrame::NoFrame);
|
||||
ui.tunnelInfoWidget->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
|
@ -819,6 +819,30 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Tunneling</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="tunnelInfoWidget">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>578</width>
|
||||
<height>117</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
@ -826,6 +850,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
<include location="../../../../../../../.designer/backup/images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -8,17 +8,12 @@
|
||||
TurtleRouterDialog *TurtleRouterDialog::_instance = NULL ;
|
||||
|
||||
TurtleRouterDialog::TurtleRouterDialog(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
: RsAutoUpdatePage(2000,parent)
|
||||
{
|
||||
setupUi(this) ;
|
||||
|
||||
_timer = new QTimer ;
|
||||
|
||||
connect(_timer,SIGNAL(timeout()),this,SLOT(update())) ;
|
||||
|
||||
_timer->start(2000) ;
|
||||
|
||||
connect( _hashes_TW, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showCtxMenu(const QPoint&)));
|
||||
|
||||
_hashes_TW->setToolTip(tr("As a helper, you can manually remove hashes\nfrom there. Warning: doing so on currently\nactive transfers will block the transfer process.")) ;
|
||||
}
|
||||
|
||||
void TurtleRouterDialog::showCtxMenu(const QPoint& point)
|
||||
@ -62,10 +57,8 @@ void TurtleRouterDialog::removeFileHash()
|
||||
rsTurtle->stopMonitoringFileTunnels(hash) ;
|
||||
}
|
||||
|
||||
void TurtleRouterDialog::update()
|
||||
void TurtleRouterDialog::updateDisplay()
|
||||
{
|
||||
if(isVisible())
|
||||
{
|
||||
std::cout << "updatign turtle router console."<< std::endl ;
|
||||
|
||||
std::vector<std::vector<std::string> > hashes_info ;
|
||||
@ -81,7 +74,6 @@ void TurtleRouterDialog::update()
|
||||
fillTable( _tunnels_TW, tunnels_info) ;
|
||||
fillTable( _tunnel_reqs_TW, tunnel_reqs_info) ;
|
||||
fillTable( _search_reqs_TW, search_reqs_info) ;
|
||||
}
|
||||
}
|
||||
|
||||
void TurtleRouterDialog::fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >& data)
|
||||
|
@ -2,24 +2,26 @@
|
||||
|
||||
#include <QPoint>
|
||||
#include "ui_TurtleRouterDialog.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
class TurtleRouterDialog: public QWidget, public Ui::TurtleRouterDialogForm
|
||||
class TurtleRouterDialog: public RsAutoUpdatePage, public Ui::TurtleRouterDialogForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TurtleRouterDialog(QWidget *parent = NULL) ;
|
||||
static void showUp() ;
|
||||
|
||||
/** Default Constructor */
|
||||
protected slots:
|
||||
void update() ;
|
||||
void showCtxMenu(const QPoint&) ;
|
||||
void removeFileHash() ;
|
||||
|
||||
private:
|
||||
void fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >&) ;
|
||||
TurtleRouterDialog(QWidget *parent = NULL) ;
|
||||
QTimer *_timer ;
|
||||
|
||||
virtual void updateDisplay() ;
|
||||
|
||||
static TurtleRouterDialog *_instance ;
|
||||
} ;
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>555</width>
|
||||
<height>406</height>
|
||||
<width>865</width>
|
||||
<height>553</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -17,23 +17,7 @@
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Hashes and Tunnels</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Handled file hashes</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="_hashes_TW">
|
||||
<property name="contextMenuPolicy">
|
||||
@ -47,7 +31,7 @@
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>File hash</string>
|
||||
<string>Handled file hash</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@ -67,15 +51,6 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Current tunnels</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="_tunnels_TW">
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
@ -83,7 +58,7 @@
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Tunnel id</string>
|
||||
<string>Current Tunnel id</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@ -108,22 +83,6 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Tunnels / Search Requests</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Tunnel Requests</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="_tunnel_reqs_TW">
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
@ -131,7 +90,7 @@
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Request id</string>
|
||||
<string>Tunnel request id</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@ -146,15 +105,6 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Search Requests</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="_search_reqs_TW">
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
@ -162,7 +112,7 @@
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Request id</string>
|
||||
<string>Search request id</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@ -179,13 +129,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
|
@ -20,7 +20,6 @@
|
||||
****************************************************************/
|
||||
|
||||
#include "TransferPage.h"
|
||||
#include <gui/TurtleRouterDialog.h>
|
||||
|
||||
#include "rshare.h"
|
||||
|
||||
@ -38,11 +37,9 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
connect( ui._showTurtleDialogPB,SIGNAL(clicked()),this,SLOT( showTurtleRouterDialog() )) ;
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
timer->start(1000);
|
||||
// QTimer *timer = new QTimer(this);
|
||||
// timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
// timer->start(1000);
|
||||
|
||||
updateStatus();
|
||||
|
||||
@ -53,13 +50,7 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
||||
#endif
|
||||
}
|
||||
|
||||
void TransferPage::showTurtleRouterDialog()
|
||||
{
|
||||
TurtleRouterDialog::showUp() ;
|
||||
}
|
||||
|
||||
void
|
||||
TransferPage::closeEvent (QCloseEvent * event)
|
||||
void TransferPage::closeEvent (QCloseEvent * event)
|
||||
{
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
@ -86,11 +77,11 @@ void TransferPage::load()
|
||||
{
|
||||
|
||||
/* load up configuration from rsPeers */
|
||||
RsPeerDetails detail;
|
||||
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// RsPeerDetails detail;
|
||||
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -98,15 +89,12 @@ void TransferPage::load()
|
||||
/** Loads the settings for this page */
|
||||
void TransferPage::updateStatus()
|
||||
{
|
||||
|
||||
/* load up configuration from rsPeers */
|
||||
RsPeerDetails detail;
|
||||
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// RsPeerDetails detail;
|
||||
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,14 +40,9 @@ class TransferPage: public ConfigPage
|
||||
/** Loads the settings for this page */
|
||||
void load();
|
||||
|
||||
public slots:
|
||||
public slots:
|
||||
void updateStatus();
|
||||
|
||||
private slots:
|
||||
|
||||
void showTurtleRouterDialog();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void closeEvent (QCloseEvent * event);
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="Seite">
|
||||
<attribute name="title">
|
||||
@ -130,17 +130,6 @@
|
||||
<string>F2F Routing</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="_showTurtleDialogPB">
|
||||
<property name="text">
|
||||
<string>Show router statistics</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="readOnly">
|
||||
|
Loading…
Reference in New Issue
Block a user