adding server lag indicator to the network tooltip
[quassel.git] / src / common / network.cpp
index c813ebb..374c0bf 100644 (file)
@@ -36,6 +36,7 @@ Network::Network(const NetworkId &networkid, QObject *parent)
     _networkId(networkid),
     _identity(0),
     _myNick(QString()),
+    _latency(0),
     _networkName(QString("<not initialized>")),
     _currentServer(QString()),
     _connected(false),
@@ -429,6 +430,13 @@ void Network::setMyNick(const QString &nickname) {
   emit myNickSet(nickname);
 }
 
+void Network::setLatency(int latency) {
+  if(_latency == latency)
+    return;
+  _latency = latency;
+  emit latencySet(latency);
+}
+
 void Network::setIdentity(IdentityId id) {
   _identity = id;
   emit identitySet(id);