4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2002 Ingo Kloecker <kloecker@kde.org>
6 Copyright (c) 2003 Marc Mutz <mutz@kde.org>
8 KMail is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License, version 2, as
10 published by the Free Software Foundation.
12 KMail is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 In addition, as a special exception, the copyright holders give
22 permission to link the code of this program with any edition of
23 the Qt library by Trolltech AS, Norway (or with modified versions
24 of Qt that use the same license as Qt), and distribute linked
25 combinations including the two. You must obey the GNU General
26 Public License in all respects for all of the code used other than
27 Qt. If you modify this file, you may extend this exception to
28 your version of the file, but you are not obligated to do so. If
29 you do not wish to do so, delete this exception statement from
32 #ifndef _KMAIL_HTMLSTATUSBAR_H_
33 #define _KMAIL_HTMLSTATUSBAR_H_
43 * @short The HTML statusbar widget for use with the reader.
45 * The HTML status bar is a small widget that acts as an indicator
46 * for the message content. It can be in one of two modes:
49 * <dt><code>Normal</code></dt>
50 * <dd>Default. No HTML.</dd>
51 * <dt><code>Neutral</code></dt>
52 * <dd>Temporary value. Used while the real mode is undetermined.</dd>
53 * <dt><code>Html</code></dt>
54 * <dd>HTML content is being shown. Since HTML mails can mimic all sorts
55 * of KMail markup in the reader, this provides out-of-band information
56 * about the presence of (rendered) HTML.</dd>
59 * @author Ingo Kloecker <kloecker@kde.org>, Marc Mutz <mutz@kde.org>
61 class HtmlStatusBar
: public QLabel
{
64 explicit HtmlStatusBar( QWidget
* parent
=0, const char * name
=0, Qt::WFlags f
=0 );
65 virtual ~HtmlStatusBar();
73 /** @return current mode. */
74 Mode
mode() const { return mMode
; }
75 bool isHtml() const { return mode() == Html
; }
76 bool isNormal() const { return mode() == Normal
; }
77 bool isNeutral() const { return mode() == Neutral
; }
79 // Update the status bar, for example when the color scheme changed.
83 /** Switch to "html mode". */
85 /** Switch to "normal mode". */
87 /** Switch to "neutral" mode (currently == normal mode). */
88 void setNeutralMode();
89 /** Switch to mode @p m */
90 void setMode( Mode m
);
93 QString
message() const;
94 QColor
bgColor() const;
95 QColor
fgColor() const;
102 #endif // _KMAIL_HTMLSTATUSBAR_H_