kmail

htmlstatusbar.h
1 /*
2  htmlstatusbar.h
3 
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>
7 
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.
11 
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.
16 
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
20 
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 TQt library by Trolltech AS, Norway (or with modified versions
24  of TQt that use the same license as TQt), 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  TQt. 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
30  your version.
31 */
32 #ifndef _KMAIL_HTMLSTATUSBAR_H_
33 #define _KMAIL_HTMLSTATUSBAR_H_
34 
35 #include <tqlabel.h>
36 
37 class TQString;
38 class TQColor;
39 
40 namespace KMail {
41 
61  class HtmlStatusBar : public TQLabel {
62  TQ_OBJECT
63 
64  public:
65  HtmlStatusBar( TQWidget * parent=0, const char * name=0, WFlags f=0 );
66  virtual ~HtmlStatusBar();
67 
68  enum Mode {
69  Normal,
70  Html,
71  Neutral
72  };
73 
75  Mode mode() const { return mMode ; }
76  bool isHtml() const { return mode() == Html ; }
77  bool isNormal() const { return mode() == Normal ; }
78  bool isNeutral() const { return mode() == Neutral ; }
79 
80  public slots:
82  void setHtmlMode();
84  void setNormalMode();
86  void setNeutralMode();
88  void setMode( Mode m );
89 
90  private:
91  void upd();
92  TQString message() const;
93  TQColor bgColor() const;
94  TQColor fgColor() const;
95 
96  Mode mMode;
97  };
98 
99 } // namespace KMail
100 
101 #endif // _KMAIL_HTMLSTATUSBAR_H_
The HTML statusbar widget for use with the reader.
Definition: htmlstatusbar.h:61
void setNeutralMode()
Switch to "neutral" mode (currently == normal mode).
void setHtmlMode()
Switch to "html mode".
void setNormalMode()
Switch to "normal mode".
void setMode(Mode m)
Switch to mode m.
folderdiaquotatab.h
Definition: aboutdata.cpp:40