Libkleo

keyrearrangecolumnsproxymodel.h
1 /* models/keyrearangecolumnsproxymodel.h
2 
3  This file is part of Kleopatra, the KDE keymanager
4  SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik
5  SPDX-FileContributor: Intevation GmbH
6 
7  SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 
10 #pragma once
11 
12 #include "keylistmodelinterface.h"
13 #include "kleo_export.h"
14 
15 #include <KRearrangeColumnsProxyModel>
16 
17 namespace Kleo
18 {
19 /** KRearrangeColumnsProxymodel that implements the KeyListModelInterface. */
20 class KLEO_EXPORT KeyRearrangeColumnsProxyModel : public KRearrangeColumnsProxyModel, public KeyListModelInterface
21 {
22 public:
23  explicit KeyRearrangeColumnsProxyModel(QObject *parent = nullptr);
24 
25  GpgME::Key key(const QModelIndex &idx) const override;
26  std::vector<GpgME::Key> keys(const QList<QModelIndex> &idxs) const override;
27 
28  KeyGroup group(const QModelIndex &idx) const override;
29 
31 
32  QModelIndex index(const GpgME::Key &key) const override;
33  QList<QModelIndex> indexes(const std::vector<GpgME::Key> &keys) const override;
34 
35  QModelIndex index(const KeyGroup &group) const override;
36 
37  void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
38 
39 private:
40  KeyListModelInterface *klm() const;
41 };
42 } // namespace Kleo
KRearrangeColumnsProxymodel that implements the KeyListModelInterface.
SortOrder
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
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.