libkcal Library API Documentation

KCal::DndFactory Class Reference

This class implements functions to create Drag and Drop objects used for Drag-and-Drop and Copy-and-Paste. vCalendar/iCalendar Drag-and-Drop object factory. More...

#include <dndfactory.h>

List of all members.

Public Member Functions

 DndFactory (Calendar *)
ICalDragcreateDrag (Event *selectedEv, QWidget *owner)
 create an object to be used with the Xdnd Drag And Drop protocol.

ICalDragcreateDragTodo (Todo *selectedEv, QWidget *owner)
 create an object to be used with the Xdnd Drag And Drop protocol.

TodocreateDropTodo (QDropEvent *de)
 Create Todo object from drop event.

EventcreateDrop (QDropEvent *de)
 Create Event object from drop event.

void cutEvent (Event *)
 cut event to clipboard

bool copyEvent (Event *)
 cut, copy, and paste operations follow.

EventpasteEvent (const QDate &, const QTime *newTime=0L)
 pastes the event and returns a pointer to the new event pasted.


Detailed Description

This class implements functions to create Drag and Drop objects used for Drag-and-Drop and Copy-and-Paste. vCalendar/iCalendar Drag-and-Drop object factory.

Definition at line 37 of file dndfactory.h.


Member Function Documentation

ICalDrag * DndFactory::createDrag Event selectedEv,
QWidget owner
 

create an object to be used with the Xdnd Drag And Drop protocol.

Definition at line 46 of file dndfactory.cpp.

References KCal::CalendarLocal::addEvent(), KCal::Calendar::getTimeZoneStr(), and KCal::Calendar::setTimeZone().

ICalDrag * DndFactory::createDragTodo Todo selectedEv,
QWidget owner
 

create an object to be used with the Xdnd Drag And Drop protocol.

Definition at line 58 of file dndfactory.cpp.

References KCal::CalendarLocal::addTodo(), KCal::Calendar::getTimeZoneStr(), and KCal::Calendar::setTimeZone().

Todo * DndFactory::createDropTodo QDropEvent de  ) 
 

Create Todo object from drop event.

Definition at line 90 of file dndfactory.cpp.

References QDropEvent::accept(), QPtrList::first(), KCal::Calendar::getTimeZoneStr(), QPtrList::isEmpty(), KCal::Calendar::setTimeZone(), and KCal::CalendarLocal::todos().

Event * DndFactory::createDrop QDropEvent de  ) 
 

Create Event object from drop event.

Definition at line 70 of file dndfactory.cpp.

References QDropEvent::accept(), KCal::Calendar::events(), QPtrList::first(), KCal::Calendar::getTimeZoneStr(), QPtrList::isEmpty(), and KCal::Calendar::setTimeZone().

void DndFactory::cutEvent Event  ) 
 

cut event to clipboard

Definition at line 111 of file dndfactory.cpp.

References copyEvent(), and KCal::Calendar::deleteEvent().

bool DndFactory::copyEvent Event  ) 
 

cut, copy, and paste operations follow.

Definition at line 118 of file dndfactory.cpp.

References KCal::CalendarLocal::addEvent(), QApplication::clipboard(), KCal::Calendar::getTimeZoneStr(), QClipboard::setData(), and KCal::Calendar::setTimeZone().

Referenced by cutEvent().

Event * DndFactory::pasteEvent const QDate ,
const QTime newTime = 0L
 

pastes the event and returns a pointer to the new event pasted.

Definition at line 131 of file dndfactory.cpp.

References QDate::addDays(), KCal::Calendar::addEvent(), QApplication::clipboard(), QClipboard::data(), QDateTime::date(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), KCal::Calendar::events(), QPtrList::first(), KCal::Incidence::recreate(), KCal::Event::setDtEnd(), KCal::Incidence::setDtStart(), QDateTime::time(), and KCal::CalendarLocal::todos().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:28 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001