set chatinput maximum

This commit is contained in:
doitux
2007-05-25 17:57:03 +00:00
parent 13a731e041
commit a6ea197a43
4 changed files with 10 additions and 0 deletions
+5
View File
@@ -58,3 +58,8 @@ void Chat::checkInvisible() {
default: { myW->tabWidget->startBlinkChatTab(); }
}
}
void Chat::checkInputLength(QString string) {
if(string.toUtf8().length() > 120) myW->lineEdit_ChatInput->setMaxLength(string.length());
}
+1
View File
@@ -47,6 +47,7 @@ public slots:
void sendMessage();
void receiveMessage(QString playerName, QString msg);
void checkInvisible();
void checkInputLength(QString);
private:
+3
View File
@@ -560,6 +560,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
connect( tabWidget, SIGNAL( currentChanged(int) ), this, SLOT( tabSwitchAction() ) );
connect( lineEdit_ChatInput, SIGNAL( returnPressed () ), this, SLOT( sendChatMessage() ) );
connect( lineEdit_ChatInput, SIGNAL( textChanged (QString) ), this, SLOT( checkChatInputLength(QString) ) );
//Nachrichten Thread-Save
connect(this, SIGNAL(signalRefreshSet()), this, SLOT(refreshSet()));
@@ -2510,6 +2511,8 @@ void mainWindowImpl::blinkingStartButtonAnimationAction() {
}
void mainWindowImpl::sendChatMessage() { myChat->sendMessage(); }
void mainWindowImpl::checkChatInputLength(QString string) { myChat->checkInputLength(string); }
void mainWindowImpl::tabSwitchAction() {
+1
View File
@@ -237,6 +237,7 @@ public slots:
void paintStartSplash();
void sendChatMessage();
void checkChatInputLength(QString);
void tabSwitchAction();
void networkError(int, int);