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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
  • editor
composer.h
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2  This file is part of KMail, the KDE mail client.
3  Copyright (c) 1997 Markus Wuebben <markus.wuebben@kde.org>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __KMAIL_COMPOSER_H__
21 #define __KMAIL_COMPOSER_H__
22 
23 #include "secondarywindow.h"
24 
25 #include <kurl.h>
26 #include <kmime/kmime_message.h>
27 #include <akonadi/collection.h>
28 
29 #include <boost/shared_ptr.hpp>
30 
31 namespace KMime {
32 class Content;
33 }
34 
35 namespace KMail {
36 
37 class Composer : public KMail::SecondaryWindow
38 {
39  Q_OBJECT
40 protected:
41  Composer( const char *name=0 ) : KMail::SecondaryWindow( name ) {}
42 
43 public:
44  enum TemplateContext { New, Reply, ReplyToAll, Forward, NoTemplate };
45  enum VisibleHeaderFlag {
46  HDR_FROM = 0x01,
47  HDR_REPLY_TO = 0x02,
48  HDR_SUBJECT = 0x20,
49  HDR_NEWSGROUPS = 0x40,
50  HDR_FOLLOWUP_TO = 0x80,
51  HDR_IDENTITY = 0x100,
52  HDR_TRANSPORT = 0x200,
53  HDR_FCC = 0x400,
54  HDR_DICTIONARY = 0x800,
55  HDR_ALL = 0xfff
56  };
57  typedef QFlags<VisibleHeaderFlag> VisibleHeaderFlags;
58 
59 public: // mailserviceimpl
63  virtual void send( int how ) = 0;
64  virtual void addAttachmentsAndSend( const KUrl::List &urls,
65  const QString &comment, int how) = 0;
66  virtual void addAttachment( const KUrl &url, const QString &comment ) = 0;
67  virtual void addAttachment( const QString & name,
68  KMime::Headers::contentEncoding cte,
69  const QString& charset,
70  const QByteArray & data,
71  const QByteArray & mimeType ) = 0;
72 public: // kmcommand
73  virtual QString dbusObjectPath() const = 0;
74 public: // kmkernel, kmcommands, callback
79  virtual void setMessage( const KMime::Message::Ptr &newMsg, bool lastSignState = false, bool lastEncryptState = false, bool mayAutoSign=true,
80  bool allowDecryption=false, bool isModified=false ) = 0;
81  virtual void setCurrentTransport( int transportId ) = 0;
82 
83  virtual void setCurrentReplyTo(const QString& replyTo) = 0;
84 
85  virtual void setFcc( const QString &idString ) = 0;
89  virtual bool isComposing() const = 0;
90 
94  virtual void setTextSelection( const QString& selection ) = 0;
95 
99  virtual void setCustomTemplate( const QString& customTemplate ) = 0;
100 
101  virtual void setAutoSaveFileName( const QString &fileName ) = 0;
102  virtual void setCollectionForNewMessage( const Akonadi::Collection& folder ) = 0;
103 
104  virtual void addExtraCustomHeaders( const QMap<QByteArray, QString> &header) = 0;
105 
106 public: // kmcommand
111  virtual void setFolder( const Akonadi::Collection& ) = 0;
112 
118  virtual void setFocusToEditor() = 0;
119 
124  virtual void setFocusToSubject() = 0;
125 
126 public: // callback
128  virtual void setSigningAndEncryptionDisabled( bool v ) = 0;
129 
130 public slots: // kmkernel, callback
131  virtual void slotSendNow() = 0;
135  virtual void slotWordWrapToggled( bool ) = 0;
136  virtual void setModified( bool modified ) = 0;
137 public slots: // kmkernel
138  virtual void autoSaveMessage(bool force = false ) = 0;
139 
140 public: // kmkernel, attachmentlistview
141  virtual void disableWordWrap() = 0;
142 
143  virtual void forceDisableHtml() = 0;
144 
145  virtual void disableForgottenAttachmentsCheck() = 0;
146 
147  virtual void ignoreStickyFields() = 0;
148 
149 public: // kmcommand
153  virtual void addAttach( KMime::Content *msgPart ) = 0;
154 };
155 
156 Composer *makeComposer( const KMime::Message::Ptr &msg = KMime::Message::Ptr(), bool lastSignState = false, bool lastEncryptState = false,
157  Composer::TemplateContext context = Composer::NoTemplate,
158  uint identity = 0, const QString & textSelection = QString(),
159  const QString & customTemplate = QString() );
160 
161 }
162 
163 #endif // __KMAIL_COMPOSER_H__
KMail::Composer::setFocusToSubject
virtual void setFocusToSubject()=0
Sets the focus to the subject line edit.
KMail::Composer::autoSaveMessage
virtual void autoSaveMessage(bool force=false)=0
KMail::Composer::disableForgottenAttachmentsCheck
virtual void disableForgottenAttachmentsCheck()=0
KMail::Composer::addExtraCustomHeaders
virtual void addExtraCustomHeaders(const QMap< QByteArray, QString > &header)=0
KMail::Composer::HDR_ALL
Definition: composer.h:55
KMail::Composer::isComposing
virtual bool isComposing() const =0
Returns true while the message composing is in progress.
KMail::Composer::setAutoSaveFileName
virtual void setAutoSaveFileName(const QString &fileName)=0
KMail::Composer::NoTemplate
Definition: composer.h:44
KMail::Composer::HDR_REPLY_TO
Definition: composer.h:47
KMail::Composer::HDR_NEWSGROUPS
Definition: composer.h:49
KMail::Composer::ignoreStickyFields
virtual void ignoreStickyFields()=0
KMail::Composer::addAttachmentsAndSend
virtual void addAttachmentsAndSend(const KUrl::List &urls, const QString &comment, int how)=0
KMail::Composer::disableWordWrap
virtual void disableWordWrap()=0
KMail::Composer::setMessage
virtual void setMessage(const KMime::Message::Ptr &newMsg, bool lastSignState=false, bool lastEncryptState=false, bool mayAutoSign=true, bool allowDecryption=false, bool isModified=false)=0
Set the message the composer shall work with.
KMail::Composer::Forward
Definition: composer.h:44
KMail::Composer
Definition: composer.h:37
KMail::Composer::ReplyToAll
Definition: composer.h:44
KMail::Composer::setFcc
virtual void setFcc(const QString &idString)=0
KMail::Composer::addAttachment
virtual void addAttachment(const KUrl &url, const QString &comment)=0
KMail::Composer::VisibleHeaderFlags
QFlags< VisibleHeaderFlag > VisibleHeaderFlags
Definition: composer.h:57
KMail::Composer::HDR_DICTIONARY
Definition: composer.h:54
KMail::Composer::setCustomTemplate
virtual void setCustomTemplate(const QString &customTemplate)=0
Set custom template to be used for the message.
KMail::Composer::addAttach
virtual void addAttach(KMime::Content *msgPart)=0
Add an attachment to the list.
KMail::Composer::setFolder
virtual void setFolder(const Akonadi::Collection &)=0
If this folder is set, the original message is inserted back after canceling.
secondarywindow.h
KMail::SecondaryWindow
Window class for secondary KMail window like the composer window and the separate message window...
Definition: secondarywindow.h:44
KMail::Composer::HDR_FROM
Definition: composer.h:46
KMail::Composer::setModified
virtual void setModified(bool modified)=0
KMail::Composer::HDR_SUBJECT
Definition: composer.h:48
KMail::Composer::HDR_FCC
Definition: composer.h:53
KMail::Composer::setCurrentReplyTo
virtual void setCurrentReplyTo(const QString &replyTo)=0
KMail::Composer::setSigningAndEncryptionDisabled
virtual void setSigningAndEncryptionDisabled(bool v)=0
Disabled signing and encryption completely for this composer window.
KMail::Composer::Reply
Definition: composer.h:44
KMail::Composer::HDR_FOLLOWUP_TO
Definition: composer.h:50
KMail::Composer::HDR_IDENTITY
Definition: composer.h:51
KMail::Composer::dbusObjectPath
virtual QString dbusObjectPath() const =0
KMail::Composer::TemplateContext
TemplateContext
Definition: composer.h:44
KMail::Composer::setCurrentTransport
virtual void setCurrentTransport(int transportId)=0
KMail::Composer::send
virtual void send(int how)=0
From MailComposerIface.
KMail::Composer::setTextSelection
virtual void setTextSelection(const QString &selection)=0
Set the text selection the message is a response to.
KMail::Composer::setFocusToEditor
virtual void setFocusToEditor()=0
Sets the focus to the edit-widget and the cursor below the "On ... you wrote" line when hasMessage is...
KMail::Composer::Composer
Composer(const char *name=0)
Definition: composer.h:41
KMail::Composer::New
Definition: composer.h:44
KMail::Composer::forceDisableHtml
virtual void forceDisableHtml()=0
KMail::Composer::setCollectionForNewMessage
virtual void setCollectionForNewMessage(const Akonadi::Collection &folder)=0
KMail::Composer::slotWordWrapToggled
virtual void slotWordWrapToggled(bool)=0
Switch wordWrap on/off.
QMap< QByteArray, QString >
KMail::Composer::slotSendNow
virtual void slotSendNow()=0
KMail::Composer::HDR_TRANSPORT
Definition: composer.h:52
KMail::Composer::VisibleHeaderFlag
VisibleHeaderFlag
Definition: composer.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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