GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
GpgFrontend::UI::KeyList Class Reference
Inheritance diagram for GpgFrontend::UI::KeyList:
Collaboration diagram for GpgFrontend::UI::KeyList:

## 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...
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 ()
void | filter_by_keyword ()

## Private Attributes
std::mutex | buffered_key_list_mutex_
std::shared_ptr< Ui_KeyList > | ui_
QTableWidget * | m_key_list_ {}
std::vector< KeyTable > | m_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; }`
| ) |  |

Parameters

  name |
  selectType |
  infoType |
  filter |

References slot_double_clicked().

Referenced by GpgFrontend::UI::MainWindow::create_dock_windows(), GpgFrontend::UI::KeyMgmt::KeyMgmt(), GpgFrontend::UI::KeyUIDSignDialog::KeyUIDSignDialog(), and GpgFrontend::UI::SignersPicker::SignersPicker().

## ◆ 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 | ) |
| override protected

Parameters

  event |

## ◆ dragEnterEvent()

void GpgFrontend::UI::KeyList::dragEnterEvent | ( | QDragEnterEvent * | event | ) |
| override protected

Parameters

  event |

## ◆ dropEvent()

void GpgFrontend::UI::KeyList::dropEvent | ( | QDropEvent * | event | ) |
| override protected

Parameters

  event |

References GpgFrontend::SingletonFunctionObject< GlobalSettingStation >::GetInstance(), GpgFrontend::GlobalSettingStation::GetUISettings(), import_keys(), GpgFrontend::GlobalSettingStation::LookupSettings(), and GpgFrontend::GlobalSettingStation::SyncSettings().

## ◆ GetAllPrivateKeys()

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

Get the All Private Keys object.

Returns
  KeyIdArgsListPtr

## ◆ GetChecked() [1/2]

KeyIdArgsListPtr GpgFrontend::UI::KeyList::GetChecked | ( |  | ) |

Get the Checked object.

Returns
  KeyIdArgsListPtr

Referenced by GpgFrontend::UI::MainWindow::slot_encrypt(), GpgFrontend::UI::MainWindow::slot_encrypt_sign(), GpgFrontend::UI::KeyUIDSignDialog::slot_sign_key(), GpgFrontend::UI::MainWindow::SlotFileEncrypt(), GpgFrontend::UI::MainWindow::SlotFileEncryptSign(), and GpgFrontend::UI::MainWindow::SlotFileSign().

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

KeyIdArgsListPtr GpgFrontend::UI::KeyList::GetSelected | ( |  | ) |

Get the Selected object.

Returns
  KeyIdArgsListPtr

Referenced by GpgFrontend::UI::MainWindow::refresh_keys_from_key_server(), GpgFrontend::UI::MainWindow::slot_append_selected_keys(), GpgFrontend::UI::MainWindow::slot_copy_default_uid_to_clipboard(), GpgFrontend::UI::MainWindow::slot_copy_key_id_to_clipboard(), GpgFrontend::UI::MainWindow::slot_copy_mail_address_to_clipboard(), GpgFrontend::UI::MainWindow::slot_show_key_details(), and GpgFrontend::UI::MainWindow::upload_key_to_server().

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

Parameters

  inBuffer |

References GpgFrontend::SingletonFunctionObject< GpgKeyImportExporter >::GetInstance(), and GpgFrontend::GpgKeyImportExporter::ImportKey().

Referenced by dropEvent().

## ◆ MarkKeys()

void GpgFrontend::UI::KeyList::MarkKeys | ( | QStringList * | keyIds | ) |
| static

Parameters

  keyIds | set 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 | ) |
| private slot

Parameters

  index |

References GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance(), and GpgFrontend::GpgKeyGetter::GetKey().

Referenced by AddListGroupTab().

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

- src/ui/widgets/KeyList.h
- src/ui/widgets/KeyList.cpp