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, const 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 ()
 
KeyIdArgsListPtr GetChecked ()
 Get the Checked object. More...
 
KeyIdArgsListPtr GetPrivateChecked ()
 Get the Private Checked object. More...
 
KeyIdArgsListPtr GetAllPrivateKeys ()
 Get the All Private Keys object. More...
 
void SetChecked (KeyIdArgsListPtr key_ids)
 Set the Checked object. More...
 
KeyIdArgsListPtr GetSelected ()
 Get the Selected object. More...
 
QString GetSelectedKey ()
 Get the Selected Key object. More...
 
bool ContainsPrivateKeys ()
 

Static Public Member Functions

static KeyIdArgsListPtr GetChecked (const KeyTable &key_table)
 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,
const 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 ( )
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 ( )

Get the All Private Keys object.

Returns
KeyIdArgsListPtr

◆ GetChecked() [1/2]

◆ GetChecked() [2/2]

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

Get the Checked object.

Parameters
key_table
Returns
KeyIdArgsListPtr

◆ GetPrivateChecked()

auto GpgFrontend::UI::KeyList::GetPrivateChecked ( )

Get the Private Checked object.

Returns
KeyIdArgsListPtr

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

◆ GetSelected()

◆ GetSelectedKey()

auto GpgFrontend::UI::KeyList::GetSelectedKey ( )

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: