KIdentityManagementQuick::CryptographyEditorBackend Class
class KIdentityManagementQuick::CryptographyEditorBackendThe CryptographyEditorBackend class. More...
| Header: | #include <KIdentityManagementQuick/CryptographyEditorBackend> |
| CMake: | find_package(KPim6IdentityManagementQuick REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::IdentityManagementQuick) |
| Inherits: | QObject |
Properties
- identity : KIdentityManagementCore::Identity
- openPgpKeyListModel : QAbstractItemModel*
- smimeKeyListModel : QAbstractItemModel*
Public Functions
| CryptographyEditorBackend(QObject *parent = nullptr, const KIdentityManagementQuick::CryptographyBackendInterfacePtr &backend = {}) | |
| KIdentityManagementQuick::CryptographyBackendInterfacePtr | cryptographyBackend() const |
| KIdentityManagementCore::Identity | identity() const |
| QModelIndex | indexForIdentity(QAbstractItemModel *model, const KIdentityManagementCore::Identity &identity, const KIdentityManagementQuick::KeyUseTypes::KeyUse keyUse) |
| QAbstractItemModel * | openPgpKeyListModel() const |
| void | setCryptographyBackend(const KIdentityManagementQuick::CryptographyBackendInterfacePtr &cryptographyBackend) |
| void | setIdentity(const KIdentityManagementCore::Identity &identity) |
| QAbstractItemModel * | smimeKeyListModel() const |
Signals
| void | cryptographyBackendChanged() |
| void | identityChanged() |
| void | openPgpKeyListModelChanged() |
| void | smimeKeyListModelChanged() |
Static Public Members
| QString | stringFromKeyByteArray(const QByteArray &key) |
Detailed Description
Used by the QML interface to access cryptography-related data. Note that since the CryptographyBackendInterface is an abstract class, it is not accessible from QML. You will need to instantiate it in C++ and then feed it into the QML side of the editor with a valid backend already set!
Property Documentation
identity : KIdentityManagementCore::Identity
This property holds the edited identity.
Access functions:
| KIdentityManagementCore::Identity | identity() const |
| void | setIdentity(const KIdentityManagementCore::Identity &identity) |
Notifier signal:
| void | identityChanged() |
[read-only] openPgpKeyListModel : QAbstractItemModel*
This property holds the model listing the OpenPGP keys.
Access functions:
| QAbstractItemModel * | openPgpKeyListModel() const |
Notifier signal:
| void | openPgpKeyListModelChanged() |
[read-only] smimeKeyListModel : QAbstractItemModel*
This property holds the model listing the S/MIME keys.
Access functions:
| QAbstractItemModel * | smimeKeyListModel() const |
Notifier signal:
| void | smimeKeyListModelChanged() |
Member Function Documentation
[explicit] CryptographyEditorBackend::CryptographyEditorBackend(QObject *parent = nullptr, const KIdentityManagementQuick::CryptographyBackendInterfacePtr &backend = {})
Constructs a cryptography editor backend with the given parent, using backend to access the keys.
KIdentityManagementQuick::CryptographyBackendInterfacePtr CryptographyEditorBackend::cryptographyBackend() const
Returns the cryptography backend.
See also setCryptographyBackend().
[signal] void CryptographyEditorBackend::cryptographyBackendChanged()
Emitted when the cryptography backend changes.
KIdentityManagementCore::Identity CryptographyEditorBackend::identity() const
Returns the edited identity.
Note: Getter function for property identity.
See also setIdentity().
[signal] void CryptographyEditorBackend::identityChanged()
Emitted when the edited identity changes.
Note: Notifier signal for property identity.
[invokable] QModelIndex CryptographyEditorBackend::indexForIdentity(QAbstractItemModel *model, const KIdentityManagementCore::Identity &identity, const KIdentityManagementQuick::KeyUseTypes::KeyUse keyUse)
Returns the index in model of the key used by identity for keyUse. model must implement KeyListModelInterface.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QAbstractItemModel *CryptographyEditorBackend::openPgpKeyListModel() const
Returns the model listing the OpenPGP keys.
Note: Getter function for property openPgpKeyListModel.
[signal] void CryptographyEditorBackend::openPgpKeyListModelChanged()
Emitted when the OpenPGP key list model changes.
Note: Notifier signal for property openPgpKeyListModel.
void CryptographyEditorBackend::setCryptographyBackend(const KIdentityManagementQuick::CryptographyBackendInterfacePtr &cryptographyBackend)
Sets the cryptography backend to cryptographyBackend.
See also cryptographyBackend().
void CryptographyEditorBackend::setIdentity(const KIdentityManagementCore::Identity &identity)
Sets the edited identity to identity.
Note: Setter function for property identity.
See also identity().
QAbstractItemModel *CryptographyEditorBackend::smimeKeyListModel() const
Returns the model listing the S/MIME keys.
Note: Getter function for property smimeKeyListModel.
[signal] void CryptographyEditorBackend::smimeKeyListModelChanged()
Emitted when the S/MIME key list model changes.
Note: Notifier signal for property smimeKeyListModel.
[static invokable] QString CryptographyEditorBackend::stringFromKeyByteArray(const QByteArray &key)
Returns key converted to a string.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.