KeyNewUIDDialog.h
#ifndef GPGFRONTEND_KEYNEWUIDDIALOG_H
#define GPGFRONTEND_KEYNEWUIDDIALOG_H
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/dialog/GeneralDialog.h"
namespace GpgFrontend::UI {
class KeyNewUIDDialog : public GeneralDialog {
Q_OBJECT
public:
KeyNewUIDDialog(const KeyId& key, QWidget* parent = nullptr);
signals:
void SignalUIDCreated();
private slots:
void slot_create_new_uid();
private:
GpgKey m_key_;
QLineEdit* name_{};
QLineEdit* email_{};
QLineEdit* comment_{};
QPushButton* create_button_{};
QStringList error_messages_;
QLabel* error_label_{};
QRegularExpression re_email_{
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])+)\]))"};
bool check_email_address(const QString& str);
};
} // namespace GpgFrontend::UI
#endif // GPGFRONTEND_KEYNEWUIDDIALOG_H
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::SingletonFunctionObject< GpgUIDOperator >::GetInstance
static GpgUIDOperator & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::GeneralDialog
Definition: GeneralDialog.h:35
GpgFrontend::GpgKeyGetter
Definition: GpgKeyGetter.h:45
GpgFrontend::UI::KeyNewUIDDialog::slot_create_new_uid
void slot_create_new_uid()
Definition: KeyNewUIDDialog.cpp:74
GpgFrontend::UI::KeyNewUIDDialog::KeyNewUIDDialog
KeyNewUIDDialog(const KeyId &key, QWidget *parent=nullptr)
Construct a new Key New U I D Dialog object.
Definition: KeyNewUIDDialog.cpp:34
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::UI::KeyNewUIDDialog
Definition: KeyNewUIDDialog.h:35
GpgFrontend::GpgKey
Definition: GpgKey.h:41
GpgFrontend::UI::KeyNewUIDDialog::check_email_address
bool check_email_address(const QString &str)
Definition: KeyNewUIDDialog.cpp:111