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 ()
 

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, 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;})
 
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...
 
std::string 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...
 
static void MarkKeys (QStringList *keyIds)
 

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 ()
 

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,
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; } 
)

◆ AddMenuAction()

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

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

◆ ContainsPrivateKeys()

bool 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()

◆ GetAllPrivateKeys()

KeyIdArgsListPtr GpgFrontend::UI::KeyList::GetAllPrivateKeys ( )

Get the All Private Keys object.

Returns
KeyIdArgsListPtr

◆ GetChecked() [1/2]

◆ GetChecked() [2/2]

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

Get the Checked object.

Parameters
key_table
Returns
KeyIdArgsListPtr

◆ GetPrivateChecked()

KeyIdArgsListPtr GpgFrontend::UI::KeyList::GetPrivateChecked ( )

Get the Private Checked object.

Returns
KeyIdArgsListPtr

Referenced by GpgFrontend::UI::SignersPicker::GetCheckedSigners(), and GpgFrontend::UI::MainWindow::slot_sign().

◆ GetSelected()

◆ GetSelectedKey()

std::string GpgFrontend::UI::KeyList::GetSelectedKey ( )

Get the Selected Key object.

Returns
std::string

◆ import_keys()

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

◆ MarkKeys()

void GpgFrontend::UI::KeyList::MarkKeys ( QStringList *  keyIds)
static
Parameters
keyIdsset background color for Keys and put them to top

◆ 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: