first steps integrating chattools in mainwindow chat

This commit is contained in:
doitux
2007-10-12 11:07:42 +00:00
parent 44f14921d7
commit 2c67f848ea
6 changed files with 87 additions and 27 deletions
+14 -8
View File
@@ -21,6 +21,8 @@
#include "mainwindowimpl.h"
#include "session.h"
#include "chattools.h"
#include "configfile.h"
using namespace std;
@@ -28,6 +30,7 @@ Chat::Chat(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c)
{
myW->setChat(this);
myChatTools = new ChatTools(myW->lineEdit_ChatInput);
connect(this, SIGNAL(signalChatMessage(QString, QString)), this, SLOT(receiveMessage(QString, QString)));
}
@@ -69,12 +72,15 @@ void Chat::checkInputLength(QString string) {
void Chat::clearNewGame() {
myW->textBrowser_Chat->clear();
/* QStringList wordList;
wordList << "alpha" << "omega" << "omicron" << "zeta";*/
// QCompleter *completer = new QCompleter(wordList, this);
// completer->setCaseSensitivity(Qt::CaseInsensitive);
// completer->setCompletionMode(QCompleter::InlineCompletion);
// // lineEdit_ChatInput->setCompleter(completer);
}
void Chat::setPlayerNicksList(QStringList nickList) {
//fill playerNicksList for nick-autocompletition
myChatTools->setPlayerNicksList(nickList);
}
void Chat::fillChatLinesHistory(QString fillString) { myChatTools->fillChatLinesHistory(fillString); }
int Chat::getChatLinesHistorySize() { return myChatTools->getChatLinesHistorySize(); }
void Chat::showChatHistoryIndex(int index) { myChatTools->showChatHistoryIndex(index); }
void Chat::nickAutoCompletition() { myChatTools->nickAutoCompletition(); }
void Chat::setChatTextEdited() { myChatTools->setChatTextEdited(); }