forked from blue/squawk
feat(omemo): basic UI
This commit is contained in:
parent
bb2ce750c8
commit
08fe37bfb2
9 changed files with 220 additions and 15 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <unistd.h>
|
||||
#include <QAbstractTextDocumentLayout>
|
||||
#include <QCoreApplication>
|
||||
#include <ui/omemo/contactsettings.h>
|
||||
|
||||
Conversation::Conversation(bool muc, Models::Account* acc, Models::Element* el, const QString pJid, const QString pRes, QWidget* parent):
|
||||
QWidget(parent),
|
||||
|
@ -80,7 +81,8 @@ Conversation::Conversation(bool muc, Models::Account* acc, Models::Element* el,
|
|||
connect(m_ui->clearButton, &QPushButton::clicked, this, &Conversation::onClearButton);
|
||||
connect(m_ui->messageEditor->document()->documentLayout(), &QAbstractTextDocumentLayout::documentSizeChanged,
|
||||
this, &Conversation::onTextEditDocSizeChanged);
|
||||
|
||||
connect(m_ui->encryptionButton, &QToolButton::clicked, this, &Conversation::openEncryptionSettings);
|
||||
|
||||
m_ui->messageEditor->installEventFilter(&ker);
|
||||
|
||||
|
||||
|
@ -433,3 +435,10 @@ void Conversation::onFeedContext(const QPoint& pos)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Conversation::openEncryptionSettings() {
|
||||
auto cs = new ContactSettings(this);
|
||||
|
||||
cs->setAttribute(Qt::WA_DeleteOnClose);
|
||||
cs->show();
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ protected slots:
|
|||
void onFeedMessage(const Shared::Message& msg);
|
||||
void positionShadow();
|
||||
void onFeedContext(const QPoint &pos);
|
||||
void openEncryptionSettings();
|
||||
|
||||
public:
|
||||
const bool isMuc;
|
||||
|
|
|
@ -293,14 +293,15 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="encryptionButton">
|
||||
<widget class="QToolButton" name="encryptionButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="security-low"/>
|
||||
<iconset theme="security-low">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue