summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIoannis Christoforidis2019-12-04 19:43:57 +0100
committerIoannis Christoforidis2019-12-04 19:51:49 +0100
commita85d0b4ba12d185f103f24f1bfd80e2c65c6753a (patch)
treec82e137207420c650952e00ef018da87ab25e0f7
parentcheck if connection is wired or not and disable link speed if it is (diff)
downloadspeedcheck-a85d0b4ba12d185f103f24f1bfd80e2c65c6753a.tar.gz
speedcheck-a85d0b4ba12d185f103f24f1bfd80e2c65c6753a.tar.xz
speedcheck-a85d0b4ba12d185f103f24f1bfd80e2c65c6753a.zip
add info box of connection type
-rw-r--r--src/speedcheck.cpp2
-rw-r--r--src/ui/speedcheck.ui40
2 files changed, 38 insertions, 4 deletions
diff --git a/src/speedcheck.cpp b/src/speedcheck.cpp
index 2151953..1ad46c9 100644
--- a/src/speedcheck.cpp
+++ b/src/speedcheck.cpp
@@ -115,6 +115,7 @@ void SpeedCheck::updateNetworkInfos(int) {
QMessageBox::warning(NULL, "Warning","Link Speed Slow");
_ui->networkSpeed->setStyleSheet("QLabel {color:orange;}");
_ui->networkSpeed->setToolTip("Networkspeed slow!");
+ _ui->connType->setText("wired");
}
_ui->networkSpeed->setText(speed + " MB/s");
}
@@ -122,6 +123,7 @@ void SpeedCheck::updateNetworkInfos(int) {
_ui->networkSpeed->setDisabled(true);
_ui->networkSpeed->setText("");
_ui->link->setText("");
+ _ui->connType->setText("wireless");
}
}
void SpeedCheck::updateTimer()
diff --git a/src/ui/speedcheck.ui b/src/ui/speedcheck.ui
index daf849a..a795dc1 100644
--- a/src/ui/speedcheck.ui
+++ b/src/ui/speedcheck.ui
@@ -96,8 +96,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
- <width>81</width>
+ <y>70</y>
+ <width>111</width>
<height>19</height>
</rect>
</property>
@@ -108,8 +108,8 @@
<widget class="QLabel" name="networkSpeed">
<property name="geometry">
<rect>
- <x>100</x>
- <y>50</y>
+ <x>150</x>
+ <y>70</y>
<width>151</width>
<height>19</height>
</rect>
@@ -124,6 +124,38 @@
<string>MB</string>
</property>
</widget>
+ <widget class="QLabel" name="link_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>121</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Connection Type:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="connType">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>50</y>
+ <width>151</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;test&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="whatsThis">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;test1&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>wired</string>
+ </property>
+ </widget>
</widget>
</item>
<item>