• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

KCalUtils Library

  • KCalUtils
  • DndFactory
Public Types | Public Member Functions | Static Public Member Functions
KCalUtils::DndFactory Class Reference

#include <dndfactory.h>

List of all members.

Public Types

enum  PasteFlag { FlagTodosPasteAtDtStart = 1 }

Public Member Functions

 DndFactory (const KCalCore::MemoryCalendar::Ptr &cal)
bool copyIncidence (const KCalCore::Incidence::Ptr &)
bool copyIncidences (const KCalCore::Incidence::List &incidences)
QDrag * createDrag (QWidget *owner)
QDrag * createDrag (const KCalCore::Incidence::Ptr &incidence, QWidget *owner)
KCalCore::MemoryCalendar::Ptr createDropCalendar (QDropEvent *de)
KCalCore::MemoryCalendar::Ptr createDropCalendar (const QMimeData *md)
KCalCore::Event::Ptr createDropEvent (const QMimeData *md)
KCalCore::Event::Ptr createDropEvent (QDropEvent *de)
KCalCore::Todo::Ptr createDropTodo (const QMimeData *md)
KCalCore::Todo::Ptr createDropTodo (QDropEvent *de)
QMimeData * createMimeData ()
QMimeData * createMimeData (const KCalCore::Incidence::Ptr &incidence)
void cutIncidence (const KCalCore::Incidence::Ptr &)
bool cutIncidences (const KCalCore::Incidence::List &incidences)
KCalCore::Incidence::Ptr pasteIncidence (const KDateTime &newDateTime=KDateTime(), const QFlags< PasteFlag > &pasteOptions=QFlags< PasteFlag >())
KCalCore::Incidence::List pasteIncidences (const KDateTime &newDateTime=KDateTime(), const QFlags< PasteFlag > &pasteOptions=QFlags< PasteFlag >())

Static Public Member Functions

static
KCalCore::MemoryCalendar::Ptr 
createDropCalendar (const QMimeData *md, const KDateTime::Spec &timeSpec)

Detailed Description

vCalendar/iCalendar Drag-and-Drop object factory.

This class implements functions to create Drag and Drop objects used for Drag-and-Drop and Copy-and-Paste.

Definition at line 58 of file dndfactory.h.


Member Enumeration Documentation

enum KCalUtils::DndFactory::PasteFlag
Enumerator:
FlagTodosPasteAtDtStart 

If the cloned incidence is a to-do, the date/time passed to DndFactory::pasteIncidence() will change dtStart if this flag is on, changes dtDue otherwise.

Definition at line 62 of file dndfactory.h.


Constructor & Destructor Documentation

DndFactory::DndFactory ( const KCalCore::MemoryCalendar::Ptr &  cal) [explicit]

Private class that helps to provide binary compatibility between releases.

Definition at line 119 of file dndfactory.cpp.


Member Function Documentation

bool DndFactory::copyIncidence ( const KCalCore::Incidence::Ptr &  selectedInc)

Copy the incidence to clipboard/.

Definition at line 304 of file dndfactory.cpp.

bool DndFactory::copyIncidences ( const KCalCore::Incidence::List &  incidences)

Copies a list of incidences to the clipboard.

Definition at line 278 of file dndfactory.cpp.

QDrag * DndFactory::createDrag ( QWidget *  owner)

Create a drag object for the whole calendar.

Definition at line 139 of file dndfactory.cpp.

QDrag * DndFactory::createDrag ( const KCalCore::Incidence::Ptr &  incidence,
QWidget *  owner 
)

Create a drag object for a single incidence.

Definition at line 168 of file dndfactory.cpp.

MemoryCalendar::Ptr DndFactory::createDropCalendar ( QDropEvent *  de)

Create the calendar that is contained in the drop event's data.

Definition at line 195 of file dndfactory.cpp.

MemoryCalendar::Ptr DndFactory::createDropCalendar ( const QMimeData *  md)

Create the calendar that is contained in the mime data.

Definition at line 177 of file dndfactory.cpp.

MemoryCalendar::Ptr DndFactory::createDropCalendar ( const QMimeData *  md,
const KDateTime::Spec &  timeSpec 
) [static]

Create the calendar that is contained in the mime data.

Definition at line 182 of file dndfactory.cpp.

Event::Ptr DndFactory::createDropEvent ( const QMimeData *  md)

Create Event object from mime data.

Definition at line 205 of file dndfactory.cpp.

Event::Ptr DndFactory::createDropEvent ( QDropEvent *  de)

Create Event object from drop event.

Definition at line 220 of file dndfactory.cpp.

Todo::Ptr DndFactory::createDropTodo ( const QMimeData *  md)

Create Todo object from mime data.

Definition at line 231 of file dndfactory.cpp.

Todo::Ptr DndFactory::createDropTodo ( QDropEvent *  de)

Create Todo object from drop event.

Definition at line 247 of file dndfactory.cpp.

QMimeData * DndFactory::createMimeData ( )

Create the mime data for the whole calendar.

Definition at line 129 of file dndfactory.cpp.

QMimeData * DndFactory::createMimeData ( const KCalCore::Incidence::Ptr &  incidence)

Create the mime data for a single incidence.

Definition at line 147 of file dndfactory.cpp.

void DndFactory::cutIncidence ( const KCalCore::Incidence::Ptr &  selectedIncidence)

Cut the incidence to the clipboard.

Definition at line 258 of file dndfactory.cpp.

bool DndFactory::cutIncidences ( const KCalCore::Incidence::List &  incidences)

Cuts a list of incidences to the clipboard.

Definition at line 265 of file dndfactory.cpp.

Incidence::Ptr DndFactory::pasteIncidence ( const KDateTime &  newDateTime = KDateTime(),
const QFlags< PasteFlag > &  pasteOptions = QFlags<PasteFlag>() 
)

This function clones the incidence that's in the clipboard and sets the clone's date/time to the specified newDateTime.

Parameters:
newDateTimeThe new date/time that the incidence will have. If it's an event or journal, DTSTART will be set. If it's a to-do, DTDUE is set. If you wish another behaviour, like changing DTSTART on to-dos, specify pasteOptions. If newDateTime is invalid the original incidence's dateTime will be used, regardless of pasteOptions.
pasteOptionsControl how newDateTime changes the incidence's dates.
See also:
PasteFlag.
Returns:
A pointer to the cloned incidence.

Definition at line 354 of file dndfactory.cpp.

Incidence::List DndFactory::pasteIncidences ( const KDateTime &  newDateTime = KDateTime(),
const QFlags< PasteFlag > &  pasteOptions = QFlags<PasteFlag>() 
)

This function clones the incidences that are in the clipboard and sets the clone's date/time to the specified newDateTime.

See also:
pasteIncidence()

Definition at line 311 of file dndfactory.cpp.


The documentation for this class was generated from the following files:
  • dndfactory.h
  • dndfactory.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:58:47 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalUtils Library

Skip menu "KCalUtils Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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