GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
ProxyConnectionTestTask.h
1 
29 #pragma once
30 
31 #include "GpgFrontendUI.h"
32 #include "core/thread/ThreadingModel.h"
33 
34 class QNetworkAccessManager;
35 class QNetworkReply;
36 
37 namespace GpgFrontend::UI {
38 
44  Q_OBJECT
45  public:
53  explicit ProxyConnectionTestTask(QString url, int timeout);
54 
59  auto Run() -> int override;
60 
61  signals:
67  void SignalProxyConnectionTestResult(const QString& result);
68 
69  private slots:
70 
76  void slot_process_network_reply(QNetworkReply* reply);
77 
78  private:
79  QString url_;
80  QString result_;
81  int timeout_ = 500;
82  QNetworkAccessManager* network_manager_;
83 };
84 
85 } // namespace GpgFrontend::UI
Definition: Task.h:39
Definition: ProxyConnectionTestTask.h:43
auto Run() -> int override
can be overwrite by subclass
Definition: ProxyConnectionTestTask.cpp:44
void SignalProxyConnectionTestResult(const QString &result)
void slot_process_network_reply(QNetworkReply *reply)
Definition: ProxyConnectionTestTask.cpp:69
ProxyConnectionTestTask(QString url, int timeout)
Construct a new Proxy Connection Test Thread object.
Definition: ProxyConnectionTestTask.cpp:35
Definition: FileReadTask.cpp:31