GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

KeyServerImportDialog.h
1
29 #ifndef __KEY_SERVER_IMPORT_DIALOG_H__
30 #define __KEY_SERVER_IMPORT_DIALOG_H__
31
32 #include <string>
33
34 #include "KeyImportDetailDialog.h"
35 #include "core/GpgContext.h"
36 #include "ui/GpgFrontendUI.h"
37 #include "ui/dialog/GeneralDialog.h"
38 #include "ui/widgets/KeyList.h"
39
40 namespace GpgFrontend::UI {
41
46 class KeyServerImportDialog : public GeneralDialog {
47 Q_OBJECT
48
49 public:
56 KeyServerImportDialog(bool automatic, QWidget* parent);
57
63 explicit KeyServerImportDialog(QWidget* parent);
64
65 public slots:
66
72 void SlotImport(const KeyIdArgsListPtr& keys);
73
80 void SlotImport(std::vector<std::string> key_ids_list,
81 std::string keyserver_url);
82
83 signals:
84
89 void SignalKeyImported();
90
91 private slots:
92
97 void slot_import();
98
103 void slot_search_finished(QNetworkReply::NetworkError reply,
104 QByteArray buffer);
105
111 void slot_import_finished(QNetworkReply::NetworkError error,
112 QByteArray buffer);
113
118 void slot_search();
119
120 private:
125 void create_keys_table();
126
133 void set_message(const QString& text, bool error);
134
140 void import_keys(ByteArrayPtr in_data);
141
147 void set_loading(bool status);
148
156 QPushButton* create_button(const QString& text, const char* member);
157
163 QComboBox* create_comboBox();
164
165 bool m_automatic_ = false;
166
167 QLineEdit* search_line_edit_{};
168 QComboBox* key_server_combo_box_{};
169 QProgressBar* waiting_bar_;
170 QLabel* search_label_{};
171 QLabel* key_server_label_{};
172 QLabel* message_{};
173 QLabel* icon_{};
174 QPushButton* close_button_{};
175 QPushButton* import_button_{};
176 QPushButton* search_button_{};
177 QTableWidget* keys_table_{};
178 };
179
180 } // namespace GpgFrontend::UI
181
182 #endif // __KEY_SERVER_IMPORT_DIALOG_H__
GpgFrontend::UI::GeneralDialog
Definition: GeneralDialog.h:35
GpgFrontend::UI::KeyServerImportDialog
Definition: KeyServerImportDialog.h:46
GpgFrontend::UI::KeyServerImportDialog::SlotImport
void SlotImport(const KeyIdArgsListPtr &keys)
Definition: KeyServerImportDialog.cpp:440
GpgFrontend::UI::KeyServerImportDialog::import_keys
void import_keys(ByteArrayPtr in_data)
Definition: KeyServerImportDialog.cpp:540
GpgFrontend::UI::KeyServerImportDialog::create_button
QPushButton * create_button(const QString &text, const char *member)
Create a button object.
GpgFrontend::UI::KeyServerImportDialog::create_keys_table
void create_keys_table()
Create a keys table object.
Definition: KeyServerImportDialog.cpp:197
GpgFrontend::UI::KeyServerImportDialog::slot_import_finished
void slot_import_finished(QNetworkReply::NetworkError error, QByteArray buffer)
Definition: KeyServerImportDialog.cpp:489
GpgFrontend::UI::KeyServerImportDialog::KeyServerImportDialog
KeyServerImportDialog(bool automatic, QWidget *parent)
Construct a new Key Server Import Dialog object.
Definition: KeyServerImportDialog.cpp:44
GpgFrontend::UI::KeyServerImportDialog::set_message
void set_message(const QString &text, bool error)
Set the message object.
Definition: KeyServerImportDialog.cpp:219
GpgFrontend::UI::KeyServerImportDialog::create_comboBox
QComboBox * create_comboBox()
Create a comboBox object.
Definition: KeyServerImportDialog.cpp:167
GpgFrontend::UI::KeyServerImportDialog::slot_import
void slot_import()
import key(s) for the key table selection
Definition: KeyServerImportDialog.cpp:427
GpgFrontend::UI::KeyServerImportDialog::set_loading
void set_loading(bool status)
Set the loading object.
Definition: KeyServerImportDialog.cpp:558
GpgFrontend::UI
Definition: FileReadTask.cpp:29