29 #ifndef GPGFRONTEND_USER_INTERFACE_UTILS_H
30 #define GPGFRONTEND_USER_INTERFACE_UTILS_H
32 #include "core/GpgModel.h"
33 #include "core/function/result_analyse/GpgVerifyResultAnalyse.h"
34 #include "ui/GpgFrontendUI.h"
37 class GpgResultAnalyse;
42 class InfoBoardWidget;
54 GpgError error,
const GpgVerifyResult& verify_result);
63 QWidget* parent,
const GpgVerifyResultAnalyse& verify_res);
73 const std::string& report_text);
83 const GpgResultAnalyse& result_analyse);
94 const GpgResultAnalyse& result_analyse_a,
95 const GpgResultAnalyse& result_analyse_b);
105 QWidget* parent,
const std::string& waiting_title,
106 GpgFrontend::Thread::Task::TaskRunnable func,
107 GpgFrontend::Thread::Task::TaskCallback callback =
nullptr,
108 Thread::Task::DataObjectPtr data_object =
nullptr);
118 const std::string& key_server);
131 using ImportCallbackFunctiopn = std::function<void(
132 const std::string&,
const std::string&,
size_t,
size_t)>;
152 void SignalKeyStatusUpdated();
158 void SignalGnupgNotInstall();
170 void SignalNeedUserInputPassphrase();
176 void SignalUserInputPassphraseDone(QString passphrase);
185 void SlotImportKeys(QWidget* parent,
const std::string& in_buffer);
216 const GpgFrontend::KeyIdArgsList& key_ids,
217 const GpgFrontend::UI::CommonUtils::ImportCallbackFunctiopn& callback);
226 const QStringList& arguments,
227 const std::function<
void(QProcess*)>& interact_func);
236 const std::function<
void(QProcess*)>& interact_func);
250 void slot_popup_passphrase_input_dialog();
253 static std::unique_ptr<CommonUtils> instance_;
Definition: UserInterfaceUtils.h:124
void SlotImportKeyFromFile(QWidget *parent)
Definition: UserInterfaceUtils.cpp:194
void SlotImportKeyFromClipboard(QWidget *parent)
Definition: UserInterfaceUtils.cpp:215
void SignalKeyDatabaseRefreshDone()
emit when the key database is refreshed
void SlotImportKeys(QWidget *parent, const std::string &in_buffer)
Definition: UserInterfaceUtils.cpp:186
CommonUtils()
Construct a new Common Utils object.
Definition: UserInterfaceUtils.cpp:150
void SlotExecuteCommand(const std::string &cmd, const QStringList &arguments, const std::function< void(QProcess *)> &interact_func)
Definition: UserInterfaceUtils.cpp:221
void slot_update_key_status()
update the key status when signal is emitted
Definition: UserInterfaceUtils.cpp:398
static CommonUtils * GetInstance()
Get the Instance object.
Definition: UserInterfaceUtils.cpp:143
void SlotImportKeyFromKeyServer(QWidget *parent)
Definition: UserInterfaceUtils.cpp:210
void SlotExecuteGpgCommand(const QStringList &arguments, const std::function< void(QProcess *)> &interact_func)
Definition: UserInterfaceUtils.cpp:253
Definition: FileReadTask.cpp:29
void refresh_info_board(InfoBoardWidget *info_board, int status, const std::string &report_text)
Definition: UserInterfaceUtils.cpp:86
void process_operation(QWidget *parent, const std::string &waiting_title, const Thread::Task::TaskRunnable func, const Thread::Task::TaskCallback callback, Thread::Task::DataObjectPtr data_object)
Definition: UserInterfaceUtils.cpp:116
void show_verify_details(QWidget *parent, InfoBoardWidget *info_board, GpgError error, const GpgVerifyResult &verify_result)
Definition: UserInterfaceUtils.cpp:54
void import_unknown_key_from_keyserver(QWidget *parent, const GpgVerifyResultAnalyse &verify_res)
Definition: UserInterfaceUtils.cpp:63
void import_key_from_keyserver(QWidget *parent, const std::string &key_id, const std::string &key_server)
void process_result_analyse(TextEdit *edit, InfoBoardWidget *info_board, const GpgResultAnalyse &result_analyse)
Definition: UserInterfaceUtils.cpp:98
Definition: CoreCommonUtil.cpp:31