set chatinput maximum
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public slots:
|
||||
void sendMessage();
|
||||
void receiveMessage(QString playerName, QString msg);
|
||||
void checkInvisible();
|
||||
void checkInputLength(QString);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
|
||||
@@ -237,6 +237,7 @@ public slots:
|
||||
void paintStartSplash();
|
||||
|
||||
void sendChatMessage();
|
||||
void checkChatInputLength(QString);
|
||||
void tabSwitchAction();
|
||||
|
||||
void networkError(int, int);
|
||||
|
||||
Reference in New Issue
Block a user