GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
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 const std::function<
void()>& func);
118 using ImportCallbackFunctiopn = std::function<void(
119 const std::string&,
const std::string&,
size_t,
size_t)>;
139 void SignalKeyStatusUpdated();
145 void SignalGnupgNotInstall();
160 void SlotImportKeys(QWidget* parent,
const std::string& in_buffer);
191 const GpgFrontend::KeyIdArgsList& key_ids,
192 const GpgFrontend::UI::CommonUtils::ImportCallbackFunctiopn& callback);
201 const QStringList& arguments,
202 const std::function<
void(QProcess*)>& interact_func);
213 static std::unique_ptr<CommonUtils> instance_;
218 #endif // GPGFRONTEND_USER_INTERFACE_UTILS_H
static CoreCommonUtil * GetInstance()
Construct a new Core Common Util object.
Definition: CoreCommonUtil.cpp:33
static bool ReadFile(const QString &file_name, QByteArray &data)
read file content
Definition: FileOperator.cpp:31
Definition: WaitingDialog.h:40
Definition: VerifyDetailsDialog.cpp:33
void refresh_info_board(InfoBoardWidget *info_board, int status, const std::string &report_text)
Definition: UserInterfaceUtils.cpp:80
int GetStatus() const
Get the Status object.
Definition: GpgResultAnalyse.cpp:35
Definition: VerifyDetailsDialog.h:41
Definition: CoreCommonUtil.cpp:29
Definition: UserInterfaceUtils.h:111
const std::string GetResultReport() const
Get the Result Report object.
Definition: GpgResultAnalyse.cpp:31
static GpgKeyImportExporter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:181
std::string AppPath
executable binary path of gnupg
Definition: GpgInfo.h:41
void import_unknown_key_from_keyserver(QWidget *parent, const GpgVerifyResultAnalyse &verify_res)
Definition: UserInterfaceUtils.cpp:57
libconfig::Setting & GetUISettings() noexcept
Definition: GlobalSettingStation.h:68
void process_operation(QWidget *parent, const std::string &waiting_title, const std::function< void()> &func)
Definition: UserInterfaceUtils.cpp:112
void SlotImportKeys(QWidget *parent, const std::string &in_buffer)
Definition: UserInterfaceUtils.cpp:164
const GpgInfo & GetInfo() const
Get the Info object.
Definition: GpgContext.h:95
TextEdit class.
Definition: TextEdit.h:41
Definition: GpgVerifyResultAnalyse.h:40
Definition: KeyServerImportDialog.h:43
void FlushKeyCache()
flush the keys in the cache
Definition: GpgKeyGetter.cpp:101
Definition: KeyImportDetailDialog.h:42
void slot_update_key_status()
update the key status when signal is emitted
Definition: UserInterfaceUtils.cpp:331
Definition: GpgResultAnalyse.h:37
static std::vector< int > GetAllChannelId()
Get all the channel ids.
Definition: GpgFunctionObject.h:259
void SlotImportKeyFromFile(QWidget *parent)
Definition: UserInterfaceUtils.cpp:172
void SlotImportKeyFromKeyServer(QWidget *parent)
Definition: UserInterfaceUtils.cpp:188
gpgme_signature_t GetSignatures() const
Get the Signatures object.
Definition: GpgVerifyResultAnalyse.cpp:205
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
void SignalKeyDatabaseRefreshDone()
emit when the key database is refreshed
void SlotImportKeyFromClipboard(QWidget *parent)
Definition: UserInterfaceUtils.cpp:193
CommonUtils()
Construct a new Common Utils object.
Definition: UserInterfaceUtils.cpp:134
GpgImportInformation ImportKey(StdBypeArrayPtr inBuffer)
Definition: GpgKeyImportExporter.cpp:42
void SlotExecuteGpgCommand(const QStringList &arguments, const std::function< void(QProcess *)> &interact_func)
Definition: UserInterfaceUtils.cpp:199
void show_verify_details(QWidget *parent, InfoBoardWidget *info_board, GpgError error, const GpgVerifyResult &verify_result)
Definition: UserInterfaceUtils.cpp:48
void process_result_analyse(TextEdit *edit, InfoBoardWidget *info_board, const GpgResultAnalyse &result_analyse)
Definition: UserInterfaceUtils.cpp:92
static CommonUtils * GetInstance()
Get the Instance object.
Definition: UserInterfaceUtils.cpp:127
- src
- ui
- UserInterfaceUtils.h