adds ingame-chat nick-highlighting

This commit is contained in:
doitux
2007-10-14 22:05:00 +00:00
parent f2fc2d301c
commit 3138cd22e7
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
using namespace std;
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, QTreeWidget *t, QTextBrowser *b, int notifyMode) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myNotifyMode(notifyMode), myConfig(c)
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, int notifyMode, QTextBrowser *b, QTreeWidget *t) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myNotifyMode(notifyMode), myConfig(c)
{
}
+1 -1
View File
@@ -32,7 +32,7 @@ class ChatTools : public QObject
Q_OBJECT
public:
ChatTools(QLineEdit* l, ConfigFile *c, QTreeWidget *t = NULL, QTextBrowser *b = NULL, int notifyMode = 0);
ChatTools(QLineEdit* l, ConfigFile *c, int notifyMode = 0, QTextBrowser *b = NULL, QTreeWidget *t = NULL );
~ChatTools();
@@ -32,7 +32,7 @@ using namespace std;
LobbyChat::LobbyChat(gameLobbyDialogImpl* l, ConfigFile *c) : myLobby(l), myConfig(c)
{
myChatTools = new ChatTools(myLobby->lineEdit_ChatInput, myConfig, myLobby->treeWidget_NickList);
myChatTools = new ChatTools(myLobby->lineEdit_ChatInput, myConfig, 1, myLobby->textBrowser_ChatDisplay, myLobby->treeWidget_NickList);
}
LobbyChat::~LobbyChat()
+2 -2
View File
@@ -28,7 +28,7 @@ using namespace std;
Chat::Chat(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c)
{
myChatTools = new ChatTools(myW->lineEdit_ChatInput, myConfig);
myChatTools = new ChatTools(myW->lineEdit_ChatInput, myConfig, 2, myW->textBrowser_Chat);
}
@@ -47,7 +47,7 @@ void Chat::sendMessage() {
void Chat::receiveMessage(QString playerName, QString message) {
myW->textBrowser_Chat->append(playerName + ": " + message);
myChatTools->receiveMessage(playerName, message);
checkInvisible();
}
+1 -1
View File
@@ -3678,7 +3678,7 @@ bool mainWindowImpl::eventFilter(QObject *obj, QEvent *event)
{
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (obj == lineEdit_ChatInput && lineEdit_ChatInput->text() != "" && event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Tab)
if (/*obj == lineEdit_ChatInput && lineEdit_ChatInput->text() != "" && */event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Tab)
{
myChat->nickAutoCompletition();
return true;
@@ -28,7 +28,7 @@ startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent, ConfigFi
{
setupUi(this);
myChat = new ChatTools(lineEdit_ChatInput, myConfig, treeWidget, textBrowser_ChatDisplay, 1);
myChat = new ChatTools(lineEdit_ChatInput, myConfig, 1, textBrowser_ChatDisplay, treeWidget );
lineEdit_ChatInput->installEventFilter(this);