Messagelib

headerstrategy.h
1/* -*- c++ -*-
2 headerstrategy.h
3
4 This file is part of KMail, the KDE mail client.
5 SPDX-FileCopyrightText: 2003 Marc Mutz <mutz@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "messageviewer_export.h"
13#include <QStringList>
14
15namespace MessageViewer
16{
17//
18// Convenience function
19//
20/**
21 * @brief The HeaderStrategy class
22 */
23class MESSAGEVIEWER_EXPORT HeaderStrategy
24{
25protected:
27
28public:
29 virtual ~HeaderStrategy();
30 //
31 // Methods for handling the strategies:
32 //
33 virtual const char *name() const = 0;
34
35 void readConfig();
36 //
37 // HeaderStrategy interface:
38 //
39 enum DefaultPolicy {
40 Display,
41 Hide,
42 };
43
44 [[nodiscard]] virtual QStringList headersToDisplay() const;
45 [[nodiscard]] virtual QStringList headersToHide() const;
46 [[nodiscard]] virtual DefaultPolicy defaultPolicy() const = 0;
47 [[nodiscard]] virtual bool showHeader(const QString &header) const;
48 [[nodiscard]] static QStringList stringList(const char *const headers[], int numHeaders);
49};
50}
The HeaderStrategy class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.