GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyNewUIDDialog.h
1
27#ifndef GPGFRONTEND_KEYNEWUIDDIALOG_H
28#define GPGFRONTEND_KEYNEWUIDDIALOG_H
29
30#include "core/GpgContext.h"
31#include "ui/GpgFrontendUI.h"
32
33namespace GpgFrontend::UI {
34class KeyNewUIDDialog : public QDialog {
35 Q_OBJECT
36
37 public:
44 KeyNewUIDDialog(const KeyId& key, QWidget* parent = nullptr);
45
46 signals:
51 void SignalUIDCreated();
52
53 private slots:
54
60
61 private:
62 GpgKey m_key_;
63
64 QLineEdit* name_{};
65 QLineEdit* email_{};
66 QLineEdit* comment_{};
67
68 QPushButton* create_button_{};
69
70 QStringList error_messages_;
71 QLabel* error_label_{};
72
73 QRegularExpression re_email_{
74 R"((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]))"};
75
83 bool check_email_address(const QString& str);
84};
85} // namespace GpgFrontend::UI
86
87#endif // GPGFRONTEND_KEYNEWUIDDIALOG_H
Definition: GpgKey.h:44
Definition: KeyNewUIDDialog.h:34
void slot_create_new_uid()
Definition: KeyNewUIDDialog.cpp:72
KeyNewUIDDialog(const KeyId &key, QWidget *parent=nullptr)
Construct a new Key New U I D Dialog object.
Definition: KeyNewUIDDialog.cpp:34
bool check_email_address(const QString &str)
Definition: KeyNewUIDDialog.cpp:109
Definition: VerifyDetailsDialog.cpp:33