2 KNode, the KDE newsreader
3 Copyright (c) 1999-2005 the KNode authors.
4 See file AUTHORS for details
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 You should have received a copy of the GNU General Public License
11 along with this program; if not, write to the Free Software Foundation,
12 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
15 #ifndef KNDISPLAYEDHEADER_H
16 #define KNDISPLAYEDHEADER_H
19 #include <QStringList>
22 /** A header displayed in the article viewer. */
23 class KNDisplayedHeader
{
30 static QStringList
predefs();
33 const QString
& name() { return n_ame
; }
34 void setName(const QString
&s
) { n_ame
= s
; }
35 bool hasName() const { return !n_ame
.isEmpty(); }
38 QString
translatedName(); // *tries* to translate the name
39 void setTranslatedName(const QString
&s
); // *tries* to retranslate the name to english
40 void setTranslateName(bool b
) { t_ranslateName
=b
; }
41 bool translateName() const { return t_ranslateName
; }
44 const QString
& header() { return h_eader
; }
45 void setHeader(const QString
&s
) { h_eader
= s
; }
48 bool flag(int i
) { return f_lags
.at(i
); }
49 void setFlag(int i
, bool b
) { f_lags
.setBit(i
, b
); }
53 const QString
& nameOpenTag() { return t_ags
[0]; }
54 const QString
& nameCloseTag() { return t_ags
[1]; }
55 const QString
& headerOpenTag() { return t_ags
[2]; }
56 const QString
& headerCloseTag() { return t_ags
[3]; }
58 typedef QList
<KNDisplayedHeader
*> List
;
62 QString n_ame
, h_eader
, t_ags
[4];