aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/KeyList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets/KeyList.cpp')
-rw-r--r--src/ui/widgets/KeyList.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp
index 73328885..9498480e 100644
--- a/src/ui/widgets/KeyList.cpp
+++ b/src/ui/widgets/KeyList.cpp
@@ -328,6 +328,17 @@ auto KeyList::GetChecked() -> KeyIdArgsListPtr {
return ret;
}
+auto KeyList::GetCheckedKeys() -> QStringList {
+ auto* key_table = qobject_cast<KeyTable*>(ui_->keyGroupTab->currentWidget());
+ QStringList key_id_list;
+ for (int i = 0; i < key_table->GetRowCount(); i++) {
+ if (key_table->IsRowChecked(i)) {
+ key_id_list.append(key_table->GetKeyIdByRow(i));
+ }
+ }
+ return key_id_list;
+}
+
auto KeyList::GetAllPrivateKeys() -> KeyIdArgsListPtr {
auto* key_table = qobject_cast<KeyTable*>(ui_->keyGroupTab->currentWidget());
auto ret = std::make_unique<KeyIdArgsList>();