replaced old Network Status with new one

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1229 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-05-13 16:53:20 +00:00
parent f73c925507
commit 6106309a3d
8 changed files with 360 additions and 71 deletions

View File

@ -150,7 +150,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
getNetworkStatus();
updateNetworkStatus();
load();
//load();
/* Hide platform specific features */
@ -699,9 +699,100 @@ void NetworkDialog::updateNetworkStatus()
/******* Network Status Tab *******/
//ui.check_net->setChecked(config.netOk);
ui.check_upnp->setChecked(config.netUpnpOk);
if(config.netUpnpOk)
{
ui.iconlabel_upnp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.textlabel_upnp->setText(tr("UPnP active"));
}
else
{
ui.iconlabel_upnp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.textlabel_upnp->setText(tr("UPnP inactive"));
}
if(config.netDhtOk)
{
ui.iconlabel_dht->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.textlabel_dht->setText(tr("DHT active"));
}
else
{
ui.iconlabel_dht->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.textlabel_dht->setText(tr("DHT inactive"));
}
if(config.netExtOk)
{
ui.iconlabel_ext->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.textlabel_ext->setText(tr("Stabile External IP Address"));
}
else
{
ui.iconlabel_ext->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.textlabel_ext->setText(tr("Not Found External IP Address"));
}
if(config.netUdpOk)
{
ui.iconlabel_udp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.textlabel_udp->setText(tr("UDP Port is reachable"));
}
else
{
ui.iconlabel_udp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.textlabel_udp->setText(tr("UDP Port is not reachable"));
}
if(config.netTcpOk)
{
ui.iconlabel_tcp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.textlabel_tcp->setText(tr("TCP Port is reachable"));
}
else
{
ui.iconlabel_tcp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.textlabel_tcp->setText(tr("TCP Port is not reachable"));
}
if (config.netExtOk)
{
if (config.netUpnpOk || config.netTcpOk)
{
ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
}
else
{
ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
}
}
else if (config.netOk)
{
ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
}
else
{
ui.iconlabel_nonet->setPixmap(QPixmap::QPixmap(":/images/ledon1.png"));
ui.iconlabel_netUdp->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netServer->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
ui.iconlabel_netLimited->setPixmap(QPixmap::QPixmap(":/images/ledoff1.png"));
}
//ui.check_net->setChecked(config.netOk);
/*ui.check_upnp->setChecked(config.netUpnpOk);
ui.check_dht->setChecked(config.netDhtOk);
ui.check_ext->setChecked(config.netExtOk);
ui.check_udp->setChecked(config.netUdpOk);
@ -725,12 +816,12 @@ void NetworkDialog::updateNetworkStatus()
else
{
ui.radio_nonet->setChecked(true);
}
}*/
rsiface->unlockData(); /* UnLock Interface */
}
void NetworkDialog::load()
/*void NetworkDialog::load()
{
//ui.check_net->setCheckable(true);
ui.check_upnp->setCheckable(true);
@ -750,7 +841,7 @@ void NetworkDialog::load()
ui.radio_netLimited->setEnabled(false);
ui.radio_netUdp->setEnabled(false);
ui.radio_netServer->setEnabled(false);
}
}*/
void NetworkDialog::on_actionTabsright_activated()
{

View File

@ -46,7 +46,7 @@ public:
void showpeerdetails(std::string id);
void load();
//void load();
public slots:
void insertConnect();

View File

@ -257,88 +257,249 @@ p, li { white-space: pre-wrap; }
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QRadioButton" name="radio_nonet" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_nonet" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string>No Conectivity</string>
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netLimited" >
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_nonet" >
<property name="text" >
<string>Limited</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netUdp" >
<property name="text" >
<string>Udp</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netServer" >
<property name="text" >
<string>Retroshare Server</string>
<string>No Connectivity</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="check_udp" >
<item row="1" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_netLimited" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_netLimited" >
<property name="text" >
<string>Limited</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_netUdp" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_netUdp" >
<property name="text" >
<string>UDP</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_netServer" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_netServer" >
<property name="text" >
<string>RetroShare Server</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="0" column="1" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_udp" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_udp" >
<property name="text" >
<string>UDP Connections</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_ext" >
</layout>
</item>
<item row="1" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_ext" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string>Stable External IP Addrress</string>
<string/>
</property>
<property name="checkable" >
<bool>false</bool>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_dht" >
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_ext" >
<property name="text" >
<string>DHT Okay</string>
</property>
<property name="checkable" >
<bool>false</bool>
<string>Stable External IP Address</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_upnp" >
</layout>
</item>
<item row="2" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_dht" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_dht" >
<property name="text" >
<string>DHT OK</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_upnp" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_upnp" >
<property name="text" >
<string>UPnP Active</string>
</property>
<property name="checkable" >
<bool>false</bool>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="iconlabel_tcp" >
<property name="maximumSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/ledoff1.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_tcp" >
<item row="0" column="1" >
<widget class="QLabel" name="textlabel_tcp" >
<property name="text" >
<string>TCP server</string>
</property>
<property name="checkable" >
<bool>false</bool>
<string>TCP Server</string>
</property>
</widget>
</item>
@ -391,6 +552,8 @@ p, li { white-space: pre-wrap; }
</property>
</action>
</widget>
<resources/>
<resources>
<include location="images.qrc" />
</resources>
<connections/>
</ui>

View File

@ -488,10 +488,22 @@
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="spacing" >
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
@ -566,7 +578,7 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
@ -598,7 +610,7 @@
<property name="title" >
<string>Network Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" >
<item>
<layout class="QHBoxLayout" >
<item>
@ -672,11 +684,11 @@
</layout>
</item>
<item>
<spacer name="verticalSpacer" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
@ -699,7 +711,7 @@
<property name="title" >
<string>IP check service</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QCheckBox" name="allowIpDeterminationCB" >
<property name="toolTip" >
@ -712,7 +724,7 @@ behind a firewall or a VPN.</string>
<string>Allow RetroShare to ask my ip to these websites:</string>
</property>
<property name="checked" >
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
@ -747,7 +759,16 @@ behind a firewall or a VPN.</string>
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
@ -777,7 +798,16 @@ behind a firewall or a VPN.</string>
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
@ -807,7 +837,7 @@ behind a firewall or a VPN.</string>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>

View File

@ -201,6 +201,8 @@
<file>images/knewsticker24.png</file>
<file>images/library.png</file>
<file>images/loadcert16.png</file>
<file>images/ledoff1.png</file>
<file>images/ledon1.png</file>
<file>images/locale.png</file>
<file>images/looknfeel.png</file>
<file>images/lphoto.png</file>
@ -269,6 +271,8 @@
<file>images/rsmessenger16.png</file>
<file>images/rsmessenger32.png</file>
<file>images/rstray3.png</file>
<file>images/rstray0.png</file>
<file>images/rstray1.png</file>
<file>images/save24.png</file>
<file>images/send24.png</file>
<file>images/settings.png</file>
@ -283,6 +287,7 @@
<file>images/startall.png</file>
<file>images/server_24x24.png</file>
<file>images/transferupdown.png</file>
<file>images/typing.png</file>
<file>images/uploads.png</file>
<file>images/loader/16-loader.gif</file>
<file>images/loader/32-loader.gif</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B