X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=e92d9b84e1ead82e4e8075d935b5df1ab695b3c2;hb=021349871bba78f30e07e34f75cbfdda414343bd;hp=c1af8b0fd11a50d6140cb8c64c7191a52784a2b9;hpb=665faa937a52fc6175741292737c4a52875b4f75;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index c1af8b0f..e92d9b84 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -68,6 +68,7 @@ MainWin::MainWin(QtUi *_gui, QWidget *parent) : QMainWindow(parent), gui(_gui), + coreLagLabel(new QLabel()), sslLabel(new QLabel()), _titleSetter(this), systray(new QSystemTrayIcon(this)), @@ -332,6 +333,12 @@ void MainWin::setupTopicWidget() { } void MainWin::setupStatusBar() { + // Core Lag: + updateLagIndicator(0); + statusBar()->addPermanentWidget(coreLagLabel); + connect(Client::signalProxy(), SIGNAL(lagUpdated(float)), this, SLOT(updateLagIndicator(float))); + + // SSL indicator connect(Client::instance(), SIGNAL(securedConnection()), this, SLOT(securedConnection())); sslLabel->setPixmap(QPixmap()); statusBar()->addPermanentWidget(sslLabel); @@ -440,6 +447,11 @@ void MainWin::saveLayout() { if(accountId > 0) s.setValue(QString("MainWinState-%1").arg(accountId) , saveState(accountId)); } +void MainWin::updateLagIndicator(float lag) { + coreLagLabel->setText(QString("Core Lag: %1 msec").arg(lag)); +} + + void MainWin::securedConnection() { // todo: make status bar entry sslLabel->setPixmap(QPixmap::fromImage(QImage(":/16x16/status/ssl")));