GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyServerImportDialog.h
1 
29 #pragma once
30 
31 #include <QtNetwork>
32 
33 #include "KeyImportDetailDialog.h"
34 #include "core/typedef/CoreTypedef.h"
35 #include "ui/dialog/GeneralDialog.h"
36 
37 namespace GpgFrontend::UI {
38 
44  Q_OBJECT
45 
46  public:
53  explicit KeyServerImportDialog(QWidget* parent);
54 
55  public slots:
56 
62  void SlotImport(const KeyIdArgsListPtr& keys);
63 
70  void SlotImport(std::vector<QString> key_ids_list, QString keyserver_url);
71 
72  signals:
73 
78  void SignalKeyImported();
79 
80  private slots:
81 
86  void slot_import();
87 
92  void slot_search_finished(QNetworkReply::NetworkError reply,
93  QByteArray buffer);
94 
100  void slot_import_finished(bool success, QString err_msg, QByteArray buffer,
101  std::shared_ptr<GpgImportInformation> info);
102 
107  void slot_search();
108 
109  private:
114  void create_keys_table();
115 
122  void set_message(const QString& text, bool error);
123 
129  void import_keys(ByteArrayPtr in_data);
130 
136  void set_loading(bool status);
137 
145  QPushButton* create_button(const QString& text, const char* member);
146 
152  QComboBox* create_combo_box();
153 
154  QHBoxLayout* message_layout_;
155 
156  QLineEdit* search_line_edit_{};
157  QComboBox* key_server_combo_box_{};
158  QProgressBar* waiting_bar_;
159  QLabel* search_label_{};
160  QLabel* key_server_label_{};
161  QLabel* message_{};
162  QLabel* icon_{};
163  QPushButton* close_button_{};
164  QPushButton* import_button_{};
165  QPushButton* search_button_{};
166  QTableWidget* keys_table_{};
167 };
168 
169 } // namespace GpgFrontend::UI
Definition: GeneralDialog.h:35
Definition: KeyServerImportDialog.h:43
void SlotImport(const KeyIdArgsListPtr &keys)
Definition: KeyServerImportDialog.cpp:376
void slot_import_finished(bool success, QString err_msg, QByteArray buffer, std::shared_ptr< GpgImportInformation > info)
Definition: KeyServerImportDialog.cpp:408
void import_keys(ByteArrayPtr in_data)
KeyServerImportDialog(QWidget *parent)
Construct a new Key Server Import Dialog object.
Definition: KeyServerImportDialog.cpp:44
QPushButton * create_button(const QString &text, const char *member)
Create a button object.
void create_keys_table()
Create a keys table object.
Definition: KeyServerImportDialog.cpp:143
void set_message(const QString &text, bool error)
Set the message object.
Definition: KeyServerImportDialog.cpp:165
void slot_import()
import key(s) for the key table selection
Definition: KeyServerImportDialog.cpp:358
void set_loading(bool status)
Set the loading object.
Definition: KeyServerImportDialog.cpp:428
QComboBox * create_combo_box()
Create a comboBox object.
Definition: KeyServerImportDialog.cpp:125
Definition: FileReadTask.cpp:31