some initial work and thoughts about encryption

This commit is contained in:
Blue 2023-01-01 20:25:51 +03:00
parent 758a9d95f3
commit b45a73b723
Signed by: blue
GPG key ID: 9B203B252A63EE38
12 changed files with 342 additions and 18 deletions

View file

@ -7,3 +7,7 @@ target_sources(squawk PRIVATE
vcard.h
vcard.ui
)
if (WITH_OMEMO)
add_subdirectory(omemo)
endif()

View file

@ -0,0 +1,5 @@
target_sources(squawk PRIVATE
omemo.cpp
omemo.h
omemo.ui
)

View file

@ -0,0 +1,20 @@
// Squawk messenger.
// Copyright (C) 2019 Yury Gubich <blue@macaw.me>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "omemo.h"
#include "ui_omemo.h"
using namespace Ui;

View file

@ -0,0 +1,43 @@
// Squawk messenger.
// Copyright (C) 2019 Yury Gubich <blue@macaw.me>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef UI_OMEMO_H
#define UI_OMEMO_H
#include <qwidget.h>
#include <QScopedPointer>
namespace Ui {
namespace Ui
{
class Omemo;
}
/**
* @todo write docs
*/
class Omemo : public QWidget
{
Q_OBJECT
private:
QScopedPointer<Ui::Omemo> m_ui;
};
}
#endif // UI_OMEMO_H

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Ui::Omemo</class>
<widget class="QWidget" name="Ui::Omemo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>473</width>
<height>657</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="OMEMOHeading">
<property name="font">
<font>
<pointsize>24</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>OMEMO</string>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>473</width>
<height>592</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QListView" name="keysView"/>
</item>
<item row="3" column="1">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="keysHeading">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Active keys</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="unusedKeysHeading">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Unused keys</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QListView" name="unusedKeysView"/>
</item>
<item row="0" column="0" rowspan="6">
<spacer name="spacerLeft">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" rowspan="6">
<spacer name="spacerRight">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>