aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/KeyTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets/KeyTable.h')
-rw-r--r--src/ui/widgets/KeyTable.h44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/ui/widgets/KeyTable.h b/src/ui/widgets/KeyTable.h
index fe73bc98..9f6d1ba5 100644
--- a/src/ui/widgets/KeyTable.h
+++ b/src/ui/widgets/KeyTable.h
@@ -54,9 +54,8 @@ struct KeyTable : public QTableView {
KeyTable(
QWidget* parent, QSharedPointer<GpgKeyTableModel> model,
GpgKeyTableDisplayMode _select_type, GpgKeyTableColumn _info_type,
- GpgKeyTableProxyModel::KeyFilter _filter = [](const GpgKey&) -> bool {
- return true;
- });
+ GpgKeyTableProxyModel::KeyFilter _filter =
+ [](const GpgAbstractKey*) -> bool { return true; });
/**
* @brief
@@ -70,7 +69,7 @@ struct KeyTable : public QTableView {
*
* @return KeyIdArgsListPtr&
*/
- [[nodiscard]] auto GetChecked() const -> KeyIdArgsList;
+ [[nodiscard]] auto GetCheckedKeys() const -> GpgAbstractKeyPtrList;
/**
* @brief
@@ -121,42 +120,45 @@ struct KeyTable : public QTableView {
[[nodiscard]] auto GetRowCount() const -> int;
/**
- * @brief Get the Key Id By Row object
+ * @brief
*
- * @param row
- * @return QString
+ * @param index
+ * @return GpgAbstractKeyPtr
+ */
+ [[nodiscard]] auto GetKeyByIndex(QModelIndex index) const
+ -> GpgAbstractKeyPtr;
+
+ /**
+ * @brief Get the Selected Keys object
+ *
+ * @param index
+ * @return GpgAbstractKeyPtrList
*/
- [[nodiscard]] auto GetKeyIdByRow(int row) const -> QString;
+ [[nodiscard]] auto GetSelectedKeys() const -> GpgAbstractKeyPtrList;
/**
* @brief
*
- * @param row
- * @return true
- * @return false
*/
- [[nodiscard]] auto IsPublicKeyByRow(int row) const -> bool;
+ void CheckAll();
/**
* @brief
*
- * @param row
- * @return true
- * @return false
*/
- [[nodiscard]] auto IsPrivateKeyByRow(int row) const -> bool;
+ void UncheckAll();
/**
* @brief
*
*/
- void CheckAll();
+ void SetFilter(const GpgKeyTableProxyModel::KeyFilter&);
/**
* @brief
*
*/
- void UncheckAll();
+ void RefreshProxyModel();
signals:
@@ -172,6 +174,12 @@ struct KeyTable : public QTableView {
*/
void SignalGpgContextChannelChange(int);
+ /**
+ * @brief
+ *
+ */
+ void SignalKeyChecked();
+
private:
QSharedPointer<GpgKeyTableModel> model_;
GpgKeyTableProxyModel proxy_model_;