chat-blinking if invisible and message received

This commit is contained in:
doitux
2007-05-25 10:49:26 +00:00
parent 2333079b13
commit 654ce481ca
10 changed files with 192 additions and 66 deletions
+15 -2
View File
@@ -26,7 +26,6 @@ using namespace std;
Chat::Chat(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c)
{
myW->setChat(this);
}
@@ -43,4 +42,18 @@ void Chat::sendMessage() {
myW->lineEdit_ChatInput->setText("");
}
void Chat::receiveMessage(std::string message) { myW->textBrowser_Chat->append(QString::fromUtf8(message.c_str())); }
void Chat::receiveMessage(std::string message) {
myW->textBrowser_Chat->append(QString::fromUtf8(message.c_str()));
checkInvisible();
}
void Chat::checkInvisible() {
switch (myW->tabWidget->currentIndex()) {
case 1: { myW->tabWidget->stopBlinkChatTab(); }
break;
default: { myW->tabWidget->startBlinkChatTab(); }
}
}