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