mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
bring back network status tab.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3932 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
aa285ccfef
commit
fd2955b28b
@ -178,6 +178,11 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
menu->addAction(ui.actionTabsRounded);
|
||||
ui.viewButton->setMenu(menu);
|
||||
|
||||
QTimer *timer2 = new QTimer(this);
|
||||
connect(timer2, SIGNAL(timeout()), this, SLOT(updateNetworkStatus()));
|
||||
timer2->start(1000);
|
||||
|
||||
updateNetworkStatus();
|
||||
loadtabsettings();
|
||||
|
||||
ui.clearButton->hide();
|
||||
@ -704,6 +709,49 @@ void NetworkDialog::on_actionCreate_New_Profile_activated()
|
||||
// gencertdialog.exec ();
|
||||
}
|
||||
|
||||
void NetworkDialog::updateNetworkStatus()
|
||||
{
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
return ;
|
||||
|
||||
rsiface->lockData(); /* Lock Interface */
|
||||
|
||||
/* now the extra bit .... switch on check boxes */
|
||||
const RsConfig &config = rsiface->getConfig();
|
||||
|
||||
|
||||
/******* Network Status Tab *******/
|
||||
|
||||
if(config.netUpnpOk)
|
||||
{
|
||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.iconlabel_upnp->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
}
|
||||
|
||||
if (config.netLocalOk)
|
||||
{
|
||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.iconlabel_netLimited->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
}
|
||||
|
||||
if (config.netExtraAddressOk)
|
||||
{
|
||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
}
|
||||
|
||||
rsiface->unlockData(); /* UnLock Interface */
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabsnorth_activated()
|
||||
{
|
||||
ui.networkTab->setTabPosition(QTabWidget::North);
|
||||
@ -736,11 +784,13 @@ void NetworkDialog::on_actionTabsright_activated()
|
||||
void NetworkDialog::on_actionTabsTriangular_activated()
|
||||
{
|
||||
ui.networkTab->setTabShape(QTabWidget::Triangular);
|
||||
ui.tabBottom->setTabShape(QTabWidget::Triangular);
|
||||
}
|
||||
|
||||
void NetworkDialog::on_actionTabsRounded_activated()
|
||||
{
|
||||
ui.networkTab->setTabShape(QTabWidget::Rounded);
|
||||
ui.tabBottom->setTabShape(QTabWidget::Rounded);
|
||||
}
|
||||
|
||||
void NetworkDialog::loadtabsettings()
|
||||
|
@ -65,7 +65,9 @@ private slots:
|
||||
void on_actionExportKey_activated();
|
||||
|
||||
void on_actionCreate_New_Profile_activated();
|
||||
|
||||
|
||||
void updateNetworkStatus();
|
||||
|
||||
void loadtabsettings();
|
||||
|
||||
void on_actionTabsright_activated();
|
||||
|
@ -328,6 +328,141 @@ subcontrol-position: bottom right;
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QTabWidget" name="tabBottom">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="networkstatus">
|
||||
<attribute name="title">
|
||||
<string>Network Status</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<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>Local network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<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</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<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/>
|
||||
</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_ext">
|
||||
<property name="text">
|
||||
<string>External ip address finder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QTreeWidget" name="unvalidGPGkeyWidget">
|
||||
<property name="contextMenuPolicy">
|
||||
|
Loading…
Reference in New Issue
Block a user