1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

clearing chatarea

This commit is contained in:
agilob 2015-02-27 18:25:27 +00:00
parent 2ec1bd0977
commit 8ceacdd519
No known key found for this signature in database
GPG Key ID: 34568050DBCCB997
2 changed files with 10 additions and 3 deletions

View File

@ -169,9 +169,10 @@ GenericChatForm::GenericChatForm(QWidget *parent)
connect(emoteButton, &QPushButton::clicked, this, &GenericChatForm::onEmoteButtonClicked);
connect(chatWidget, &ChatLog::customContextMenuRequested, this, &GenericChatForm::onChatContextMenuRequested);
new QShortcut(QKeySequence(Qt::Key_PageUp), this, SLOT(previousContact()));
new QShortcut(QKeySequence(Qt::Key_PageDown), this, SLOT(nextContact()));
new QShortcut(Qt::CTRL + Qt::Key_PageUp, this, SLOT(previousContact()));
new QShortcut(Qt::CTRL + Qt::Key_PageDown, this, SLOT(nextContact()));
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_L, this, SLOT(clearChatArea()));
chatWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatArea.css"));
headWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatHead.css"));
}
@ -335,6 +336,11 @@ void GenericChatForm::addSystemInfoMessage(const QString &message, ChatMessage::
insertChatMessage(ChatMessage::createChatInfoMessage(message, type, datetime));
}
void GenericChatForm::clearChatArea()
{
clearChatArea(true);
}
void GenericChatForm::clearChatArea(bool notinform)
{
chatWidget->clear();

View File

@ -74,6 +74,7 @@ protected slots:
void onSaveLogClicked();
void onCopyLogClicked();
void clearChatArea(bool);
void clearChatArea();
void onSelectAllClicked();
void previousContact();
void nextContact();