GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
SettingsKeyServer.h
1 
29 #ifndef GPGFRONTEND_SETTINGSKEYSERVER_H
30 #define GPGFRONTEND_SETTINGSKEYSERVER_H
31 
32 #include "ui/GpgFrontendUI.h"
33 
34 class Ui_KeyServerSettings;
35 
36 namespace GpgFrontend::UI {
41 class KeyserverTab : public QWidget {
42  Q_OBJECT
43 
44  public:
50  explicit KeyserverTab(QWidget* parent = nullptr);
51 
56  void SetSettings();
57 
62  void ApplySettings();
63 
64  private:
65  std::shared_ptr<Ui_KeyServerSettings> ui_;
66  QString default_key_server_;
67  QStringList key_server_str_list_;
68  QMenu* popup_menu_{};
69 
70  QRegularExpression url_reg_{
71  R"(^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$)"};
72 
73  private slots:
74 
79  void slot_add_key_server();
80 
85  void slot_refresh_table();
86 
91  void slot_test_listed_key_server();
92 
93  signals:
99  void SignalRestartNeeded(bool needed);
100 
101  protected:
107  void contextMenuEvent(QContextMenuEvent* event) override;
108 };
109 } // namespace GpgFrontend::UI
110 
111 #endif // GPGFRONTEND_SETTINGSKEYSERVER_H
Definition: SettingsKeyServer.h:41
void SetSettings()
Set the Settings object.
Definition: SettingsKeyServer.cpp:117
void SignalRestartNeeded(bool needed)
void contextMenuEvent(QContextMenuEvent *event) override
Definition: SettingsKeyServer.cpp:289
KeyserverTab(QWidget *parent=nullptr)
Construct a new Keyserver Tab object.
Definition: SettingsKeyServer.cpp:40
Definition: FileReadTask.cpp:31