File indexing completed on 2025-01-05 04:55:46

0001 /*
0002     SPDX-FileCopyrightText: 2024 g10 Code GmbH
0003     SPDX-FileContributor: Tobias Fella <tobias.fella@gnupg.com>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "kleo_export.h"
0010 #include <Libkleo/KeyListSortFilterProxyModel>
0011 
0012 namespace Kleo
0013 {
0014 
0015 class KLEO_EXPORT UserIDProxyModel : public Kleo::AbstractKeyListSortFilterProxyModel
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit UserIDProxyModel(QObject *parent = nullptr);
0021     ~UserIDProxyModel() override;
0022 
0023     QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override;
0024     QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
0025     int rowCount(const QModelIndex &parent = {}) const override;
0026     QModelIndex index(int row, int column, const QModelIndex &parent) const override;
0027     virtual QModelIndex parent(const QModelIndex &) const override;
0028     int columnCount(const QModelIndex &) const override;
0029     QVariant data(const QModelIndex &index, int role) const override;
0030     UserIDProxyModel *clone() const override;
0031     QModelIndex index(const KeyGroup &) const override;
0032     QModelIndex index(const GpgME::Key &key) const override;
0033 
0034 private:
0035     class Private;
0036     const std::unique_ptr<Private> d;
0037 };
0038 }