GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::UI::KeyList Class Reference
Inheritance diagram for GpgFrontend::UI::KeyList:
Inheritance graph
Collaboration diagram for GpgFrontend::UI::KeyList:
Collaboration graph

Public Slots

void SlotRefresh ()
 
void SlotRefreshUI ()
 

Signals

void SignalRefreshStatusBar (const QString &message, int timeout)
 
void SignalRefreshDatabase ()
 

Public Member Functions

 KeyList (KeyMenuAbility::AbilityType menu_ability, QWidget *parent=nullptr)
 Construct a new Key List object. More...
 
void AddListGroupTab (const QString &name, const QString &id, KeyListRow::KeyType selectType=KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::InfoType infoType=KeyListColumn::ALL, KeyTable::KeyTableFilter filter=[](const GpgKey &, const KeyTable &) -> bool { return true;})
 
void SetDoubleClickedAction (std::function< void(const GpgKey &, QWidget *)> action)
 Set the Double Clicked Action object. More...
 
void SetColumnWidth (int row, int size)
 Set the Column Width object. More...
 
void AddMenuAction (QAction *act)
 
void AddSeparator ()
 
auto GetChecked () -> KeyIdArgsListPtr
 Get the Checked object. More...
 
auto GetCheckedPrivateKey () -> KeyIdArgsListPtr
 Get the Private Checked object. More...
 
auto GetCheckedPublicKey () -> KeyIdArgsListPtr
 
auto GetAllPrivateKeys () -> KeyIdArgsListPtr
 Get the All Private Keys object. More...
 
void SetChecked (KeyIdArgsListPtr key_ids)
 Set the Checked object. More...
 
auto GetSelected () -> KeyIdArgsListPtr
 Get the Selected object. More...
 
auto GetSelectedKey () -> QString
 Get the Selected Key object. More...
 
auto ContainsPrivateKeys () -> bool
 

Static Public Member Functions

static auto GetChecked (const KeyTable &key_table) -> KeyIdArgsListPtr
 Get the Checked object. More...
 
static void SetChecked (const KeyIdArgsListPtr &keyIds, const KeyTable &key_table)
 Set the Checked object. More...
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dropEvent (QDropEvent *event) override
 

Private Slots

void slot_double_clicked (const QModelIndex &index)
 
void slot_refresh_ui ()
 
void slot_sync_with_key_server ()
 

Private Member Functions

void init ()
 
void import_keys (const QByteArray &inBuffer)
 
void uncheck_all ()
 
void check_all ()
 
void filter_by_keyword ()
 

Private Attributes

std::mutex buffered_key_list_mutex_
 
std::shared_ptr< Ui_KeyList > ui_
 
QTableWidget * m_key_list_ {}
 
std::vector< KeyTablem_key_tables_
 
QMenu * popup_menu_ {}
 
GpgFrontend::KeyLinkListPtr buffered_keys_list_
 
std::function< void(const GpgKey &, QWidget *)> m_action_ = nullptr
 
KeyMenuAbility::AbilityType menu_ability_ = KeyMenuAbility::ALL
 

Constructor & Destructor Documentation

◆ KeyList()

GpgFrontend::UI::KeyList::KeyList ( KeyMenuAbility::AbilityType  menu_ability,
QWidget *  parent = nullptr 
)
explicit

Construct a new Key List object.

Parameters
menu_ability
parent

Member Function Documentation

◆ AddListGroupTab()

void GpgFrontend::UI::KeyList::AddListGroupTab ( const QString &  name,
const QString &  id,
KeyListRow::KeyType  selectType = KeyListRow::SECRET_OR_PUBLIC_KEY,
KeyListColumn::InfoType  infoType = KeyListColumn::ALL,
KeyTable::KeyTableFilter  filter = [](const GpgKey&, const KeyTable&) -> bool { return true; } 
)

◆ AddMenuAction()

void GpgFrontend::UI::KeyList::AddMenuAction ( QAction *  act)
Parameters
act

Referenced by GpgFrontend::UI::KeyMgmt::KeyMgmt().

◆ ContainsPrivateKeys()

auto GpgFrontend::UI::KeyList::ContainsPrivateKeys ( ) -> bool
Returns
true
false

◆ contextMenuEvent()

void GpgFrontend::UI::KeyList::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotected
Parameters
event

◆ dragEnterEvent()

void GpgFrontend::UI::KeyList::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected
Parameters
event

◆ dropEvent()

void GpgFrontend::UI::KeyList::dropEvent ( QDropEvent *  event)
overrideprotected

◆ GetAllPrivateKeys()

auto GpgFrontend::UI::KeyList::GetAllPrivateKeys ( ) -> KeyIdArgsListPtr

Get the All Private Keys object.

Returns
KeyIdArgsListPtr

◆ GetChecked() [1/2]

◆ GetChecked() [2/2]

auto GpgFrontend::UI::KeyList::GetChecked ( const KeyTable key_table) -> KeyIdArgsListPtr
static

Get the Checked object.

Parameters
key_table
Returns
KeyIdArgsListPtr

◆ GetCheckedPrivateKey()

auto GpgFrontend::UI::KeyList::GetCheckedPrivateKey ( ) -> KeyIdArgsListPtr

Get the Private Checked object.

Returns
KeyIdArgsListPtr

Referenced by GpgFrontend::UI::MainWindow::SlotSign().

◆ GetCheckedPublicKey()

auto GpgFrontend::UI::KeyList::GetCheckedPublicKey ( ) -> KeyIdArgsListPtr
Returns
KeyIdArgsListPtr

◆ GetSelected()

◆ GetSelectedKey()

auto GpgFrontend::UI::KeyList::GetSelectedKey ( ) -> QString

Get the Selected Key object.

Returns
QString

◆ import_keys()

void GpgFrontend::UI::KeyList::import_keys ( const QByteArray &  inBuffer)
private

◆ SetChecked() [1/2]

void GpgFrontend::UI::KeyList::SetChecked ( const KeyIdArgsListPtr &  keyIds,
const KeyTable key_table 
)
static

Set the Checked object.

Parameters
keyIds
key_table

◆ SetChecked() [2/2]

void GpgFrontend::UI::KeyList::SetChecked ( KeyIdArgsListPtr  key_ids)

Set the Checked object.

Parameters
key_ids

◆ SetColumnWidth()

void GpgFrontend::UI::KeyList::SetColumnWidth ( int  row,
int  size 
)

Set the Column Width object.

Parameters
row
size

◆ SetDoubleClickedAction()

void GpgFrontend::UI::KeyList::SetDoubleClickedAction ( std::function< void(const GpgKey &, QWidget *)>  action)

Set the Double Clicked Action object.

Parameters
action

Referenced by GpgFrontend::UI::KeyMgmt::KeyMgmt().

◆ SignalRefreshStatusBar

void GpgFrontend::UI::KeyList::SignalRefreshStatusBar ( const QString &  message,
int  timeout 
)
signal
Parameters
message
timeout

◆ slot_double_clicked

void GpgFrontend::UI::KeyList::slot_double_clicked ( const QModelIndex &  index)
privateslot

The documentation for this class was generated from the following files: