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 {
40  Display,
41  Hide,
42  };
43 
44  Q_REQUIRED_RESULT virtual QStringList headersToDisplay() const;
45  Q_REQUIRED_RESULT virtual QStringList headersToHide() const;
46  Q_REQUIRED_RESULT virtual DefaultPolicy defaultPolicy() const = 0;
47  Q_REQUIRED_RESULT virtual bool showHeader(const QString &header) const;
48  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-2023 The KDE developers.
Generated on Sat Jan 28 2023 04:09:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.