diff options
| author | Anton <anton@picapica> | 2019-03-06 18:07:59 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2019-03-06 18:07:59 +0400 |
| commit | 73c06c18c5c6401ee08748ebed08c8896f63e344 (patch) | |
| tree | b832d62390181848e8d0b0efc7c5b9954c50e2b6 /pica-client/chatwindow.cpp | |
| parent | 032eb1f23992568e3ddd7946f94cd69a464167ba (diff) | |
| download | pica-pica-73c06c18c5c6401ee08748ebed08c8896f63e344.tar.gz pica-pica-73c06c18c5c6401ee08748ebed08c8896f63e344.zip | |
pica-client: display connection status, ciphersuite in chat window
Diffstat (limited to 'pica-client/chatwindow.cpp')
| -rw-r--r-- | pica-client/chatwindow.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pica-client/chatwindow.cpp b/pica-client/chatwindow.cpp index f1835d7..f50d489 100644 --- a/pica-client/chatwindow.cpp +++ b/pica-client/chatwindow.cpp @@ -28,7 +28,7 @@ #include <QMessageBox> -ChatWindow::ChatWindow(QByteArray peer_id) : +ChatWindow::ChatWindow(QByteArray peer_id, QString status) : QWidget(0), peer_id_(peer_id), hist(config_dbname, Accounts::GetCurrentAccount().id) { QVBoxLayout *layout; @@ -58,6 +58,7 @@ ChatWindow::ChatWindow(QByteArray peer_id) : layout = new QVBoxLayout; + lbConnStatus = new QLabel(status); chatw = new QTextEdit(this); sendtextw = new TextSend(this); @@ -67,8 +68,17 @@ ChatWindow::ChatWindow(QByteArray peer_id) : sendtextw->setMinimumWidth(240); sendtextw->setAcceptRichText(false); + { + QFont f = lbConnStatus->font(); + f.setBold(true); + //f.setItalic(true); + f.setStyleHint(QFont::Monospace); + lbConnStatus->setFont(f); + } + chatw->setReadOnly(true); + layout->addWidget(lbConnStatus, 0); layout->addWidget(chatw, 3); layout->addWidget(sendtextw, 1, Qt::AlignBottom); @@ -122,6 +132,11 @@ ChatWindow::ChatWindow(QByteArray peer_id) : } +void ChatWindow::update_status(QString status) +{ + lbConnStatus->setText(status); +} + void ChatWindow::put_message(QString msg, QByteArray id, bool is_me) { QString color, name; |
