forked from blue/squawk
feat: omemo signal lib wip
This commit is contained in:
parent
08fe37bfb2
commit
442ad37300
34 changed files with 745 additions and 262 deletions
|
@ -6,17 +6,19 @@
|
|||
#include "ui_contactsettings.h"
|
||||
#include "omemodevices.h"
|
||||
|
||||
ContactSettings::ContactSettings(QWidget *parent)
|
||||
: QDialog(parent), m_ui(new Ui::ContactSettings()) {
|
||||
ContactSettings::ContactSettings(QString jid, QWidget *parent)
|
||||
: QDialog(parent), jid(std::move(jid)), m_ui(new Ui::ContactSettings()) {
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect(m_ui->devicesButton, &QPushButton::clicked, this, &ContactSettings::openDeviceList);
|
||||
|
||||
setWindowTitle(QString("Encryption settings for %1").arg(this->jid));
|
||||
}
|
||||
|
||||
ContactSettings::~ContactSettings() {}
|
||||
|
||||
void ContactSettings::openDeviceList() {
|
||||
auto devices = new OMEMODevices(this);
|
||||
auto devices = new OMEMODevices(jid, this);
|
||||
|
||||
devices->setAttribute(Qt::WA_DeleteOnClose);
|
||||
devices->show();
|
||||
|
|
|
@ -13,9 +13,11 @@ namespace Ui {
|
|||
class ContactSettings : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ContactSettings(QWidget *parent = nullptr);
|
||||
explicit ContactSettings(QString jid, QWidget *parent = nullptr);
|
||||
~ContactSettings() override;
|
||||
|
||||
const QString jid;
|
||||
|
||||
private slots:
|
||||
void openDeviceList();
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
#include "omemodevices.h"
|
||||
#include "ui_omemodevices.h"
|
||||
|
||||
OMEMODevices::OMEMODevices(QWidget *parent)
|
||||
: QDialog(parent), m_ui(new Ui::OMEMODevices()) {
|
||||
OMEMODevices::OMEMODevices(QString jid, QWidget *parent)
|
||||
: QDialog(parent), jid(std::move(jid)), m_ui(new Ui::OMEMODevices()) {
|
||||
m_ui->setupUi(this);
|
||||
|
||||
setWindowTitle(QString("%1's OMEMO devices").arg(this->jid));
|
||||
}
|
||||
|
||||
OMEMODevices::~OMEMODevices() {}
|
||||
|
|
|
@ -13,9 +13,11 @@ namespace Ui {
|
|||
class OMEMODevices : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OMEMODevices(QWidget *parent = nullptr);
|
||||
explicit OMEMODevices(QString jid, QWidget *parent = nullptr);
|
||||
~OMEMODevices() override;
|
||||
|
||||
const QString jid;
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::OMEMODevices> m_ui;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue