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 "DLListDelegate.h"
|
||||||
#include "ULListDelegate.h"
|
#include "ULListDelegate.h"
|
||||||
#include "FileTransferInfoWidget.h"
|
#include "FileTransferInfoWidget.h"
|
||||||
|
#include "TurtleRouterDialog.h"
|
||||||
#include "xprogressbar.h"
|
#include "xprogressbar.h"
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
@ -221,6 +222,15 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||||||
|
|
||||||
QObject::connect(ui.downloadList,SIGNAL(clicked(const QModelIndex&)),this,SLOT(showFileDetails())) ;
|
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 */
|
/* Hide platform specific features */
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
|
|
||||||
|
@ -819,6 +819,30 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</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>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -826,6 +850,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="images.qrc"/>
|
<include location="images.qrc"/>
|
||||||
|
<include location="../../../../../../../.designer/backup/images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -8,17 +8,12 @@
|
|||||||
TurtleRouterDialog *TurtleRouterDialog::_instance = NULL ;
|
TurtleRouterDialog *TurtleRouterDialog::_instance = NULL ;
|
||||||
|
|
||||||
TurtleRouterDialog::TurtleRouterDialog(QWidget *parent)
|
TurtleRouterDialog::TurtleRouterDialog(QWidget *parent)
|
||||||
: QWidget(parent)
|
: RsAutoUpdatePage(2000,parent)
|
||||||
{
|
{
|
||||||
setupUi(this) ;
|
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&)));
|
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)
|
void TurtleRouterDialog::showCtxMenu(const QPoint& point)
|
||||||
@ -62,10 +57,8 @@ void TurtleRouterDialog::removeFileHash()
|
|||||||
rsTurtle->stopMonitoringFileTunnels(hash) ;
|
rsTurtle->stopMonitoringFileTunnels(hash) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurtleRouterDialog::update()
|
void TurtleRouterDialog::updateDisplay()
|
||||||
{
|
{
|
||||||
if(isVisible())
|
|
||||||
{
|
|
||||||
std::cout << "updatign turtle router console."<< std::endl ;
|
std::cout << "updatign turtle router console."<< std::endl ;
|
||||||
|
|
||||||
std::vector<std::vector<std::string> > hashes_info ;
|
std::vector<std::vector<std::string> > hashes_info ;
|
||||||
@ -81,7 +74,6 @@ void TurtleRouterDialog::update()
|
|||||||
fillTable( _tunnels_TW, tunnels_info) ;
|
fillTable( _tunnels_TW, tunnels_info) ;
|
||||||
fillTable( _tunnel_reqs_TW, tunnel_reqs_info) ;
|
fillTable( _tunnel_reqs_TW, tunnel_reqs_info) ;
|
||||||
fillTable( _search_reqs_TW, search_reqs_info) ;
|
fillTable( _search_reqs_TW, search_reqs_info) ;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurtleRouterDialog::fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >& data)
|
void TurtleRouterDialog::fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >& data)
|
||||||
|
@ -2,24 +2,26 @@
|
|||||||
|
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include "ui_TurtleRouterDialog.h"
|
#include "ui_TurtleRouterDialog.h"
|
||||||
|
#include "RsAutoUpdatePage.h"
|
||||||
|
|
||||||
class TurtleRouterDialog: public QWidget, public Ui::TurtleRouterDialogForm
|
class TurtleRouterDialog: public RsAutoUpdatePage, public Ui::TurtleRouterDialogForm
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
TurtleRouterDialog(QWidget *parent = NULL) ;
|
||||||
static void showUp() ;
|
static void showUp() ;
|
||||||
|
|
||||||
/** Default Constructor */
|
/** Default Constructor */
|
||||||
protected slots:
|
protected slots:
|
||||||
void update() ;
|
|
||||||
void showCtxMenu(const QPoint&) ;
|
void showCtxMenu(const QPoint&) ;
|
||||||
void removeFileHash() ;
|
void removeFileHash() ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >&) ;
|
void fillTable(QTableWidget *table,const std::vector<std::vector<std::string> >&) ;
|
||||||
TurtleRouterDialog(QWidget *parent = NULL) ;
|
|
||||||
QTimer *_timer ;
|
QTimer *_timer ;
|
||||||
|
|
||||||
|
virtual void updateDisplay() ;
|
||||||
|
|
||||||
static TurtleRouterDialog *_instance ;
|
static TurtleRouterDialog *_instance ;
|
||||||
} ;
|
} ;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>555</width>
|
<width>865</width>
|
||||||
<height>406</height>
|
<height>553</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -17,23 +17,7 @@
|
|||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<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">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableWidget" name="_hashes_TW">
|
<widget class="QTableWidget" name="_hashes_TW">
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
@ -47,7 +31,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File hash</string>
|
<string>Handled file hash</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
@ -67,15 +51,6 @@
|
|||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QTableWidget" name="_tunnels_TW">
|
<widget class="QTableWidget" name="_tunnels_TW">
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
@ -83,7 +58,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Tunnel id</string>
|
<string>Current Tunnel id</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
@ -108,22 +83,6 @@
|
|||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QTableWidget" name="_tunnel_reqs_TW">
|
<widget class="QTableWidget" name="_tunnel_reqs_TW">
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
@ -131,7 +90,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Request id</string>
|
<string>Tunnel request id</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
@ -146,15 +105,6 @@
|
|||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QTableWidget" name="_search_reqs_TW">
|
<widget class="QTableWidget" name="_search_reqs_TW">
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
@ -162,7 +112,7 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Request id</string>
|
<string>Search request id</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
@ -179,13 +129,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
<resources>
|
||||||
<include location="images.qrc"/>
|
<include location="images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#include "TransferPage.h"
|
#include "TransferPage.h"
|
||||||
#include <gui/TurtleRouterDialog.h>
|
|
||||||
|
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
|
|
||||||
@ -38,11 +37,9 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
|||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
connect( ui._showTurtleDialogPB,SIGNAL(clicked()),this,SLOT( showTurtleRouterDialog() )) ;
|
// QTimer *timer = new QTimer(this);
|
||||||
|
// timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||||
QTimer *timer = new QTimer(this);
|
// timer->start(1000);
|
||||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
|
||||||
timer->start(1000);
|
|
||||||
|
|
||||||
updateStatus();
|
updateStatus();
|
||||||
|
|
||||||
@ -53,13 +50,7 @@ TransferPage::TransferPage(QWidget * parent, Qt::WFlags flags)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferPage::showTurtleRouterDialog()
|
void TransferPage::closeEvent (QCloseEvent * event)
|
||||||
{
|
|
||||||
TurtleRouterDialog::showUp() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
TransferPage::closeEvent (QCloseEvent * event)
|
|
||||||
{
|
{
|
||||||
QWidget::closeEvent(event);
|
QWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
@ -86,11 +77,11 @@ void TransferPage::load()
|
|||||||
{
|
{
|
||||||
|
|
||||||
/* load up configuration from rsPeers */
|
/* load up configuration from rsPeers */
|
||||||
RsPeerDetails detail;
|
// RsPeerDetails detail;
|
||||||
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -98,15 +89,12 @@ void TransferPage::load()
|
|||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
void TransferPage::updateStatus()
|
void TransferPage::updateStatus()
|
||||||
{
|
{
|
||||||
|
|
||||||
/* load up configuration from rsPeers */
|
/* load up configuration from rsPeers */
|
||||||
RsPeerDetails detail;
|
// RsPeerDetails detail;
|
||||||
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
// if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,14 +40,9 @@ class TransferPage: public ConfigPage
|
|||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateStatus();
|
void updateStatus();
|
||||||
|
|
||||||
private slots:
|
|
||||||
|
|
||||||
void showTurtleRouterDialog();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent (QCloseEvent * event);
|
void closeEvent (QCloseEvent * event);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="Seite">
|
<widget class="QWidget" name="Seite">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -130,17 +130,6 @@
|
|||||||
<string>F2F Routing</string>
|
<string>F2F Routing</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<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>
|
<item>
|
||||||
<widget class="QTextEdit" name="textEdit">
|
<widget class="QTextEdit" name="textEdit">
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
|
Loading…
Reference in New Issue
Block a user