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 <[email protected]>
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 
15 namespace MessageViewer
16 {
17 //
18 // Convenience function
19 //
20 /**
21  * @brief The HeaderStrategy class
22  */
23 class MESSAGEVIEWER_EXPORT HeaderStrategy
24 {
25 protected:
27 
28 public:
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 { Display, Hide };
40 
41  Q_REQUIRED_RESULT virtual QStringList headersToDisplay() const;
42  Q_REQUIRED_RESULT virtual QStringList headersToHide() const;
43  Q_REQUIRED_RESULT virtual DefaultPolicy defaultPolicy() const = 0;
44  Q_REQUIRED_RESULT virtual bool showHeader(const QString &header) const;
45  static QStringList stringList(const char *const headers[], int numHeaders);
46 };
47 }
48 
The HeaderStrategy class.
const QLatin1String name
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.