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

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • viewer
mailsourceviewer.h
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2  *
3  * This file is part of KMail, the KDE mail client.
4  *
5  * Copyright (c) 2002-2003 Carsten Pfeiffer <pfeiffer@kde.org>
6  * Copyright (c) 2003 Zack Rusin <zack@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 MAILSOURCEVIEWER_H
33 #define MAILSOURCEVIEWER_H
34 
35 #include <QSyntaxHighlighter>
36 #include <QPlainTextEdit>
37 #include <KDialog>
38 class KTabWidget;
39 namespace PimCommon
40 {
41 class SlideContainer;
42 }
43 namespace MessageViewer {
44 class FindBarSourceView;
45 
54 class MailSourceViewTextBrowser;
55 class MailSourceHighlighter : public QSyntaxHighlighter
56 {
57 public:
58  explicit MailSourceHighlighter( QTextDocument * textdocument )
59  : QSyntaxHighlighter( textdocument )
60  {}
61 protected:
62  void highlightBlock ( const QString & text );
63 };
64 
65 class MailSourceViewTextBrowserWidget : public QWidget
66 {
67  Q_OBJECT
68 public:
69  explicit MailSourceViewTextBrowserWidget( QWidget *parent = 0 );
70 
71  void setText( const QString& text );
72  void setPlainText( const QString& text );
73  void setFixedFont();
74  MessageViewer::MailSourceViewTextBrowser *textBrowser() const;
75 private slots:
76  void slotFind();
77 private:
78  MailSourceViewTextBrowser *mTextBrowser;
79  FindBarSourceView *mFindBar;
80  PimCommon::SlideContainer *mSliderContainer;
81 };
82 
83 class MailSourceViewTextBrowser: public QPlainTextEdit
84 {
85  Q_OBJECT
86 public:
87  explicit MailSourceViewTextBrowser( QWidget *parent = 0 );
88 protected:
89  void contextMenuEvent( QContextMenuEvent *event );
90 private slots:
91  void slotSpeakText();
92  void slotSaveAs();
93 signals:
94  void findText();
95 };
96 
97 class MailSourceViewer : public KDialog
98 {
99  Q_OBJECT
100 public:
101  explicit MailSourceViewer( QWidget *parent = 0 );
102  ~MailSourceViewer();
103 
104  void setRawSource( const QString &source );
105  void setDisplayedSource( const QString &source );
106  void setFixedFont();
107 private:
108  QString reformat(const QString &src);
109  MailSourceViewTextBrowserWidget *mRawBrowser;
110  FindBarSourceView *mFindBar;
111 #ifndef NDEBUG
112  KTabWidget *mTabWidget;
113  MailSourceViewTextBrowserWidget *mHtmlBrowser;
114 #endif
115 };
116 
117 }
118 #endif // MAILSOURCEVIEWER_H
QWidget
MessageViewer::MailSourceViewTextBrowser::MailSourceViewTextBrowser
MailSourceViewTextBrowser(QWidget *parent=0)
Definition: mailsourceviewer.cpp:113
MessageViewer::MailSourceViewTextBrowser
Definition: mailsourceviewer.h:83
MessageViewer::MailSourceViewer::MailSourceViewer
MailSourceViewer(QWidget *parent=0)
Definition: mailsourceviewer.cpp:187
QPlainTextEdit
KDialog
QSyntaxHighlighter
MessageViewer::FindBarSourceView
Definition: findbarsourceview.h:29
MessageViewer::MailSourceViewTextBrowser::findText
void findText()
MessageViewer::MailSourceViewTextBrowserWidget::setFixedFont
void setFixedFont()
Definition: mailsourceviewer.cpp:103
MessageViewer::MailSourceViewTextBrowserWidget::setPlainText
void setPlainText(const QString &text)
Definition: mailsourceviewer.cpp:98
MessageViewer::MailSourceHighlighter::highlightBlock
void highlightBlock(const QString &text)
Definition: mailsourceviewer.cpp:155
MessageViewer::MailSourceViewTextBrowserWidget::textBrowser
MessageViewer::MailSourceViewTextBrowser * textBrowser() const
Definition: mailsourceviewer.cpp:108
QContextMenuEvent
MessageViewer::MailSourceViewTextBrowserWidget::setText
void setText(const QString &text)
Definition: mailsourceviewer.cpp:93
MessageViewer::MailSourceHighlighter
Definition: mailsourceviewer.h:55
MessageViewer::MailSourceViewTextBrowserWidget
Definition: mailsourceviewer.h:65
QString
MessageViewer::MailSourceViewer::setRawSource
void setRawSource(const QString &source)
Definition: mailsourceviewer.cpp:237
QAbstractScrollArea::event
virtual bool event(QEvent *event)
MessageViewer::MailSourceViewer
Definition: mailsourceviewer.h:97
QTextDocument
MessageViewer::MailSourceHighlighter::MailSourceHighlighter
MailSourceHighlighter(QTextDocument *textdocument)
Definition: mailsourceviewer.h:58
MessageViewer::MailSourceViewer::~MailSourceViewer
~MailSourceViewer()
Definition: mailsourceviewer.cpp:233
MessageViewer::MailSourceViewTextBrowserWidget::MailSourceViewTextBrowserWidget
MailSourceViewTextBrowserWidget(QWidget *parent=0)
Definition: mailsourceviewer.cpp:62
MessageViewer::MailSourceViewTextBrowser::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event)
Definition: mailsourceviewer.cpp:118
QObject::parent
QObject * parent() const
MessageViewer::MailSourceViewer::setDisplayedSource
void setDisplayedSource(const QString &source)
Definition: mailsourceviewer.cpp:242
MessageViewer::MailSourceViewer::setFixedFont
void setFixedFont()
Definition: mailsourceviewer.cpp:251
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 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
  • pimprint

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