Messagelib

dkimwidgetinfo.h
1 /*
2  SPDX-FileCopyrightText: 2019-2021 Laurent Montel <[email protected]>
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>
13 class QLabel;
14 namespace MessageViewer
15 {
16 /**
17  * @brief The DKIMWidgetInfo class
18  * @author Laurent Montel <[email protected]>
19  */
20 class MESSAGEVIEWER_EXPORT DKIMWidgetInfo : public QWidget
21 {
22  Q_OBJECT
23 public:
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  Q_REQUIRED_RESULT Akonadi::Item::Id currentItemId() const;
30  void setCurrentItemId(Akonadi::Item::Id currentItemId);
31 
32  Q_REQUIRED_RESULT MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult result() const;
33 
34 private:
35  void updateInfo();
36  void updateToolTip();
37  void initColors();
38  MessageViewer::DKIMCheckSignatureJob::CheckSignatureResult mResult;
39  QLabel *const mLabel;
40  QColor mWarningColor;
41  QColor mErrorColor;
42  QColor mOkColor;
43  QColor mDefaultColor;
44  Akonadi::Item::Id mCurrentItemId = -1;
45 };
46 }
47 
The DKIMWidgetInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.