mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-05 21:04:14 -04:00
moved turtle statistics info into config->turtle
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ImprovedGUI@6101 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
329369650e
commit
2f18162ef9
4 changed files with 45 additions and 30 deletions
|
@ -42,8 +42,6 @@
|
|||
#include "DLListDelegate.h"
|
||||
#include "ULListDelegate.h"
|
||||
#include "FileTransferInfoWidget.h"
|
||||
#include "TurtleRouterDialog.h"
|
||||
//#include "TurtleRouterStatistics.h"
|
||||
#include "SearchDialog.h"
|
||||
#include "xprogressbar.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
|
@ -306,9 +304,9 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||
QObject::connect(ui.downloadList->selectionModel(),SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),this,SLOT(showFileDetails())) ;
|
||||
|
||||
ui.tabWidget->insertTab(0,searchDialog = new SearchDialog(), QIcon(IMAGE_SEARCH), tr("Search")) ;
|
||||
//ui.tabWidget->addTab( new TurtleRouterStatistics(), tr("Router Statistics")) ;
|
||||
|
||||
ui.tabWidget->addTab( new TurtleRouterDialog(), tr("Router Requests")) ;
|
||||
//ui.tabWidget->addTab( new TurtleRouterStatistics(), tr("Router Statistics")) ;
|
||||
//ui.tabWidget->addTab( new TurtleRouterDialog(), tr("Router Requests")) ;
|
||||
|
||||
for(int i=0;i<rsPlugins->nbPlugins();++i)
|
||||
if(rsPlugins->plugin(i) != NULL && rsPlugins->plugin(i)->qt_transfers_tab() != NULL)
|
||||
|
|
|
@ -45,11 +45,14 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
|
|||
connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
|
||||
connect( ui._max_tr_up_per_sec_SB, SIGNAL( valueChanged( int ) ), this, SLOT( updateMaxTRUpRate(int) ) );
|
||||
connect( ui._turtle_enabled_CB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTurtleRouting(bool) ) );
|
||||
connect( ui._routing_info_PB, SIGNAL( clicked() ), this, SLOT( showRoutingInfo() ) );
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
timer->start(1000);
|
||||
|
||||
_routing_info_page = NULL ;
|
||||
|
||||
//load();
|
||||
updateStatus();
|
||||
|
||||
|
@ -74,6 +77,11 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
|
|||
TurtleRouterStatistics *trs = new TurtleRouterStatistics ;
|
||||
trs->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding)) ;
|
||||
ui.tabWidget->widget(2)->layout()->addWidget(trs) ;
|
||||
ui.tabWidget->widget(2)->layout()->setContentsMargins(0,5,0,0) ;
|
||||
|
||||
QSpacerItem *verticalSpacer = new QSpacerItem(0,0,QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
ui.tabWidget->widget(2)->layout()->addItem(verticalSpacer) ;
|
||||
ui.tabWidget->widget(2)->layout()->update() ;
|
||||
|
||||
/* Hide platform specific features */
|
||||
|
@ -82,6 +90,14 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
void ServerPage::showRoutingInfo()
|
||||
{
|
||||
if(_routing_info_page == NULL)
|
||||
_routing_info_page = new TurtleRouterDialog ;
|
||||
|
||||
_routing_info_page->show() ;
|
||||
}
|
||||
|
||||
void ServerPage::updateMaxTRUpRate(int b)
|
||||
{
|
||||
rsTurtle->setMaxTRForwardRate(b) ;
|
||||
|
@ -198,12 +214,14 @@ void ServerPage::load()
|
|||
ui.showDiscStatusBar->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC);
|
||||
|
||||
ui._max_tr_up_per_sec_SB->setValue(rsTurtle->getMaxTRForwardRate()) ;
|
||||
|
||||
ui._turtle_enabled_CB->setChecked(rsTurtle->enabled()) ;
|
||||
}
|
||||
|
||||
void ServerPage::toggleTurtleRouting(bool b)
|
||||
{
|
||||
ui._max_tr_up_per_sec_SB->setEnabled(b) ;
|
||||
ui._routing_info_PB->setEnabled(true) ; // always enabled!
|
||||
|
||||
rsTurtle->setEnabled(b) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <retroshare-gui/configpage.h>
|
||||
#include "ui_ServerPage.h"
|
||||
|
||||
class TurtleRouterDialog ;
|
||||
|
||||
class ServerPage: public ConfigPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -47,6 +49,7 @@ public slots:
|
|||
private slots:
|
||||
void saveAddresses();
|
||||
void toggleUPnP();
|
||||
void showRoutingInfo();
|
||||
void toggleIpDetermination(bool) ;
|
||||
void toggleTunnelConnection(bool) ;
|
||||
void updateMaxTRUpRate(int) ;
|
||||
|
@ -54,6 +57,8 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::ServerPage ui;
|
||||
|
||||
TurtleRouterDialog *_routing_info_page ;
|
||||
};
|
||||
|
||||
#endif // !SERVERPAGE_H
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>573</width>
|
||||
<width>632</width>
|
||||
<height>683</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -112,7 +112,7 @@ peers still need to trust each other to allow connection. </string>
|
|||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
@ -373,6 +373,23 @@ behind a firewall or a VPN.</string>
|
|||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_turtle_enabled_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">Unchecking this disables all anonymous routing activity, except cache cleaning. Incoming tunnel requests are discarded, and no tunnel requests are sent to anyone.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="_routing_info_PB">
|
||||
<property name="text">
|
||||
<string>Show routing info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
|
@ -405,31 +422,8 @@ The default value is 20.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_turtle_enabled_CB">
|
||||
<property name="toolTip">
|
||||
<string>Unchecking this disables all anonymous routing activity, except cache cleaning. Incoming tunnel requests are discarded, and no tunnel requests are sent to anyone.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable anonymous data routing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue