• 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
  • mailmerge
  • widgets
attachmentlistwidget.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2014-2015 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 "attachmentlistwidget.h"
19 #include "selectattachmentdialog.h"
20 
21 #include <KLocalizedString>
22 #include <KUrlRequester>
23 
24 #include <QHBoxLayout>
25 #include <QLabel>
26 #include <QPointer>
27 using namespace MailMerge;
28 AttachmentListWidget::AttachmentListWidget(QWidget * parent,
29  ButtonCode buttons,
30  const QString & addLabel,
31  const QString & removeLabel,
32  const QString & modifyLabel)
33  : PimCommon::SimpleStringListEditor(parent, buttons, addLabel, removeLabel, modifyLabel, QString())
34 {
35 }
36 
37 AttachmentListWidget::~AttachmentListWidget()
38 {
39 
40 }
41 
42 void AttachmentListWidget::addNewEntry()
43 {
44  QPointer<SelectAttachmentDialog> dlg = new SelectAttachmentDialog(this);
45  if (dlg->exec()) {
46  insertNewEntry(dlg->attachmentPath());
47  }
48  delete dlg;
49 }
50 
51 QString AttachmentListWidget::modifyEntry(const QString &text)
52 {
53  QString attachmentPath;
54  QPointer<SelectAttachmentDialog> dlg = new SelectAttachmentDialog(this);
55  dlg->setAttachmentPath(text);
56  if (dlg->exec()) {
57  attachmentPath = dlg->attachmentPath();
58  }
59  delete dlg;
60  return attachmentPath;
61 }
62 
QWidget
selectattachmentdialog.h
MailMerge::AttachmentListWidget::~AttachmentListWidget
~AttachmentListWidget()
Definition: attachmentlistwidget.cpp:37
text
virtual QByteArray text(quint32 serialNumber) const =0
MailMerge::AttachmentListWidget::AttachmentListWidget
AttachmentListWidget(QWidget *parent=0, ButtonCode buttons=Unsorted, const QString &addLabel=QString(), const QString &removeLabel=QString(), const QString &modifyLabel=QString())
Definition: attachmentlistwidget.cpp:28
QPointer
attachmentlistwidget.h
MailMerge::AttachmentListWidget::modifyEntry
QString modifyEntry(const QString &text)
Definition: attachmentlistwidget.cpp:51
MailMerge::AttachmentListWidget::addNewEntry
void addNewEntry()
Definition: attachmentlistwidget.cpp:42
QString
MailMerge::SelectAttachmentDialog
Definition: selectattachmentdialog.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:32 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