void MainWindow::checkTextSettings() { QFont consfont; if (consfont.fromString(settings.consolefont)) { if (consfont!=consolebrowser->font()) consolebrowser->setFont(consfont); } QFont textfont; if (textfont.fromString(settings.chatfont)) { QHashIterator<QString, IrcTextBrowser *> chans(channelsJoined); while (chans.hasNext()) { chans.next(); IrcTextBrowser * brwsr = chans.value(); brwsr->setFont(textfont); } QHashIterator<QString, MessageDialog *> chats(usersChatting); while (chats.hasNext()) { chats.next(); MessageDialog *msgdlg = chats.value(); msgdlg->setFont(textfont); } } }
void MainWindow::userDoubleClicked(const QString &nick) { if (!usersChatting.contains(nick)) { MessageDialog *msgdlg = new MessageDialog(nick, 0); connect(msgdlg, SIGNAL(messageReady(QString,QString)), irc, SLOT(sendMessage(QString,QString))); QFont chatfont; if (chatfont.fromString(settings.chatfont)) msgdlg->setFont(chatfont); msgdlg->show(); usersChatting.insert(nick, msgdlg); } MessageDialog *msgdlg = usersChatting.value(nick); if (msgdlg) msgdlg->show(); }