Messagelib

dkimwidgetinfo.h
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "dkimchecksignaturejob.h"
10#include "messageviewer_export.h"
11#include <Akonadi/Item>
12#include <QWidget>
13class QLabel;
14namespace MessageViewer
15{
16/**
17 * @brief The DKIMWidgetInfo class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class MESSAGEVIEWER_EXPORT DKIMWidgetInfo : public QWidget
21{
22 Q_OBJECT
23public:
24 explicit DKIMWidgetInfo(QWidget *parent = nullptr);
25 ~DKIMWidgetInfo() override;
26 void setResult(const MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult &checkResult, Akonadi::Item::Id id);
27 void clear();
28
29 [[nodiscard]] Akonadi::Item::Id currentItemId() const;
30 void setCurrentItemId(Akonadi::Item::Id currentItemId);
31
32 [[nodiscard]] MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult result() const;
33 void updatePalette();
34
35private:
36 MESSAGEVIEWER_NO_EXPORT void updateInfo();
37 MESSAGEVIEWER_NO_EXPORT void updateToolTip();
38 MESSAGEVIEWER_NO_EXPORT void initColors();
39 MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult mResult;
40 QLabel *const mLabel;
41 QColor mWarningColor;
42 QColor mErrorColor;
43 QColor mOkColor;
44 QColor mDefaultColor;
45 Akonadi::Item::Id mCurrentItemId = -1;
46};
47}
The DKIMWidgetInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.