File indexing completed on 2024-10-27 04:51:11
0001 /* 0002 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "kmail_private_export.h" 0010 #include <KActionMenu> 0011 #include <MessageViewer/Viewer> 0012 0013 class KMAILTESTS_TESTS_EXPORT DisplayMessageFormatActionMenu : public KActionMenu 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit DisplayMessageFormatActionMenu(QObject *parent = nullptr); 0018 ~DisplayMessageFormatActionMenu() override; 0019 0020 [[nodiscard]] MessageViewer::Viewer::DisplayFormatMessage displayMessageFormat() const; 0021 void setDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage displayMessageFormat); 0022 0023 Q_SIGNALS: 0024 void changeDisplayMessageFormat(MessageViewer::Viewer::DisplayFormatMessage format); 0025 0026 private: 0027 void slotChangeDisplayMessageFormat(QAction *act); 0028 void updateMenu(); 0029 MessageViewer::Viewer::DisplayFormatMessage mDisplayMessageFormat = MessageViewer::Viewer::UseGlobalSetting; 0030 };