Libkleo

keylistmodelinterface.h
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  models/keylistmodelinterface.h
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB
6  SPDX-FileCopyrightText: 2021 g10 Code GmbH
7  SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
8 
9  SPDX-License-Identifier: GPL-2.0-or-later
10 */
11 
12 #pragma once
13 
14 #include "kleo_export.h"
15 
16 #include <vector>
17 
18 namespace GpgME
19 {
20 class Key;
21 }
22 
23 class QModelIndex;
24 template<typename T>
25 class QList;
26 
27 namespace Kleo
28 {
29 class KeyGroup;
30 
31 class KLEO_EXPORT KeyListModelInterface
32 {
33 public:
34  virtual ~KeyListModelInterface();
35 
36  virtual GpgME::Key key(const QModelIndex &idx) const = 0;
37  virtual std::vector<GpgME::Key> keys(const QList<QModelIndex> &idxs) const = 0;
38 
39  virtual QModelIndex index(const GpgME::Key &key) const = 0;
40  virtual QList<QModelIndex> indexes(const std::vector<GpgME::Key> &keys) const = 0;
41 
42  virtual KeyGroup group(const QModelIndex &idx) const = 0;
43  virtual QModelIndex index(const KeyGroup &group) const = 0;
44 };
45 
46 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:56:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.