void MainWindow::msgUserStats(const MumbleProto::UserStats &msg) { UserInformation *ui = qmUserInformations.value(msg.session()); if (ui) { ui->update(msg); } else { ui = new UserInformation(msg, g.ocIntercept ? g.mw : NULL); ui->setAttribute(Qt::WA_DeleteOnClose, true); connect(ui, SIGNAL(destroyed()), this, SLOT(destroyUserInformation())); qmUserInformations.insert(msg.session(), ui); ui->show(); } }
UserInformation::UserInformation(const MumbleProto::UserStats &msg, QWidget *p) : QDialog(p) { setupUi(this); uiSession = msg.session(); qtTimer = new QTimer(this); connect(qtTimer, SIGNAL(timeout()), this, SLOT(tick())); qtTimer->start(6000); qgbConnection->setVisible(false); update(msg); resize(sizeHint()); qfCertificateFont = qlCertificate->font(); }