KeyMgmt.h
#ifndef __KEYMGMT_H__
#define __KEYMGMT_H__
#include "ui/GpgFrontendUI.h"
#include "ui/dialog/import_export/KeyImportDetailDialog.h"
#include "ui/dialog/import_export/KeyServerImportDialog.h"
#include "ui/dialog/key_generate/KeygenDialog.h"
#include "ui/dialog/keypair_details/KeyDetailsDialog.h"
#include "ui/main_window/GeneralMainWindow.h"
#include "ui/widgets/KeyList.h"
namespace GpgFrontend::UI {
class KeyMgmt : public GeneralMainWindow {
Q_OBJECT
public:
explicit KeyMgmt(QWidget* parent = nullptr);
public slots:
void SlotGenerateSubKey();
void SlotExportKeyToKeyPackage();
void SlotExportKeyToClipboard();
void SlotExportAsOpenSSHFormat();
void SlotDeleteSelectedKeys();
void SlotDeleteCheckedKeys();
void SlotGenerateKeyDialog();
void SlotShowKeyDetails();
void SlotImportKeyPackage();
signals:
void SignalStatusBarChanged(QString);
void SignalKeyStatusUpdated();
private:
void create_menus();
void create_actions();
void create_tool_bars();
void delete_keys_with_warning(GpgFrontend::KeyIdArgsListPtr uidList);
KeyList* key_list_;
QMenu* file_menu_{};
QMenu* key_menu_{};
QMenu* generate_key_menu_{};
QMenu* import_key_menu_{};
QAction* open_key_file_act_{};
QAction* export_key_to_file_act_{};
QAction* export_key_as_open_ssh_format_{};
QAction* export_key_to_clipboard_act_{};
QAction* delete_checked_keys_act_{};
QAction* delete_selected_keys_act_{};
QAction* generate_key_dialog_act_{};
QAction* generate_key_pair_act_{};
QAction* generate_subkey_act_{};
QAction* import_key_from_clipboard_act_{};
QAction* import_key_from_file_act_{};
QAction* import_key_from_key_server_act_{};
QAction* import_keys_from_key_package_act_{};
QAction* close_act_{};
QAction* show_key_details_act_{};
KeyServerImportDialog* import_dialog_{};
};
} // namespace GpgFrontend::UI
#endif // __KEYMGMT_H__
GpgFrontend::UI::KeyMgmt::KeyMgmt
KeyMgmt(QWidget *parent=nullptr)
Construct a new Key Mgmt object.
Definition: KeyMgmt.cpp:46
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::UI::KeyMgmt::create_menus
void create_menus()
Create a menus object.
Definition: KeyMgmt.cpp:219
GpgFrontend::UI::KeyMgmt::create_actions
void create_actions()
Create a actions object.
Definition: KeyMgmt.cpp:123
GpgFrontend::KeyPackageOperator::ImportKeyPackage
static bool ImportKeyPackage(const std::filesystem::path &key_package_path, const std::filesystem::path &phrase_path, GpgFrontend::GpgImportInformation &import_info)
import key package
Definition: KeyPackageOperator.cpp:71
GpgFrontend::UI::GeneralMainWindow
Definition: GeneralMainWindow.h:39
GpgFrontend::write_buffer_to_file
GPGFRONTEND_CORE_EXPORT bool write_buffer_to_file(const std::string &path, const std::string &out_buffer)
Definition: GpgConstants.cpp:128
GpgFrontend::SingletonFunctionObject< GlobalSettingStation >::GetInstance
static GlobalSettingStation & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::GlobalSettingStation::GetUISettings
libconfig::Setting & GetUISettings() noexcept
Definition: GlobalSettingStation.h:63
GpgFrontend::UI::KeyList::AddListGroupTab
void AddListGroupTab(const QString &name, KeyListRow::KeyType selectType=KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::InfoType infoType=KeyListColumn::ALL, const std::function< bool(const GpgKey &)> &filter=[](const GpgKey &) -> bool { return true;})
Definition: KeyList.cpp:99
GpgFrontend::UI::KeyList::GetChecked
KeyIdArgsListPtr GetChecked()
Get the Checked object.
Definition: KeyList.cpp:181
GpgFrontend::UI::KeyMgmt
Definition: KeyMgmt.h:46
GpgFrontend::UI::KeyList::AddMenuAction
void AddMenuAction(QAction *act)
Definition: KeyList.cpp:300
GpgFrontend::UI::KeyServerImportDialog
Definition: KeyServerImportDialog.h:46
GpgFrontend::UI::KeyDetailsDialog
Definition: KeyDetailsDialog.h:38
GpgFrontend::GpgKeyGetter::GetKey
GpgKey GetKey(const std::string &id, bool use_cache=true)
Get the Key object.
Definition: GpgKeyGetter.cpp:47
GpgFrontend::UI::KeyList::GetSelected
KeyIdArgsListPtr GetSelected()
Get the Selected object.
Definition: KeyList.cpp:253
GpgFrontend::UI::CommonUtils::SlotImportKeyFromFile
void SlotImportKeyFromFile(QWidget *parent)
Definition: UserInterfaceUtils.cpp:188
GpgFrontend::UI::KeyMgmt::create_tool_bars
void create_tool_bars()
Create a tool bars object.
Definition: KeyMgmt.cpp:242
GpgFrontend::GpgKey::IsPrivateKey
bool IsPrivateKey() const
Definition: GpgKey.cpp:138
GpgFrontend::UI::KeyList::SetDoubleClickedAction
void SetDoubleClickedAction(std::function< void(const GpgKey &, QWidget *)> action)
Set the Double Clicked Action object.
Definition: KeyList.cpp:403
GpgFrontend::UI::KeyMgmt::delete_keys_with_warning
void delete_keys_with_warning(GpgFrontend::KeyIdArgsListPtr uidList)
Definition: KeyMgmt.cpp:282
GpgFrontend::UI::CommonUtils::SlotImportKeyFromKeyServer
void SlotImportKeyFromKeyServer(QWidget *parent)
Definition: UserInterfaceUtils.cpp:204
GpgFrontend::UI::KeyList
Definition: KeyList.h:152
GpgFrontend::GpgKey::IsExpired
bool IsExpired() const
Definition: GpgKey.cpp:140
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::UI::CommonUtils::SlotImportKeyFromClipboard
void SlotImportKeyFromClipboard(QWidget *parent)
Definition: UserInterfaceUtils.cpp:209
GpgFrontend::GpgKey::IsRevoked
bool IsRevoked() const
Definition: GpgKey.cpp:142
GpgFrontend::GpgKey::IsDisabled
bool IsDisabled() const
Definition: GpgKey.cpp:144
GpgFrontend::GpgKey::IsHasMasterKey
bool IsHasMasterKey() const
Definition: GpgKey.cpp:146
GpgFrontend::UI::CommonUtils::GetInstance
static CommonUtils * GetInstance()
Get the Instance object.
Definition: UserInterfaceUtils.cpp:143
GpgFrontend::GpgKey
Definition: GpgKey.h:41
GpgFrontend::GpgKeyOpera::DeleteKeys
void DeleteKeys(KeyIdArgsListPtr key_ids)
Definition: GpgKeyOpera.cpp:51
GpgFrontend::UI::SignalStation::SignalRefreshStatusBar
void SignalRefreshStatusBar(const QString &message, int timeout)