set chatinput maximum
This commit is contained in:
@@ -58,3 +58,8 @@ void Chat::checkInvisible() {
|
|||||||
default: { myW->tabWidget->startBlinkChatTab(); }
|
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 sendMessage();
|
||||||
void receiveMessage(QString playerName, QString msg);
|
void receiveMessage(QString playerName, QString msg);
|
||||||
void checkInvisible();
|
void checkInvisible();
|
||||||
|
void checkInputLength(QString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -560,6 +560,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
|
|
||||||
connect( tabWidget, SIGNAL( currentChanged(int) ), this, SLOT( tabSwitchAction() ) );
|
connect( tabWidget, SIGNAL( currentChanged(int) ), this, SLOT( tabSwitchAction() ) );
|
||||||
connect( lineEdit_ChatInput, SIGNAL( returnPressed () ), this, SLOT( sendChatMessage() ) );
|
connect( lineEdit_ChatInput, SIGNAL( returnPressed () ), this, SLOT( sendChatMessage() ) );
|
||||||
|
connect( lineEdit_ChatInput, SIGNAL( textChanged (QString) ), this, SLOT( checkChatInputLength(QString) ) );
|
||||||
|
|
||||||
//Nachrichten Thread-Save
|
//Nachrichten Thread-Save
|
||||||
connect(this, SIGNAL(signalRefreshSet()), this, SLOT(refreshSet()));
|
connect(this, SIGNAL(signalRefreshSet()), this, SLOT(refreshSet()));
|
||||||
@@ -2510,6 +2511,8 @@ void mainWindowImpl::blinkingStartButtonAnimationAction() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::sendChatMessage() { myChat->sendMessage(); }
|
void mainWindowImpl::sendChatMessage() { myChat->sendMessage(); }
|
||||||
|
void mainWindowImpl::checkChatInputLength(QString string) { myChat->checkInputLength(string); }
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::tabSwitchAction() {
|
void mainWindowImpl::tabSwitchAction() {
|
||||||
|
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ public slots:
|
|||||||
void paintStartSplash();
|
void paintStartSplash();
|
||||||
|
|
||||||
void sendChatMessage();
|
void sendChatMessage();
|
||||||
|
void checkChatInputLength(QString);
|
||||||
void tabSwitchAction();
|
void tabSwitchAction();
|
||||||
|
|
||||||
void networkError(int, int);
|
void networkError(int, int);
|
||||||
|
|||||||
Reference in New Issue
Block a user