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 #include "ui/dialog/GeneralDialog.h"
33 
34 namespace GpgFrontend::UI {
36  Q_OBJECT
37 
38  public:
45  KeyNewUIDDialog(const KeyId& key, QWidget* parent = nullptr);
46 
47  signals:
52  void SignalUIDCreated();
53 
54  private slots:
55 
60  void slot_create_new_uid();
61 
62  private:
63  GpgKey m_key_;
64 
65  QLineEdit* name_{};
66  QLineEdit* email_{};
67  QLineEdit* comment_{};
68 
69  QPushButton* create_button_{};
70 
71  QStringList error_messages_;
72  QLabel* error_label_{};
73 
74  QRegularExpression re_email_{
75  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])+)\]))"};
76 
84  bool check_email_address(const QString& str);
85 };
86 } // namespace GpgFrontend::UI
87 
88 #endif // GPGFRONTEND_KEYNEWUIDDIALOG_H
Definition: GpgKey.h:43
Definition: GeneralDialog.h:35
Definition: KeyNewUIDDialog.h:35
void slot_create_new_uid()
Definition: KeyNewUIDDialog.cpp:74
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:111
Definition: FileReadTask.cpp:31