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

calendarsupport

  • sources
  • kde-4.12
  • kdepim
  • calendarsupport
attachmenthandler.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
26 #ifndef CALENDARSUPPORT_ATTACHMENTHANDLER_H
27 #define CALENDARSUPPORT_ATTACHMENTHANDLER_H
28 
29 #include <KCalCore/Attachment>
30 #include <KCalCore/Incidence>
31 #include <KCalCore/ScheduleMessage>
32 
33 #include <QObject>
34 
35 class KJob;
36 
37 class QString;
38 class QWidget;
39 
40 namespace CalendarSupport {
41 
48 class AttachmentHandler : public QObject
49 {
50  Q_OBJECT
51  public:
52 
57  explicit AttachmentHandler( QWidget *parent );
58  ~AttachmentHandler();
59 
67  KCalCore::Attachment::Ptr find( const QString &attachmentName,
68  const KCalCore::Incidence::Ptr &incidence );
69 
78  KCalCore::Attachment::Ptr find( const QString &attachmentName,
79  const KCalCore::ScheduleMessage::Ptr &message );
80 
87  bool view( const KCalCore::Attachment::Ptr &attachment );
88 
97  bool view( const QString &attachmentName,
98  const KCalCore::Incidence::Ptr &incidence );
99 
110  void view( const QString &attachmentName, const QString &uid );
111 
121  bool view( const QString &attachmentName,
122  const KCalCore::ScheduleMessage::Ptr &message );
123 
131  bool saveAs( const KCalCore::Attachment::Ptr &attachment );
132 
142  bool saveAs( const QString &attachmentName,
143  const KCalCore::Incidence::Ptr &incidence );
144 
154  void saveAs( const QString &attachmentName, const QString &uid );
155 
165  bool saveAs( const QString &attachmentName,
166  const KCalCore::ScheduleMessage::Ptr &message );
167 
168  Q_SIGNALS:
169  void viewFinished( const QString &uid, const QString &attachmentName, bool success );
170  void saveAsFinished( const QString &uid, const QString &attachmentName, bool success );
171 
172  private Q_SLOTS:
173  void slotFinishView( KJob *job );
174  void slotFinishSaveAs( KJob *job );
175 
176  private:
177  //@cond PRIVATE
178  class Private;
179  Private *const d;
180  //@endcond
181 
182 }; // class AttachmentHandler
183 
184 } // namespace CalendarSupport
185 
186 #endif
QWidget
CalendarSupport::AttachmentHandler::find
KCalCore::Attachment::Ptr find(const QString &attachmentName, const KCalCore::Incidence::Ptr &incidence)
Finds the attachment in the user's calendar, by attachmentName and incidence.
QObject
CalendarSupport::incidence
CALENDARSUPPORT_EXPORT KCalCore::Incidence::Ptr incidence(const Akonadi::Item &item)
returns the incidence from an akonadi item, or a null pointer if the item has no such payload ...
Definition: utils.cpp:75
CalendarSupport::AttachmentHandler::saveAs
bool saveAs(const KCalCore::Attachment::Ptr &attachment)
Saves the specified attachment to a file of the user's choice.
CalendarSupport::AttachmentHandler::AttachmentHandler
AttachmentHandler(QWidget *parent)
Constructs an AttachmentHandler.
Definition: attachmenthandler.cpp:66
CalendarSupport::AttachmentHandler::view
bool view(const KCalCore::Attachment::Ptr &attachment)
Launches a viewer on the specified attachment.
CalendarSupport::AttachmentHandler::~AttachmentHandler
~AttachmentHandler()
Definition: attachmenthandler.cpp:71
CalendarSupport::AttachmentHandler::viewFinished
void viewFinished(const QString &uid, const QString &attachmentName, bool success)
CalendarSupport::AttachmentHandler
Provides methods to handle incidence attachments.
Definition: attachmenthandler.h:48
CalendarSupport::AttachmentHandler::saveAsFinished
void saveAsFinished(const QString &uid, const QString &attachmentName, bool success)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

calendarsupport

Skip menu "calendarsupport"
  • 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