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 
14 #include "kleo_export.h"
15 
16 #include <KRearrangeColumnsProxyModel>
17 
18 namespace Kleo
19 {
20 /** KRearrangeColumnsProxymodel that implements the KeyListModelInterface. */
22  public KeyListModelInterface
23 {
24 public:
25  explicit KeyRearrangeColumnsProxyModel(QObject *parent = nullptr);
26 
27  GpgME::Key key(const QModelIndex &idx) const override;
28  std::vector<GpgME::Key> keys(const QList<QModelIndex> &idxs) const override;
29 
30  KeyGroup group(const QModelIndex &idx) const override;
31 
33 
34  QModelIndex index(const GpgME::Key &key) const override;
35  QList<QModelIndex> indexes(const std::vector<GpgME::Key> &keys) const override;
36 
37  QModelIndex index(const KeyGroup &group) const override;
38 
39  void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
40 private:
41  KeyListModelInterface *klm() const;
42 };
43 } // namespace Kleo
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
KRearrangeColumnsProxymodel that implements the KeyListModelInterface.
SortOrder
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Nov 28 2021 23:09:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.