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
34protected:
35 [[nodiscard]] bool event(QEvent *e) override;
36
37private:
38 MESSAGEVIEWER_NO_EXPORT void updateInfo();
39 MESSAGEVIEWER_NO_EXPORT void updateToolTip();
40 MESSAGEVIEWER_NO_EXPORT void initColors();
41 MESSAGEVIEWER_NO_EXPORT void updatePalette();
42 MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult mResult;
43 QLabel *const mLabel;
44 QColor mWarningColor;
45 QColor mErrorColor;
46 QColor mOkColor;
47 QColor mDefaultColor;
48 Akonadi::Item::Id mCurrentItemId = -1;
49};
50}
The DKIMWidgetInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:37:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.