Add menu option to enable encryption in a private room

This commit is contained in:
Konstantinos Sideris 2018-06-12 09:45:26 +03:00
parent 626c680911
commit 36cb62748b
6 changed files with 142 additions and 15 deletions

View file

@ -5,16 +5,17 @@
#include "Cache.h"
class FlatButton;
class TextField;
class QHBoxLayout;
class Avatar;
class QPixmap;
class QLayout;
class QLabel;
class FlatButton;
class QComboBox;
class TextField;
class QHBoxLayout;
class QLabel;
class QLabel;
class QLayout;
class QPixmap;
class TextField;
class TextField;
class Toggle;
template<class T>
class QSharedPointer;
@ -84,6 +85,7 @@ public:
signals:
void closing();
void enableEncryptionError(const QString &msg);
protected:
void paintEvent(QPaintEvent *event) override;
@ -98,13 +100,15 @@ private:
void setupEditButton();
//! Retrieve the current room information from cache.
void retrieveRoomInfo();
void enableEncryption();
//! Whether the user would be able to change the name or the topic of the room.
bool hasEditRights_ = true;
bool hasEditRights_ = true;
bool usesEncryption_ = false;
QHBoxLayout *editLayout_;
// Button section
FlatButton *saveBtn_;
FlatButton *okBtn_;
FlatButton *cancelBtn_;
FlatButton *editFieldsBtn_;
@ -116,6 +120,7 @@ private:
TopSection *topSection_;
QComboBox *accessCombo;
Toggle *encryptionToggle_;
};
} // dialogs