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

kmail

  • sources
  • kde-4.14
  • kdepim
  • kmail
kmreaderwin.cpp
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  Copyright (c) 2009-2015 Laurent Montel <montel@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc.,
18  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 // define this to copy all html that is written to the readerwindow to
22 // filehtmlwriter.out in the current working directory
23 #include "kmreaderwin.h"
24 
25 #include "settings/globalsettings.h"
26 #include "kmmainwidget.h"
27 #include "kmreadermainwin.h"
28 #include "kernel/mailkernel.h"
29 #include "dialog/addemailtoexistingcontactdialog.h"
30 #include "job/addemailtoexistingcontactjob.h"
31 
32 #include "kdepim-version.h"
33 #include <kpimutils/email.h>
34 #include <libkdepim/job/addemailaddressjob.h>
35 #include <libkdepim/job/openemailaddressjob.h>
36 #include <libkdepim/job/addemaildisplayjob.h>
37 #include <libkdepim/misc/broadcaststatus.h>
38 #include "kmcommands.h"
39 #include "mailcommon/mdn/sendmdnhandler.h"
40 #include <QVBoxLayout>
41 #include "messageviewer/header/headerstrategy.h"
42 #include "messageviewer/header/headerstyle.h"
43 #include "messageviewer/viewer/mailwebview.h"
44 #include "messageviewer/utils/markmessagereadhandler.h"
45 #include "messageviewer/settings/globalsettings.h"
46 #include "messageviewer/viewer/csshelper.h"
47 using MessageViewer::CSSHelper;
48 #include "util.h"
49 #include "utils/stringutil.h"
50 
51 #include <kmime/kmime_mdn.h>
52 #include <akonadi/kmime/messageflags.h>
53 
54 #include "messageviewer/viewer/viewer.h"
55 using namespace MessageViewer;
56 #include <messagecore/settings/globalsettings.h>
57 
58 #include "messageviewer/viewer/attachmentstrategy.h"
59 #include "messagecomposer/sender/messagesender.h"
60 #include "messagecomposer/helper/messagefactory.h"
61 #include "messagecomposer/composer/composer.h"
62 #include "messagecomposer/part/textpart.h"
63 #include "messagecomposer/part/infopart.h"
64 
65 #include <KIO/JobUiDelegate>
66 using MessageComposer::MessageFactory;
67 
68 #include "messagecore/helpers/messagehelpers.h"
69 
70 #include <Akonadi/Contact/ContactEditorDialog>
71 
72 #include <kde_file.h>
73 #include <kdebug.h>
74 #include <klocale.h>
75 #include <kaction.h>
76 #include <kicon.h>
77 #include <kcodecs.h>
78 #include <ktoggleaction.h>
79 #include <kservice.h>
80 #include <KActionCollection>
81 #include <KMessageBox>
82 #include <KMenu>
83 
84 #include <QClipboard>
85 
86 // X headers...
87 #undef Never
88 #undef Always
89 
90 #include <unistd.h>
91 #include <stdlib.h>
92 #include <sys/stat.h>
93 #include <stdio.h>
94 #include <ctype.h>
95 #include <string.h>
96 #include <util/mailutil.h>
97 
98 using namespace KMail;
99 using namespace MailCommon;
100 
101 
102 KMReaderWin::KMReaderWin(QWidget *aParent,
103  QWidget *mainWindow,
104  KActionCollection* actionCollection,
105  Qt::WindowFlags aFlags )
106  : QWidget(aParent, aFlags ),
107  mMainWindow( mainWindow ),
108  mActionCollection( actionCollection ),
109  mMailToComposeAction( 0 ),
110  mMailToReplyAction( 0 ),
111  mMailToForwardAction( 0 ),
112  mAddAddrBookAction( 0 ),
113  mOpenAddrBookAction( 0 ),
114  mUrlSaveAsAction( 0 ),
115  mAddBookmarksAction( 0 ),
116  mAddEmailToExistingContactAction( 0 )
117 {
118  createActions();
119  QVBoxLayout * vlay = new QVBoxLayout( this );
120  vlay->setMargin( 0 );
121  mViewer = new Viewer( this, mainWindow, mActionCollection );
122  mViewer->setExternalWindow( true );
123  mViewer->setAppName( QLatin1String("KMail") );
124  connect( mViewer, SIGNAL(urlClicked(Akonadi::Item,KUrl)),
125  this, SLOT(slotUrlClicked(Akonadi::Item,KUrl)) );
126  connect( mViewer, SIGNAL(requestConfigSync()), kmkernel, SLOT(slotRequestConfigSync()), Qt::QueuedConnection ); // happens anyway on shutdown, so we can skip it there with using a queued connection
127  connect( mViewer, SIGNAL(makeResourceOnline(MessageViewer::Viewer::ResourceOnlineMode)), kmkernel, SLOT(makeResourceOnline(MessageViewer::Viewer::ResourceOnlineMode)));
128  connect( mViewer, SIGNAL(showReader(KMime::Content*,bool,QString)),
129  this, SLOT(slotShowReader(KMime::Content*,bool,QString)) );
130  connect( mViewer, SIGNAL(showMessage(KMime::Message::Ptr,QString)),
131  this, SLOT(slotShowMessage(KMime::Message::Ptr,QString)) );
132  connect( mViewer, SIGNAL(showStatusBarMessage(QString)),
133  this, SIGNAL(showStatusBarMessage(QString)) );
134  connect( mViewer, SIGNAL(deleteMessage(Akonadi::Item)),
135  this, SLOT(slotDeleteMessage(Akonadi::Item)) );
136 
137  mViewer->addMessageLoadedHandler( new MessageViewer::MarkMessageReadHandler( this ) );
138  mViewer->addMessageLoadedHandler( new MailCommon::SendMdnHandler( kmkernel, this ) );
139 
140  vlay->addWidget( mViewer );
141  readConfig();
142 
143 }
144 
145 void KMReaderWin::createActions()
146 {
147  KActionCollection *ac = mActionCollection;
148  if ( !ac ) {
149  return;
150  }
151  //
152  // Message Menu
153  //
154  // new message to
155  mMailToComposeAction = new KAction( KIcon( QLatin1String("mail-message-new") ),
156  i18n( "New Message To..." ), this );
157  ac->addAction(QLatin1String("mail_new"), mMailToComposeAction );
158  mMailToComposeAction->setShortcutConfigurable( false );
159  connect( mMailToComposeAction, SIGNAL(triggered(bool)),
160  SLOT(slotMailtoCompose()) );
161 
162  // reply to
163  mMailToReplyAction = new KAction( KIcon( QLatin1String("mail-reply-sender") ),
164  i18n( "Reply To..." ), this );
165  ac->addAction( QLatin1String("mailto_reply"), mMailToReplyAction );
166  mMailToReplyAction->setShortcutConfigurable( false );
167  connect( mMailToReplyAction, SIGNAL(triggered(bool)),
168  SLOT(slotMailtoReply()) );
169 
170  // forward to
171  mMailToForwardAction = new KAction( KIcon( QLatin1String("mail-forward" )),
172  i18n( "Forward To..." ), this );
173  mMailToForwardAction->setShortcutConfigurable( false );
174  ac->addAction( QLatin1String("mailto_forward"), mMailToForwardAction );
175  connect( mMailToForwardAction, SIGNAL(triggered(bool)),
176  SLOT(slotMailtoForward()) );
177 
178 
179  // add to addressbook
180  mAddAddrBookAction = new KAction( KIcon(QLatin1String( "contact-new") ),
181  i18n( "Add to Address Book" ), this );
182  mAddAddrBookAction->setShortcutConfigurable( false );
183  ac->addAction( QLatin1String("add_addr_book"), mAddAddrBookAction );
184  connect( mAddAddrBookAction, SIGNAL(triggered(bool)),
185  SLOT(slotMailtoAddAddrBook()) );
186 
187  mAddEmailToExistingContactAction = new KAction( KIcon(QLatin1String( "contact-new") ),
188  i18n( "Add to Existing Contact" ), this );
189  mAddEmailToExistingContactAction->setShortcutConfigurable( false );
190  ac->addAction( QLatin1String("add_to_existing_contact"), mAddAddrBookAction );
191  connect( mAddEmailToExistingContactAction, SIGNAL(triggered(bool)),
192  SLOT(slotMailToAddToExistingContact()) );
193 
194 
195  // open in addressbook
196  mOpenAddrBookAction = new KAction( KIcon( QLatin1String("view-pim-contacts") ),
197  i18n( "Open in Address Book" ), this );
198  mOpenAddrBookAction->setShortcutConfigurable( false );
199  ac->addAction( QLatin1String("openin_addr_book"), mOpenAddrBookAction );
200  connect( mOpenAddrBookAction, SIGNAL(triggered(bool)),
201  SLOT(slotMailtoOpenAddrBook()) );
202  // bookmark message
203  mAddBookmarksAction = new KAction( KIcon( QLatin1String("bookmark-new") ), i18n( "Bookmark This Link" ), this );
204  mAddBookmarksAction->setShortcutConfigurable( false );
205  ac->addAction( QLatin1String("add_bookmarks"), mAddBookmarksAction );
206  connect( mAddBookmarksAction, SIGNAL(triggered(bool)),
207  SLOT(slotAddBookmarks()) );
208 
209  mEditContactAction = new KAction( KIcon( QLatin1String("view-pim-contacts") ),
210  i18n( "Edit contact..." ), this );
211  mEditContactAction->setShortcutConfigurable( false );
212  ac->addAction( QLatin1String("edit_contact"), mOpenAddrBookAction );
213  connect( mEditContactAction, SIGNAL(triggered(bool)),
214  SLOT(slotEditContact()) );
215 
216  // save URL as
217  mUrlSaveAsAction = new KAction( i18n( "Save Link As..." ), this );
218  ac->addAction( QLatin1String("saveas_url"), mUrlSaveAsAction );
219  mUrlSaveAsAction->setShortcutConfigurable( false );
220  connect( mUrlSaveAsAction, SIGNAL(triggered(bool)), SLOT(slotUrlSave()) );
221 
222  // find text
223  KAction *action = new KAction(KIcon(QLatin1String("edit-find")), i18n("&Find in Message..."), this);
224  ac->addAction(QLatin1String("find_in_messages"), action );
225  connect(action, SIGNAL(triggered(bool)), SLOT(slotFind()));
226  action->setShortcut(KStandardShortcut::find());
227 
228  // save Image On Disk
229  mImageUrlSaveAsAction = new KAction( i18n( "Save Image On Disk..." ), this );
230  ac->addAction( QLatin1String("saveas_imageurl"), mImageUrlSaveAsAction );
231  mImageUrlSaveAsAction->setShortcutConfigurable( false );
232  connect( mImageUrlSaveAsAction, SIGNAL(triggered(bool)), SLOT(slotSaveImageOnDisk()) );
233 
234  // View html options
235  mViewHtmlOptions = new KMenu(i18n("Show HTML Format"));
236  mViewAsHtml = new KAction( i18n("Show HTML format when mail comes from this contact"), mViewHtmlOptions);
237  mViewAsHtml->setShortcutConfigurable( false );
238  connect( mViewAsHtml, SIGNAL(triggered(bool)), SLOT(slotContactHtmlOptions()));
239  mViewAsHtml->setCheckable(true);
240  mViewHtmlOptions->addAction(mViewAsHtml);
241 
242  mLoadExternalReference = new KAction( i18n("Load external reference when mail comes for this contact"), mViewHtmlOptions);
243  mLoadExternalReference->setShortcutConfigurable( false );
244  connect(mLoadExternalReference, SIGNAL(triggered(bool)), SLOT(slotContactHtmlOptions()));
245  mLoadExternalReference->setCheckable(true);
246  mViewHtmlOptions->addAction(mLoadExternalReference);
247 
248 
249  mShareImage = new KAction(i18n("Share image..."), this);
250  ac->addAction( QLatin1String("share_imageurl"), mShareImage );
251  mShareImage->setShortcutConfigurable( false );
252  connect(mShareImage, SIGNAL(triggered(bool)), SLOT(slotShareImage()));
253 
254 
255 }
256 
257 void KMReaderWin::setUseFixedFont( bool useFixedFont )
258 {
259  mViewer->setUseFixedFont( useFixedFont );
260 }
261 
262 bool KMReaderWin::isFixedFont() const
263 {
264  return mViewer->isFixedFont();
265 }
266 
267 
268 KMReaderWin::~KMReaderWin()
269 {
270 }
271 
272 
273 
274 void KMReaderWin::readConfig(void)
275 {
276  mViewer->readConfig();
277 }
278 
279 void KMReaderWin::setAttachmentStrategy( const AttachmentStrategy * strategy ) {
280  mViewer->setAttachmentStrategy( strategy );
281 }
282 
283 void KMReaderWin::setHeaderStyleAndStrategy( HeaderStyle * style,
284  HeaderStrategy * strategy ) {
285  mViewer->setHeaderStyleAndStrategy( style, strategy );
286 }
287 
288 void KMReaderWin::setOverrideEncoding( const QString & encoding )
289 {
290  mViewer->setOverrideEncoding( encoding );
291 }
292 
293 
294 void KMReaderWin::clearCache()
295 {
296  clear();
297 }
298 
299 // enter items for the "Important changes" list here:
300 static const char * const kmailChanges[] = {
301  I18N_NOOP( "KMail is now based on the Akonadi Personal Information Management framework, which brings many "
302  "changes all around.")
303 };
304 static const int numKMailChanges =
305  sizeof kmailChanges / sizeof *kmailChanges;
306 
307 // enter items for the "new features" list here, so the main body of
308 // the welcome page can be left untouched (probably much easier for
309 // the translators). Note that the <li>...</li> tags are added
310 // automatically below:
311 static const char * const kmailNewFeatures[] = {
312  I18N_NOOP( "Push email (IMAP IDLE)" ),
313  I18N_NOOP( "Improved virtual folders" ),
314  I18N_NOOP( "Improved searches" ),
315  I18N_NOOP( "Support for adding notes (annotations) to mails" ),
316  I18N_NOOP( "Tag folders" ),
317  I18N_NOOP( "Less GUI freezes, mail checks happen in the background" )
318 };
319 static const int numKMailNewFeatures =
320  sizeof kmailNewFeatures / sizeof *kmailNewFeatures;
321 
322 
323 
324 //static
325 QString KMReaderWin::newFeaturesMD5()
326 {
327  QByteArray str;
328  for ( int i = 0 ; i < numKMailChanges ; ++i )
329  str += kmailChanges[i];
330  for ( int i = 0 ; i < numKMailNewFeatures ; ++i )
331  str += kmailNewFeatures[i];
332  KMD5 md5( str );
333  return QLatin1String(md5.base64Digest());
334 }
335 
336 
337 void KMReaderWin::displaySplashPage( const QString &info )
338 {
339  mViewer->displaySplashPage( info );
340 }
341 
342 void KMReaderWin::displayBusyPage()
343 {
344  const QString info =
345  i18n( "<h2 style='margin-top: 0px;'>Retrieving Folder Contents</h2><p>Please wait . . .</p>&nbsp;" );
346 
347  displaySplashPage( info );
348 }
349 
350 void KMReaderWin::displayOfflinePage()
351 {
352  const QString info =
353  i18n( "<h2 style='margin-top: 0px;'>Offline</h2><p>KMail is currently in offline mode. "
354  "Click <a href=\"kmail:goOnline\">here</a> to go online . . .</p>&nbsp;" );
355 
356  displaySplashPage( info );
357 }
358 
359 void KMReaderWin::displayResourceOfflinePage()
360 {
361  const QString info =
362  i18n( "<h2 style='margin-top: 0px;'>Offline</h2><p>Account is currently in offline mode. "
363  "Click <a href=\"kmail:goResourceOnline\">here</a> to go online . . .</p>&nbsp;" );
364 
365  displaySplashPage( info );
366 }
367 
368 
369 
370 void KMReaderWin::displayAboutPage()
371 {
372  KLocalizedString info =
373  ki18nc("%1: KMail version; %2: help:// URL; "
374  "%3: generated list of new features; "
375  "%4: First-time user text (only shown on first start); "
376  "%5: generated list of important changes; "
377  "--- end of comment ---",
378  "<h2 style='margin-top: 0px;'>Welcome to KMail %1</h2><p>KMail is the email client by KDE. "
379  "It is designed to be fully compatible with "
380  "Internet mailing standards including MIME, SMTP, POP3, and IMAP."
381  "</p>\n"
382  "<ul><li>KMail has many powerful features which are described in the "
383  "<a href=\"%2\">documentation</a></li>\n"
384  "%5\n" // important changes
385  "%3\n" // new features
386  "%4\n" // first start info
387  "<p>We hope that you will enjoy KMail.</p>\n"
388  "<p>Thank you,</p>\n"
389  "<p style='margin-bottom: 0px'>&nbsp; &nbsp; The KMail Team</p>")
390  .subs( QLatin1String(KDEPIM_VERSION) )
391  .subs( QLatin1String("help:/kmail/index.html") );
392 
393  if ( ( numKMailNewFeatures > 1 ) || ( numKMailNewFeatures == 1 && strlen(kmailNewFeatures[0]) > 0 ) ) {
394  QString featuresText =
395  i18n("<p>Some of the new features in this release of KMail include "
396  "(compared to KMail %1, which is part of KDE Software Compilation %2):</p>\n",
397  QLatin1String("1.13"), QLatin1String(KDE::versionString()) ); // prior KMail and KDE version
398  featuresText += QLatin1String("<ul>\n");
399  for ( int i = 0 ; i < numKMailNewFeatures ; ++i )
400  featuresText += QLatin1String("<li>") + i18n( kmailNewFeatures[i] ) + QLatin1String("</li>\n");
401  featuresText += QLatin1String("</ul>\n");
402  info = info.subs( featuresText );
403  }
404  else
405  info = info.subs( QString() ); // remove the place holder
406 
407  if( kmkernel->firstStart() ) {
408  info = info.subs( i18n("<p>Please take a moment to fill in the KMail "
409  "configuration panel at Settings-&gt;Configure "
410  "KMail.\n"
411  "You need to create at least a default identity and "
412  "an incoming as well as outgoing mail account."
413  "</p>\n") );
414  } else {
415  info = info.subs( QString() ); // remove the place holder
416  }
417 
418  if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) {
419  QString changesText =
420  i18n("<p><span style='font-size:125%; font-weight:bold;'>"
421  "Important changes</span> (compared to KMail %1):</p>\n",
422  QLatin1String("1.13"));
423  changesText += QLatin1String("<ul>\n");
424  for ( int i = 0 ; i < numKMailChanges ; ++i )
425  changesText += i18n("<li>%1</li>\n", i18n( kmailChanges[i] ) );
426  changesText += QLatin1String("</ul>\n");
427  info = info.subs( changesText );
428  }
429  else
430  info = info.subs( QString() ); // remove the place holder
431 
432  displaySplashPage( info.toString() );
433 }
434 
435 
436 void KMReaderWin::slotFind()
437 {
438  mViewer->slotFind();
439 }
440 
441 void KMReaderWin::slotCopySelectedText()
442 {
443  QString selection = mViewer->selectedText();
444  selection.replace( QChar::Nbsp, QLatin1Char(' ') );
445  QApplication::clipboard()->setText( selection );
446 }
447 
448 
449 void KMReaderWin::setMsgPart( KMime::Content* aMsgPart )
450 {
451  mViewer->setMessagePart( aMsgPart );
452 }
453 
454 
455 QString KMReaderWin::copyText() const
456 {
457  return mViewer->selectedText();
458 }
459 
460 
461 MessageViewer::Viewer::DisplayFormatMessage KMReaderWin::displayFormatMessageOverwrite() const
462 {
463  return mViewer->displayFormatMessageOverwrite();
464 }
465 
466 void KMReaderWin::setDisplayFormatMessageOverwrite(MessageViewer::Viewer::DisplayFormatMessage format)
467 {
468  mViewer->setDisplayFormatMessageOverwrite(format);
469 }
470 
471 
472 
473 void KMReaderWin::setHtmlLoadExtOverride( bool override )
474 {
475  mViewer->setHtmlLoadExtOverride( override );
476 }
477 
478 
479 bool KMReaderWin::htmlMail() const
480 {
481  return mViewer->htmlMail();
482 }
483 
484 
485 bool KMReaderWin::htmlLoadExternal()
486 {
487  return mViewer->htmlLoadExternal();
488 }
489 
490 
491 Akonadi::Item KMReaderWin::message() const
492 {
493  return mViewer->messageItem();
494 }
495 
496 
497 void KMReaderWin::slotMailtoCompose()
498 {
499  KMCommand *command = new KMMailtoComposeCommand( urlClicked(), message() );
500  command->start();
501 }
502 
503 
504 void KMReaderWin::slotMailtoForward()
505 {
506  KMCommand *command = new KMMailtoForwardCommand( mMainWindow, urlClicked(),
507  message() );
508  command->start();
509 }
510 
511 
512 void KMReaderWin::slotMailtoAddAddrBook()
513 {
514  const KUrl url = urlClicked();
515  if( url.isEmpty() )
516  return;
517  const QString emailString = KPIMUtils::decodeMailtoUrl( url );
518 
519  KPIM::AddEmailAddressJob *job = new KPIM::AddEmailAddressJob( emailString, mMainWindow, this );
520  job->start();
521 }
522 
523 void KMReaderWin::slotMailToAddToExistingContact()
524 {
525  const KUrl url = urlClicked();
526  if( url.isEmpty() )
527  return;
528  const QString emailString = KPIMUtils::decodeMailtoUrl( url );
529  QPointer<AddEmailToExistingContactDialog> dlg = new AddEmailToExistingContactDialog(this);
530  if (dlg->exec()) {
531  Akonadi::Item item = dlg->selectedContact();
532  if (item.isValid()) {
533  AddEmailToExistingContactJob *job = new AddEmailToExistingContactJob(item, emailString, this);
534  job->start();
535  }
536  }
537  delete dlg;
538 }
539 
540 
541 void KMReaderWin::slotMailtoOpenAddrBook()
542 {
543  const KUrl url = urlClicked();
544  if( url.isEmpty() )
545  return;
546  const QString emailString = KPIMUtils::decodeMailtoUrl( url ).toLower();
547 
548  KPIM::OpenEmailAddressJob *job = new KPIM::OpenEmailAddressJob( emailString, mMainWindow, this );
549  job->start();
550 }
551 
552 
553 void KMReaderWin::slotAddBookmarks()
554 {
555  const KUrl url = urlClicked();
556  if( url.isEmpty() )
557  return;
558  KMCommand *command = new KMAddBookmarksCommand( url, this );
559  command->start();
560 }
561 
562 
563 void KMReaderWin::slotUrlSave()
564 {
565  const KUrl url = urlClicked();
566  if( url.isEmpty() )
567  return;
568  KMCommand *command = new KMUrlSaveCommand( url, mMainWindow );
569  command->start();
570 }
571 
572 void KMReaderWin::slotSaveImageOnDisk()
573 {
574  const KUrl url = imageUrlClicked();
575  if( url.isEmpty() )
576  return;
577  KMCommand *command = new KMUrlSaveCommand( url, mMainWindow );
578  command->start();
579 }
580 
581 
582 void KMReaderWin::slotMailtoReply()
583 {
584  KMCommand *command = new KMMailtoReplyCommand( mMainWindow, urlClicked(),
585  message(), copyText() );
586  command->start();
587 }
588 
589 CSSHelper* KMReaderWin::cssHelper() const
590 {
591  return mViewer->cssHelper();
592 }
593 
594 bool KMReaderWin::htmlLoadExtOverride() const
595 {
596  return mViewer->htmlLoadExtOverride();
597 }
598 void KMReaderWin::setDecryptMessageOverwrite( bool overwrite )
599 {
600  mViewer->setDecryptMessageOverwrite( overwrite );
601 }
602 const AttachmentStrategy * KMReaderWin::attachmentStrategy() const
603 {
604  return mViewer->attachmentStrategy();
605 }
606 
607 QString KMReaderWin::overrideEncoding() const
608 {
609  return mViewer->overrideEncoding();
610 }
611 
612 KToggleAction *KMReaderWin::toggleFixFontAction() const
613 {
614  return mViewer->toggleFixFontAction();
615 }
616 
617 bool KMReaderWin::mimePartTreeIsEmpty() const
618 {
619  return mViewer->mimePartTreeIsEmpty();
620 }
621 
622 KAction *KMReaderWin::toggleMimePartTreeAction() const
623 {
624  return mViewer->toggleMimePartTreeAction();
625 }
626 
627 KAction *KMReaderWin::selectAllAction() const
628 {
629  return mViewer->selectAllAction();
630 }
631 
632 const HeaderStrategy * KMReaderWin::headerStrategy() const
633 {
634  return mViewer->headerStrategy();
635 }
636 
637 HeaderStyle * KMReaderWin::headerStyle() const
638 {
639  return mViewer->headerStyle();
640 }
641 
642 KAction *KMReaderWin::copyURLAction() const
643 {
644  return mViewer->copyURLAction();
645 }
646 
647 KAction *KMReaderWin::copyImageLocation() const
648 {
649  return mViewer->copyImageLocation();
650 }
651 
652 KAction *KMReaderWin::copyAction() const
653 {
654  return mViewer->copyAction();
655 }
656 
657 KAction *KMReaderWin::viewSourceAction() const
658 {
659  return mViewer->viewSourceAction();
660 }
661 
662 KAction *KMReaderWin::saveAsAction() const
663 {
664  return mViewer->saveAsAction();
665 }
666 
667 KAction *KMReaderWin::findInMessageAction() const
668 {
669  return mViewer->findInMessageAction();
670 }
671 
672 KAction *KMReaderWin::urlOpenAction() const
673 {
674  return mViewer->urlOpenAction();
675 }
676 void KMReaderWin::setPrinting(bool enable)
677 {
678  mViewer->setPrinting( enable );
679 }
680 
681 KAction* KMReaderWin::speakTextAction() const
682 {
683  return mViewer->speakTextAction();
684 }
685 
686 KAction* KMReaderWin::downloadImageToDiskAction() const
687 {
688  return mImageUrlSaveAsAction;
689 }
690 
691 KAction* KMReaderWin::translateAction() const
692 {
693  return mViewer->translateAction();
694 }
695 
696 void KMReaderWin::clear(bool force )
697 {
698  mViewer->clear( force ? Viewer::Force : Viewer::Delayed );
699 }
700 
701 void KMReaderWin::setMessage( const Akonadi::Item &item, Viewer::UpdateMode updateMode)
702 {
703  kDebug() << Q_FUNC_INFO << parentWidget();
704  mViewer->setMessageItem( item, updateMode );
705 }
706 
707 void KMReaderWin::setMessage( KMime::Message::Ptr message)
708 {
709  mViewer->setMessage( message );
710 }
711 
712 
713 KUrl KMReaderWin::urlClicked() const
714 {
715  return mViewer->urlClicked();
716 }
717 
718 KUrl KMReaderWin::imageUrlClicked() const
719 {
720  return mViewer->imageUrlClicked();
721 }
722 
723 void KMReaderWin::update( bool force )
724 {
725  mViewer->update( force ? Viewer::Force : Viewer::Delayed );
726 }
727 
728 void KMReaderWin::slotUrlClicked( const Akonadi::Item & item, const KUrl & url )
729 {
730  if ( item.isValid() && item.parentCollection().isValid() ) {
731  QSharedPointer<FolderCollection> fd = FolderCollection::forCollection(
732  MailCommon::Util::updatedCollection( item.parentCollection() ), false );
733  KMail::Util::handleClickedURL( url, fd );
734  return;
735  }
736  //No folder so we can't have identity and template.
737  KMail::Util::handleClickedURL( url );
738 }
739 
740 void KMReaderWin::slotShowReader( KMime::Content* msgPart, bool html, const QString &encoding )
741 {
742  const MessageViewer::Viewer::DisplayFormatMessage format = html ? MessageViewer::Viewer::Html : MessageViewer::Viewer::Text;
743  KMReaderMainWin *win = new KMReaderMainWin( msgPart, format, encoding );
744  win->show();
745 }
746 
747 void KMReaderWin::slotShowMessage( KMime::Message::Ptr message, const QString& encoding )
748 {
749  KMReaderMainWin *win = new KMReaderMainWin();
750  win->showMessage( encoding, message );
751  win->show();
752 }
753 
754 void KMReaderWin::slotDeleteMessage(const Akonadi::Item& item)
755 {
756  if ( !item.isValid() )
757  return;
758  KMTrashMsgCommand *command = new KMTrashMsgCommand( item.parentCollection(), item, -1 );
759  command->start();
760 }
761 
762 bool KMReaderWin::printSelectedText(bool preview)
763 {
764  const QString str = mViewer->selectedText();
765  if(str.isEmpty())
766  return false;
767  ::MessageComposer::Composer* composer = new ::MessageComposer::Composer;
768  composer->textPart()->setCleanPlainText(str);
769  composer->textPart()->setWrappedPlainText(str);
770  KMime::Message::Ptr messagePtr = message().payload<KMime::Message::Ptr>();
771  composer->infoPart()->setFrom(messagePtr->from()->asUnicodeString());
772  composer->infoPart()->setTo(QStringList()<<messagePtr->to()->asUnicodeString());
773  composer->infoPart()->setCc(QStringList()<<messagePtr->cc()->asUnicodeString());
774  composer->infoPart()->setSubject(messagePtr->subject()->asUnicodeString());
775  composer->setProperty("preview",preview);
776  connect( composer, SIGNAL(result(KJob*)),
777  this, SLOT(slotPrintComposeResult(KJob*)) );
778  composer->start();
779  return true;
780 }
781 
782 void KMReaderWin::slotPrintComposeResult( KJob *job )
783 {
784  const bool preview = job->property("preview").toBool();
785  Q_ASSERT( dynamic_cast< ::MessageComposer::Composer* >( job ) );
786 
787  ::MessageComposer::Composer* composer = dynamic_cast< ::MessageComposer::Composer* >( job );
788  if( composer->error() == ::MessageComposer::Composer::NoError ) {
789 
790  Q_ASSERT( composer->resultMessages().size() == 1 );
791  Akonadi::Item printItem;
792  printItem.setPayload<KMime::Message::Ptr>( composer->resultMessages().first() );
793  Akonadi::MessageFlags::copyMessageFlags(*(composer->resultMessages().first()), printItem);
794  const bool useFixedFont = MessageViewer::GlobalSettings::self()->useFixedFont();
795  const QString overrideEncoding = MessageCore::GlobalSettings::self()->overrideCharacterEncoding();
796 
797  KMPrintCommand *command = new KMPrintCommand( this, printItem, mViewer->headerStyle(), mViewer->headerStrategy()
798  , mViewer->displayFormatMessageOverwrite(), mViewer->htmlLoadExternal() ,useFixedFont, overrideEncoding );
799  command->setPrintPreview( preview );
800  command->start();
801  } else {
802  if ( static_cast<KIO::Job*>(job)->ui() ) {
803  static_cast<KIO::Job*>(job)->ui()->showErrorMessage();
804  } else {
805  kWarning() << "Composer for printing failed:" << composer->errorString();
806  }
807  }
808 
809 }
810 
811 void KMReaderWin::clearContactItem()
812 {
813  mSearchedContact = Akonadi::Item();
814  mSearchedAddress = KABC::Addressee();
815  mLoadExternalReference->setChecked(false);
816  mViewAsHtml->setChecked(false);
817 }
818 
819 void KMReaderWin::setContactItem(const Akonadi::Item& contact, const KABC::Addressee &address)
820 {
821  mSearchedContact = contact;
822  mSearchedAddress = address;
823  updateHtmlActions();
824 }
825 
826 void KMReaderWin::updateHtmlActions()
827 {
828  if (!mSearchedContact.isValid()) {
829  mLoadExternalReference->setChecked(false);
830  mViewAsHtml->setChecked(false);
831  } else {
832  const QStringList customs = mSearchedAddress.customs();
833  Q_FOREACH ( const QString& custom, customs ) {
834  if ( custom.contains(QLatin1String( "MailPreferedFormatting")) ) {
835  const QString value = mSearchedAddress.custom( QLatin1String( "KADDRESSBOOK" ), QLatin1String( "MailPreferedFormatting" ) );
836  mViewAsHtml->setChecked(value == QLatin1String( "HTML" ));
837  } else if ( custom.contains(QLatin1String( "MailAllowToRemoteContent")) ) {
838  const QString value = mSearchedAddress.custom( QLatin1String( "KADDRESSBOOK" ), QLatin1String( "MailAllowToRemoteContent" ) );
839  mLoadExternalReference->setChecked(( value == QLatin1String( "TRUE" ) ));
840  }
841  }
842  }
843 }
844 
845 void KMReaderWin::slotContactHtmlOptions()
846 {
847  const KUrl url = urlClicked();
848  if( url.isEmpty() )
849  return;
850  const QString emailString = KPIMUtils::decodeMailtoUrl( url ).toLower();
851 
852  KPIM::AddEmailDiplayJob *job = new KPIM::AddEmailDiplayJob( emailString, mMainWindow, this );
853  job->setRemoteContent(mLoadExternalReference->isChecked());
854  job->setShowAsHTML(mViewAsHtml->isChecked());
855  job->setContact(mSearchedContact);
856  job->start();
857 }
858 
859 void KMReaderWin::slotEditContact()
860 {
861  if( mSearchedContact.isValid() ) {
862  QPointer<Akonadi::ContactEditorDialog> dlg =
863  new Akonadi::ContactEditorDialog( Akonadi::ContactEditorDialog::EditMode, this );
864  connect( dlg, SIGNAL(contactStored(Akonadi::Item)),
865  this, SLOT(contactStored(Akonadi::Item)) );
866  connect( dlg, SIGNAL(error(QString)),
867  this, SLOT(slotContactEditorError(QString)) );
868  dlg->setContact( mSearchedContact );
869  dlg->exec();
870  delete dlg;
871  }
872 }
873 
874 void KMReaderWin::slotContactEditorError(const QString &error)
875 {
876  KMessageBox::error(this, i18n("Contact cannot be stored: %1", error), i18n("Failed to store contact"));
877 }
878 
879 void KMReaderWin::contactStored( const Akonadi::Item &item )
880 {
881  Q_UNUSED( item );
882  KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "Contact modified successfully" ) );
883 }
884 
885 KAction *KMReaderWin::saveMessageDisplayFormatAction() const
886 {
887  return mViewer->saveMessageDisplayFormatAction();
888 }
889 
890 KAction *KMReaderWin::resetMessageDisplayFormatAction() const
891 {
892  return mViewer->resetMessageDisplayFormatAction();
893 }
894 
895 KAction *KMReaderWin::blockImage() const
896 {
897  return mViewer->blockImage();
898 }
899 
900 bool KMReaderWin::adblockEnabled() const
901 {
902  return mViewer->adblockEnabled();
903 }
904 
905 KAction *KMReaderWin::openBlockableItems() const
906 {
907  return mViewer->openBlockableItems();
908 }
909 
910 
911 void KMReaderWin::slotShareImage()
912 {
913  KMCommand *command = new KMShareImageCommand( imageUrlClicked(), this);
914  command->start();
915 }
916 
917 bool KMReaderWin::isAShortUrl(const KUrl &url) const
918 {
919  return mViewer->isAShortUrl(url);
920 }
921 
922 KAction *KMReaderWin::expandShortUrlAction() const
923 {
924  return mViewer->expandShortUrlAction();
925 }
926 
927 KAction *KMReaderWin::createTodoAction() const
928 {
929  return mViewer->createTodoAction();
930 }
931 
932 KAction *KMReaderWin::createEventAction() const
933 {
934  return mViewer->createEventAction();
935 }
936 
937 
938 
kmailChanges
static const char *const kmailChanges[]
Definition: kmreaderwin.cpp:300
globalsettings.h
QWidget
KMReaderWin::headerStrategy
const MessageViewer::HeaderStrategy * headerStrategy() const
Getthe message header strategy.
Definition: kmreaderwin.cpp:632
KMReaderWin::attachmentStrategy
const MessageViewer::AttachmentStrategy * attachmentStrategy() const
Get/set the message attachment strategy.
Definition: kmreaderwin.cpp:602
addemailtoexistingcontactdialog.h
KMAddBookmarksCommand
Definition: kmcommands.h:196
KMReaderMainWin::showMessage
void showMessage(const QString &encoding, const Akonadi::Item &msg, const Akonadi::Collection &parentCollection=Akonadi::Collection())
take ownership of and show
Definition: kmreadermainwin.cpp:136
KMMailtoComposeCommand
Definition: kmcommands.h:154
kmmainwidget.h
KMReaderWin::displayFormatMessageOverwrite
MessageViewer::Viewer::DisplayFormatMessage displayFormatMessageOverwrite() const
Definition: kmreaderwin.cpp:461
KMReaderWin::slotPrintComposeResult
void slotPrintComposeResult(KJob *job)
Definition: kmreaderwin.cpp:782
KMReaderWin::slotFind
void slotFind()
The user selected "Find" from the menu.
Definition: kmreaderwin.cpp:436
KPIM::OpenEmailAddressJob
KMReaderWin::urlOpenAction
KAction * urlOpenAction() const
Definition: kmreaderwin.cpp:672
QByteArray
KPIM::BroadcastStatus::instance
static BroadcastStatus * instance()
KMTrashMsgCommand
Definition: kmcommands.h:552
KPIM::OpenEmailAddressJob::start
virtual void start()
KMReaderWin::blockImage
KAction * blockImage() const
Definition: kmreaderwin.cpp:895
KMReaderWin::copyURLAction
KAction * copyURLAction() const
Definition: kmreaderwin.cpp:642
KMReaderWin::urlClicked
KUrl urlClicked() const
Definition: kmreaderwin.cpp:713
KMMailtoReplyCommand
Definition: kmcommands.h:168
KPIM::AddEmailDiplayJob
KMReaderWin::slotMailtoCompose
void slotMailtoCompose()
Definition: kmreaderwin.cpp:497
KPIM::AddEmailAddressJob
KMReaderWin::slotEditContact
void slotEditContact()
Definition: kmreaderwin.cpp:859
KMReaderWin::slotShareImage
void slotShareImage()
Definition: kmreaderwin.cpp:911
QPointer
KMail::Util::handleClickedURL
bool handleClickedURL(const KUrl &url, const QSharedPointer< MailCommon::FolderCollection > &folder=QSharedPointer< MailCommon::FolderCollection >())
Handles a clicked URL, but only in case the viewer didn't handle it.
Definition: util.cpp:88
KMReaderWin::slotUrlSave
void slotUrlSave()
Save the page to a file.
Definition: kmreaderwin.cpp:563
numKMailNewFeatures
static const int numKMailNewFeatures
Definition: kmreaderwin.cpp:319
KMReaderWin::isAShortUrl
bool isAShortUrl(const KUrl &url) const
Definition: kmreaderwin.cpp:917
KMReaderWin::saveAsAction
KAction * saveAsAction() const
Definition: kmreaderwin.cpp:662
KMReaderWin::createEventAction
KAction * createEventAction() const
Definition: kmreaderwin.cpp:932
KMReaderWin::contactStored
void contactStored(const Akonadi::Item &item)
Definition: kmreaderwin.cpp:879
KMReaderWin::setHeaderStyleAndStrategy
void setHeaderStyleAndStrategy(MessageViewer::HeaderStyle *style, MessageViewer::HeaderStrategy *strategy)
Set the header style and strategy.
Definition: kmreaderwin.cpp:283
KMReaderWin::~KMReaderWin
virtual ~KMReaderWin()
Definition: kmreaderwin.cpp:268
KMReaderWin::headerStyle
MessageViewer::HeaderStyle * headerStyle() const
Definition: kmreaderwin.cpp:637
KMReaderWin::slotShowReader
void slotShowReader(KMime::Content *, bool html, const QString &)
Definition: kmreaderwin.cpp:740
openemailaddressjob.h
KMReaderWin::message
Akonadi::Item message() const
Definition: kmreaderwin.cpp:491
KMReaderWin::displayResourceOfflinePage
void displayResourceOfflinePage()
Definition: kmreaderwin.cpp:359
QWidget::update
void update()
kmreaderwin.h
AddEmailToExistingContactDialog
Definition: addemailtoexistingcontactdialog.h:26
KMReaderWin::setOverrideEncoding
void setOverrideEncoding(const QString &encoding)
Set the override character encoding.
Definition: kmreaderwin.cpp:288
KPIM::BroadcastStatus::setStatusMsg
void setStatusMsg(const QString &message)
KMReaderWin::slotMailtoForward
void slotMailtoForward()
Definition: kmreaderwin.cpp:504
KMReaderWin::setContactItem
void setContactItem(const Akonadi::Item &contact, const KABC::Addressee &address)
Definition: kmreaderwin.cpp:819
KMReaderWin::setPrinting
virtual void setPrinting(bool enable)
Definition: kmreaderwin.cpp:676
KMReaderWin::cssHelper
MessageViewer::CSSHelper * cssHelper() const
Definition: kmreaderwin.cpp:589
KMReaderWin::expandShortUrlAction
KAction * expandShortUrlAction() const
Definition: kmreaderwin.cpp:922
KMReaderWin::copyImageLocation
KAction * copyImageLocation() const
Definition: kmreaderwin.cpp:647
KMReaderWin::createTodoAction
KAction * createTodoAction() const
Definition: kmreaderwin.cpp:927
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
kmailNewFeatures
static const char *const kmailNewFeatures[]
Definition: kmreaderwin.cpp:311
KMCommand
Small helper structure which encapsulates the KMMessage created when creating a reply, and.
Definition: kmcommands.h:48
KMReaderWin::setDecryptMessageOverwrite
void setDecryptMessageOverwrite(bool overwrite=true)
Enforce message decryption.
Definition: kmreaderwin.cpp:598
QSharedPointer
Definition: collectionmailinglistpage.h:34
KMReaderWin::setDisplayFormatMessageOverwrite
void setDisplayFormatMessageOverwrite(MessageViewer::Viewer::DisplayFormatMessage format)
Definition: kmreaderwin.cpp:466
QApplication::clipboard
QClipboard * clipboard()
KMReaderWin::slotMailtoAddAddrBook
void slotMailtoAddAddrBook()
Definition: kmreaderwin.cpp:512
KMReaderWin::KMReaderWin
KMReaderWin(QWidget *parent, QWidget *mainWindow, KActionCollection *actionCollection, Qt::WindowFlags f=0)
Definition: kmreaderwin.cpp:102
KMReaderWin::viewSourceAction
KAction * viewSourceAction() const
Definition: kmreaderwin.cpp:657
KMReaderWin::imageUrlClicked
KUrl imageUrlClicked() const
Definition: kmreaderwin.cpp:718
KMReaderWin::setMsgPart
void setMsgPart(KMime::Content *aMsgPart)
Instead of settings a message to be shown sets a message part to be shown.
Definition: kmreaderwin.cpp:449
addemailtoexistingcontactjob.h
KMReaderWin::translateAction
KAction * translateAction() const
Definition: kmreaderwin.cpp:691
QString::isEmpty
bool isEmpty() const
KMCommand::start
void start()
Definition: kmcommands.cpp:233
KMReaderWin::displayBusyPage
void displayBusyPage()
Display the 'please wait' page instead of a message.
Definition: kmreaderwin.cpp:342
KMReaderWin::setAttachmentStrategy
void setAttachmentStrategy(const MessageViewer::AttachmentStrategy *strategy)
Definition: kmreaderwin.cpp:279
numKMailChanges
static const int numKMailChanges
Definition: kmreaderwin.cpp:304
KMReaderWin::setHtmlLoadExtOverride
void setHtmlLoadExtOverride(bool override)
Definition: kmreaderwin.cpp:473
KMReaderWin::setMessage
void setMessage(const Akonadi::Item &item, MessageViewer::Viewer::UpdateMode updateMode=MessageViewer::Viewer::Delayed)
KMMailtoForwardCommand
Definition: kmcommands.h:183
QVBoxLayout
KPIM::AddEmailAddressJob::start
virtual void start()
KMReaderWin::htmlMail
bool htmlMail() const
Is html mail to be supported? Takes into account override.
Definition: kmreaderwin.cpp:479
addemaildisplayjob.h
KMReaderWin::clear
void clear(bool force=false)
Clear the reader and discard the current message.
Definition: kmreaderwin.cpp:696
KMReaderWin::slotSaveImageOnDisk
void slotSaveImageOnDisk()
Definition: kmreaderwin.cpp:572
QString
KMReaderWin::displayOfflinePage
void displayOfflinePage()
Display the 'we are currently in offline mode' page instead of a message.
Definition: kmreaderwin.cpp:350
util.h
QLayout::setMargin
void setMargin(int margin)
KMReaderWin::clearContactItem
void clearContactItem()
Definition: kmreaderwin.cpp:811
kmkernel
#define kmkernel
Definition: kmkernel.h:24
QStringList
KMReaderWin::resetMessageDisplayFormatAction
KAction * resetMessageDisplayFormatAction() const
Definition: kmreaderwin.cpp:890
KMReaderWin::downloadImageToDiskAction
KAction * downloadImageToDiskAction() const
Definition: kmreaderwin.cpp:686
QString::toLower
QString toLower() const
KMReaderWin::adblockEnabled
bool adblockEnabled() const
Definition: kmreaderwin.cpp:900
QString::contains
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QLatin1Char
KMReaderWin::slotDeleteMessage
void slotDeleteMessage(const Akonadi::Item &)
Definition: kmreaderwin.cpp:754
KMUrlSaveCommand
Definition: kmcommands.h:209
KMReaderWin::saveMessageDisplayFormatAction
KAction * saveMessageDisplayFormatAction() const
Definition: kmreaderwin.cpp:885
KMReaderWin::copyAction
KAction * copyAction() const
Definition: kmreaderwin.cpp:652
KPIM::AddEmailDiplayJob::setContact
void setContact(const Akonadi::Item &contact)
KMReaderWin::showStatusBarMessage
void showStatusBarMessage(const QString &message)
KMReaderWin::newFeaturesMD5
static QString newFeaturesMD5()
Returns the MD5 hash for the list of new features.
Definition: kmreaderwin.cpp:325
KMReaderWin::slotContactEditorError
void slotContactEditorError(const QString &error)
Definition: kmreaderwin.cpp:874
KMReaderWin::slotContactHtmlOptions
void slotContactHtmlOptions()
Definition: kmreaderwin.cpp:845
QString::replace
QString & replace(int position, int n, QChar after)
KMReaderWin::toggleFixFontAction
KToggleAction * toggleFixFontAction() const
Definition: kmreaderwin.cpp:612
KMReaderWin::slotMailtoOpenAddrBook
void slotMailtoOpenAddrBook()
Definition: kmreaderwin.cpp:541
KMReaderWin::slotMailtoReply
void slotMailtoReply()
Operations on mailto: URLs.
Definition: kmreaderwin.cpp:582
addemailaddressjob.h
KMPrintCommand::setPrintPreview
void setPrintPreview(bool preview)
Definition: kmcommands.cpp:1114
KMReaderWin::isFixedFont
bool isFixedFont() const
Definition: kmreaderwin.cpp:262
KMReaderWin::copyText
QString copyText() const
Return selected text.
Definition: kmreaderwin.cpp:455
QLatin1String
KMReaderWin::overrideEncoding
QString overrideEncoding() const
Get selected override character encoding.
Definition: kmreaderwin.cpp:607
KMReaderWin::htmlLoadExtOverride
bool htmlLoadExtOverride() const
Override default load external references setting.
Definition: kmreaderwin.cpp:594
KMReaderWin::openBlockableItems
KAction * openBlockableItems() const
Definition: kmreaderwin.cpp:905
KMReaderWin::findInMessageAction
KAction * findInMessageAction() const
Definition: kmreaderwin.cpp:667
QWidget::parentWidget
QWidget * parentWidget() const
KMReaderWin::htmlLoadExternal
bool htmlLoadExternal()
Is loading ext.
Definition: kmreaderwin.cpp:485
KMReaderWin::toggleMimePartTreeAction
KAction * toggleMimePartTreeAction() const
Definition: kmreaderwin.cpp:622
KMReaderWin::displayAboutPage
void displayAboutPage()
Display the about page instead of a message.
Definition: kmreaderwin.cpp:370
KMReaderWin::printSelectedText
bool printSelectedText(bool preview)
Definition: kmreaderwin.cpp:762
KPIM::AddEmailDiplayJob::setRemoteContent
void setRemoteContent(bool b)
KMReaderWin::slotMailToAddToExistingContact
void slotMailToAddToExistingContact()
Definition: kmreaderwin.cpp:523
KMReaderMainWin
Definition: kmreadermainwin.h:34
KPIM::AddEmailDiplayJob::setShowAsHTML
void setShowAsHTML(bool html)
KPIM::AddEmailDiplayJob::start
virtual void start()
KMReaderWin::slotUrlClicked
void slotUrlClicked(const Akonadi::Item &, const KUrl &)
Definition: kmreaderwin.cpp:728
KMPrintCommand
Definition: kmcommands.h:384
Qt::WindowFlags
typedef WindowFlags
QClipboard::setText
void setText(const QString &text, Mode mode)
AddEmailToExistingContactJob::start
void start()
Definition: addemailtoexistingcontactjob.cpp:42
kmreadermainwin.h
KMReaderWin::slotAddBookmarks
void slotAddBookmarks()
Definition: kmreaderwin.cpp:553
kmcommands.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KMReaderWin::slotShowMessage
void slotShowMessage(KMime::Message::Ptr message, const QString &encoding)
Definition: kmreaderwin.cpp:747
AddEmailToExistingContactJob
Definition: addemailtoexistingcontactjob.h:24
broadcaststatus.h
KMReaderWin::setUseFixedFont
void setUseFixedFont(bool useFixedFont)
Definition: kmreaderwin.cpp:257
KMReaderWin::selectAllAction
KAction * selectAllAction() const
Definition: kmreaderwin.cpp:627
KJob
KMReaderWin::slotCopySelectedText
void slotCopySelectedText()
Copy the selected text to the clipboard.
Definition: kmreaderwin.cpp:441
KMReaderWin::mimePartTreeIsEmpty
bool mimePartTreeIsEmpty() const
Definition: kmreaderwin.cpp:617
KMShareImageCommand
Definition: kmcommands.h:576
KMReaderWin::displaySplashPage
void displaySplashPage(const QString &info)
Display a generic HTML splash page instead of a message.
Definition: kmreaderwin.cpp:337
KMReaderWin::clearCache
void clearCache()
Force update even if message is the same.
Definition: kmreaderwin.cpp:294
KMReaderWin::speakTextAction
KAction * speakTextAction() const
Definition: kmreaderwin.cpp:681
KMReaderWin::readConfig
void readConfig()
Read settings from app's config file.
Definition: kmreaderwin.cpp:274
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:33 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
  • 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