SettingsKeyServer.h
#ifndef GPGFRONTEND_SETTINGSKEYSERVER_H
#define GPGFRONTEND_SETTINGSKEYSERVER_H
#include "ui/GpgFrontendUI.h"
class Ui_KeyServerSettings;
namespace GpgFrontend::UI {
class KeyserverTab : public QWidget {
Q_OBJECT
public:
explicit KeyserverTab(QWidget* parent = nullptr);
void SetSettings();
void ApplySettings();
private:
std::shared_ptr<Ui_KeyServerSettings> ui_;
QString default_key_server_;
QStringList key_server_str_list_;
QMenu* popup_menu_{};
QRegularExpression url_reg_{
R"(^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$)"};
private slots:
void slot_add_key_server();
void slot_refresh_table();
void slot_test_listed_key_server();
signals:
void SignalRestartNeeded(bool needed);
protected:
void contextMenuEvent(QContextMenuEvent* event) override;
};
} // namespace GpgFrontend::UI
#endif // GPGFRONTEND_SETTINGSKEYSERVER_H
GpgFrontend::UI::KeyserverTab::SignalRestartNeeded
void SignalRestartNeeded(bool needed)
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::SingletonFunctionObject< TaskRunnerGetter >::GetInstance
static TaskRunnerGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::KeyserverTab::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event) override
Definition: SettingsKeyServer.cpp:294
GpgFrontend::UI::KeyserverTab
Definition: SettingsKeyServer.h:41
GpgFrontend::UI::ListedKeyServerTestTask::SignalKeyServerListTestResult
void SignalKeyServerListTestResult(std::vector< KeyServerTestResultType > result)
GpgFrontend::UI::SettingsObject::Check
nlohmann::json & Check(const std::string &key, const nlohmann::json &default_value)
Definition: SettingsObject.cpp:31
GpgFrontend::UI::SettingsObject
The SettingsObject class This class is used to store settings for the application securely.
Definition: SettingsObject.h:43
GpgFrontend::UI::KeyserverTab::KeyserverTab
KeyserverTab(QWidget *parent=nullptr)
Construct a new Keyserver Tab object.
Definition: SettingsKeyServer.cpp:40
GpgFrontend::UI::KeyserverTab::SetSettings
void SetSettings()
Set the Settings object.
Definition: SettingsKeyServer.cpp:122