Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34024027
useridlistmodel.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
useridlistmodel.h
View Options
/* -*- mode: c++; c-basic-offset:4 -*-
models/useridlistmodel.h
This file is part of Kleopatra, the KDE keymanager
SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB
SPDX-FileCopyrightText: 2016 Andre Heinecke <aheinecke@gnupg.org>
SPDX-FileCopyrightText: 2021 g10 Code GmbH
SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include
"kleo_export.h"
#include
<QAbstractItemModel>
#include
<gpgme++/key.h>
// since Signature is nested in UserID...
#include
<memory>
class
UIDModelItem
;
namespace
Kleo
{
class
KLEO_EXPORT
UserIDListModel
:
public
QAbstractItemModel
{
Q_OBJECT
public
:
enum
class
Column
{
Id
,
Name
,
Email
,
ValidFrom
,
ValidUntil
,
Status
,
Exportable
,
Tags
,
TrustSignatureDomain
,
};
explicit
UserIDListModel
(
QObject
*
parent
=
nullptr
);
~
UserIDListModel
()
override
;
GpgME
::
Key
key
()
const
;
public
:
GpgME
::
UserID
userID
(
const
QModelIndex
&
index
)
const
;
QList
<
GpgME
::
UserID
>
userIDs
(
const
QModelIndexList
&
indexes
)
const
;
GpgME
::
UserID
::
Signature
signature
(
const
QModelIndex
&
index
)
const
;
QList
<
GpgME
::
UserID
::
Signature
>
signatures
(
const
QModelIndexList
&
indexes
)
const
;
void
enableRemarks
(
bool
value
);
public
Q_SLOTS
:
void
setKey
(
const
GpgME
::
Key
&
key
);
public
:
int
columnCount
(
const
QModelIndex
&
pindex
=
QModelIndex
())
const
override
;
int
rowCount
(
const
QModelIndex
&
pindex
=
QModelIndex
())
const
override
;
QVariant
headerData
(
int
section
,
Qt
::
Orientation
o
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
QModelIndex
index
(
int
row
,
int
col
,
const
QModelIndex
&
parent
=
QModelIndex
())
const
override
;
QModelIndex
parent
(
const
QModelIndex
&
index
)
const
override
;
private
:
GpgME
::
Key
mKey
;
bool
mRemarksEnabled
=
false
;
std
::
unique_ptr
<
UIDModelItem
>
mRootItem
;
};
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 29, 7:01 AM (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9f/f3/4cdd4d9f8c3363a88971ca00bb93
Attached To
rLIBKLEO Libkleo
Event Timeline
Log In to Comment