• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • header
headerstrategy.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  headerstrategy.h
3 
4  This file is part of KMail, the KDE mail client.
5  Copyright (c) 2003 Marc Mutz <mutz@kde.org>
6 
7  KMail is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License, version 2, as
9  published by the Free Software Foundation.
10 
11  KMail is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the Qt library by Trolltech AS, Norway (or with modified versions
23  of Qt that use the same license as Qt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  Qt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 */
31 
32 #ifndef __MESSAGEVIEWER_HEADERSTRATEGY_H__
33 #define __MESSAGEVIEWER_HEADERSTRATEGY_H__
34 
35 #include "messageviewer_export.h"
36 
37 class QString;
38 class QStringList;
39 
40 namespace MessageViewer {
41 
42 class MESSAGEVIEWER_EXPORT HeaderStrategy
43 {
44 protected:
45  HeaderStrategy();
46  virtual ~HeaderStrategy();
47 
48 public:
49  //
50  // Factory methods:
51  //
52  enum Type { All,
53  Rich,
54  Standard,
55  Brief,
56  Custom,
57  Grantlee
58  };
59 
60  static HeaderStrategy *create( Type type );
61  static HeaderStrategy *create( const QString & type );
62 
63  static HeaderStrategy * all();
64  static HeaderStrategy * rich();
65  static HeaderStrategy * standard();
66  static HeaderStrategy * brief();
67  static HeaderStrategy * custom();
68  static HeaderStrategy * grantlee();
69 
70  //
71  // Methods for handling the strategies:
72  //
73  virtual const char * name() const = 0;
74 
75  void readConfig();
76  //
77  // HeaderStrategy interface:
78  //
79  enum DefaultPolicy { Display, Hide };
80 
81  virtual QStringList headersToDisplay() const;
82  virtual QStringList headersToHide() const;
83  virtual DefaultPolicy defaultPolicy() const = 0;
84  virtual bool showHeader( const QString & header ) const;
85 };
86 
87 }
88 
89 #endif // __MESSAGEVIEWER_HEADERSTRATEGY_H__
MessageViewer::HeaderStrategy
Definition: headerstrategy.h:42
MessageViewer::HeaderStrategy::Custom
Definition: headerstrategy.h:56
MessageViewer::HeaderStrategy::Type
Type
Definition: headerstrategy.h:52
MessageViewer::HeaderStrategy::Standard
Definition: headerstrategy.h:54
MessageViewer::HeaderStrategy::Rich
Definition: headerstrategy.h:53
MESSAGEVIEWER_EXPORT
#define MESSAGEVIEWER_EXPORT
Definition: messageviewer_export.h:37
all
static TypeRegistry * all
Definition: bodypartformatterfactory.cpp:87
type
const char * type
Definition: bodypartformatter.cpp:192
MessageViewer::HeaderStrategy::Brief
Definition: headerstrategy.h:55
MessageViewer::HeaderStrategy::DefaultPolicy
DefaultPolicy
Definition: headerstrategy.h:79
messageviewer_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal