File indexing completed on 2024-06-23 05:14:03
0001 /* 0002 dialogs/editgroupdialog.h 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2021 g10 Code GmbH 0006 SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include <QDialog> 0014 0015 #include <memory> 0016 #include <vector> 0017 0018 namespace GpgME 0019 { 0020 class Key; 0021 } 0022 0023 namespace Kleo 0024 { 0025 namespace Dialogs 0026 { 0027 0028 class EditGroupDialog : public QDialog 0029 { 0030 Q_OBJECT 0031 public: 0032 enum FocusWidget { 0033 GroupName, 0034 KeysFilter, 0035 }; 0036 0037 explicit EditGroupDialog(QWidget *parent = nullptr); 0038 ~EditGroupDialog() override; 0039 0040 void setInitialFocus(FocusWidget widget); 0041 0042 void setGroupName(const QString &name); 0043 QString groupName() const; 0044 0045 void setGroupKeys(const std::vector<GpgME::Key> &keys); 0046 std::vector<GpgME::Key> groupKeys() const; 0047 0048 protected: 0049 void showEvent(QShowEvent *event) override; 0050 0051 private: 0052 class Private; 0053 const std::unique_ptr<Private> d; 0054 }; 0055 0056 } 0057 }