• 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
  • warningwidgets
attachmentmissingwarning.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2012, 2013 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "attachmentmissingwarning.h"
19 #include <KLocale>
20 #include <KAction>
21 #include <KIcon>
22 
23 AttachmentMissingWarning::AttachmentMissingWarning(QWidget *parent)
24  :KMessageWidget(parent)
25 {
26  setVisible(false);
27  setCloseButtonVisible(false);
28  setMessageType(Information);
29  setText( i18n( "The message you have composed seems to refer to an attached file but you have not attached anything. Do you want to attach a file to your message?" ) );
30  setWordWrap(true);
31 
32  KAction *action = new KAction( KIcon(QLatin1String( "mail-attachment" )), i18n( "&Attach file" ), this );
33  connect( action, SIGNAL(triggered(bool)), SLOT(slotAttachFile()) );
34  addAction( action );
35 
36  action = new KAction( KIcon(QLatin1String( "window-close" )), i18n( "&Remind me later" ), this );
37  connect( action, SIGNAL(triggered(bool)), SLOT(explicitlyClosed()) );
38  addAction( action );
39 
40 }
41 
42 AttachmentMissingWarning::~AttachmentMissingWarning()
43 {
44 }
45 
46 void AttachmentMissingWarning::slotAttachFile()
47 {
48  Q_EMIT attachMissingFile();
49 }
50 
51 void AttachmentMissingWarning::slotFileAttached()
52 {
53  animatedHide();
54  Q_EMIT closeAttachMissingFile();
55 }
56 
57 void AttachmentMissingWarning::explicitlyClosed()
58 {
59  animatedHide();
60  Q_EMIT explicitClosedMissingAttachment();
61 }
62 
63 #include "attachmentmissingwarning.moc"
AttachmentMissingWarning::AttachmentMissingWarning
AttachmentMissingWarning(QWidget *parent=0)
Definition: attachmentmissingwarning.cpp:23
AttachmentMissingWarning::explicitClosedMissingAttachment
void explicitClosedMissingAttachment()
QWidget
AttachmentMissingWarning::attachMissingFile
void attachMissingFile()
AttachmentMissingWarning::~AttachmentMissingWarning
~AttachmentMissingWarning()
Definition: attachmentmissingwarning.cpp:42
attachmentmissingwarning.h
KMessageWidget
AttachmentMissingWarning::closeAttachMissingFile
void closeAttachMissingFile()
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