• 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
  • widgets
htmlstatusbar.h
Go to the documentation of this file.
1 /* -*- c++ -*-
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 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
30  your version.
31 */
32 #ifndef _MESSAGEVIEWER_HTMLSTATUSBAR_H_
33 #define _MESSAGEVIEWER_HTMLSTATUSBAR_H_
34 
35 #include "utils/util.h"
36 #include <QLabel>
37 class QMouseEvent;
38 
39 namespace MessageViewer {
40 
62 class HtmlStatusBar : public QLabel {
63  Q_OBJECT
64 public:
65  enum UpdateMode {
66  NoUpdate,
67  Update
68  };
69 
70  explicit HtmlStatusBar( QWidget * parent=0 );
71  ~HtmlStatusBar();
72 
74  Util::HtmlMode mode() const { return mMode ; }
75  bool isHtml() const { return mode() == Util::Html; }
76  bool isNormal() const { return mode() == Util::Normal; }
77  bool isMultipartHtml() const { return mode() == Util::MultipartHtml; }
78  bool isMultipartPlain() const { return mode() == Util::MultipartPlain; }
79 
80  // Update the status bar, for example when the color scheme changed.
81  void update();
82 
83 public slots:
84  void setHtmlMode();
86  void setNormalMode();
88  void setMultipartHtmlMode();
90  void setMultipartPlainMode();
92  void setMode( Util::HtmlMode m, UpdateMode mode = Update );
93 
94 signals:
96  void clicked();
97 
98 protected:
99  void mousePressEvent( QMouseEvent * event );
100 
101 private:
102  QString message() const;
103  QString toolTip() const;
104  QColor bgColor() const;
105  QColor fgColor() const;
106 
107  Util::HtmlMode mMode;
108 };
109 
110 }
111 
112 #endif // _KMAIL_HTMLSTATUSBAR_H_
MessageViewer::HtmlStatusBar::isNormal
bool isNormal() const
Definition: htmlstatusbar.h:76
MessageViewer::HtmlStatusBar::Update
Definition: htmlstatusbar.h:67
MessageViewer::HtmlStatusBar::HtmlStatusBar
HtmlStatusBar(QWidget *parent=0)
Definition: htmlstatusbar.cpp:46
MessageViewer::Util::HtmlMode
HtmlMode
Describes the type of the displayed message.
Definition: util.h:73
MessageViewer::Util::MultipartPlain
A multipart/alternative message, the plain text part is currently displayed.
Definition: util.h:76
MessageViewer::HtmlStatusBar::setMode
void setMode(Util::HtmlMode m, UpdateMode mode=Update)
Switch to mode m.
Definition: htmlstatusbar.cpp:87
MessageViewer::HtmlStatusBar::setNormalMode
void setNormalMode()
Switch to "normal mode".
Definition: htmlstatusbar.cpp:67
QWidget
MessageViewer::HtmlStatusBar::update
void update()
Definition: htmlstatusbar.cpp:57
MessageViewer::HtmlStatusBar::isMultipartPlain
bool isMultipartPlain() const
Definition: htmlstatusbar.h:78
MessageViewer::HtmlStatusBar::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition: htmlstatusbar.cpp:94
MessageViewer::HtmlStatusBar::setMultipartHtmlMode
void setMultipartHtmlMode()
Switch to "multipart html mode".
Definition: htmlstatusbar.cpp:82
MessageViewer::Util::Normal
A normal plaintext message, non-multipart.
Definition: util.h:74
util.h
MessageViewer::Util::Html
A HTML message, non-multipart.
Definition: util.h:75
MessageViewer::HtmlStatusBar::NoUpdate
Definition: htmlstatusbar.h:66
MessageViewer::HtmlStatusBar
The HTML statusbar widget for use with the reader.
Definition: htmlstatusbar.h:62
MessageViewer::HtmlStatusBar::clicked
void clicked()
The user has clicked the status bar.
QLabel
MessageViewer::HtmlStatusBar::mode
Util::HtmlMode mode() const
Definition: htmlstatusbar.h:74
MessageViewer::HtmlStatusBar::UpdateMode
UpdateMode
Definition: htmlstatusbar.h:65
MessageViewer::HtmlStatusBar::setMultipartPlainMode
void setMultipartPlainMode()
Switch to "multipart plain mode".
Definition: htmlstatusbar.cpp:77
MessageViewer::HtmlStatusBar::setHtmlMode
void setHtmlMode()
Definition: htmlstatusbar.cpp:72
MessageViewer::HtmlStatusBar::~HtmlStatusBar
~HtmlStatusBar()
Definition: htmlstatusbar.cpp:55
MessageViewer::HtmlStatusBar::isHtml
bool isHtml() const
Definition: htmlstatusbar.h:75
MessageViewer::Util::MultipartHtml
A multipart/altervative message, the HTML part is currently displayed.
Definition: util.h:77
MessageViewer::HtmlStatusBar::isMultipartHtml
bool isMultipartHtml() const
Definition: htmlstatusbar.h:77
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