Messagelib

dkimviewermenu.cpp
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "dkimviewermenu.h"
8#include <KLocalizedString>
9#include <QMenu>
10
11using namespace MessageViewer;
12DKIMViewerMenu::DKIMViewerMenu(QObject *parent)
13 : QObject(parent)
14 , mMenu(new QMenu(i18n("DKIM")))
15{
16 initialize();
17}
18
19DKIMViewerMenu::~DKIMViewerMenu()
20{
21 delete mMenu;
22}
23
24QMenu *DKIMViewerMenu::menu() const
25{
26 return mMenu;
27}
28
29void DKIMViewerMenu::setEnableUpdateDkimKeyMenu(bool enabled)
30{
31 mUpdateDKIMKey->setEnabled(enabled);
32}
33
34void DKIMViewerMenu::initialize()
35{
36 QAction *checkSignature = mMenu->addAction(i18n("Recheck DKIM Signature"));
37 connect(checkSignature, &QAction::triggered, this, &DKIMViewerMenu::recheckSignature);
38
39 mUpdateDKIMKey = mMenu->addAction(i18n("Update DKIM key"));
40 connect(mUpdateDKIMKey, &QAction::triggered, this, &DKIMViewerMenu::updateDkimKey);
41
42 mMenu->addSeparator();
43 QAction *manageDKIMRuleDKIMKey = mMenu->addAction(i18n("Rules..."));
44 connect(manageDKIMRuleDKIMKey, &QAction::triggered, this, &DKIMViewerMenu::showDkimRules);
45}
46
47#include "moc_dkimviewermenu.cpp"
QString i18n(const char *text, const TYPE &arg...)
KCRASH_EXPORT void initialize()
void setEnabled(bool)
void triggered(bool checked)
QAction * addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut)
QAction * addSeparator()
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.