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

KCalCore Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kcalcore
Functions | Variables
todo.cpp File Reference
#include "todo.h"
#include "visitor.h"
#include "recurrence.h"
#include <KDebug>
#include <QTime>
Include dependency graph for todo.cpp:

Go to the source code of this file.

Functions

 endUpdates ()
 
 if (recurs()&&!first)
 
 if (recurs()&&dtDue.isValid()&&(!dtStart().isValid()||dtDue< recurrence() ->startDateTime()))
 
 setFieldDirty (FieldDtDue)
 

Variables

else d mDtDue = dtDue
 

Detailed Description

This file is part of the API for handling calendar data and defines the Todo class.

Provides a To-do in the sense of RFC2445.

Author
Cornelius Schumacher <schum.nosp@m.ache.nosp@m.r@kde.nosp@m..org>
Allen Winter <winte.nosp@m.r@kd.nosp@m.e.org>

Definition in file todo.cpp.

Function Documentation

if ( recurs()&&!  first)

Private class that helps to provide binary compatibility between releases.

Todo::Todo() : d(new KCalCore::Todo::Private) { }

Todo::Todo(const Todo &other) : Incidence(other), d(new KCalCore::Todo::Private(*other.d)) { }

Todo::Todo(const Incidence &other) : Incidence(other) , d(new KCalCore::Todo::Private) { }

Todo::~Todo() { delete d; }

Todo *Todo::clone() const { return new Todo(*this); }

IncidenceBase &Todo::assign(const IncidenceBase &other) { if (&other != this) { Incidence::assign(other); const Todo t = static_cast<const Todo>(&other); d->init(*(t->d)); } return *this; }

bool Todo::equals(const IncidenceBase &todo) const { if (!Incidence::equals(todo)) { return false; } else { If they weren't the same type IncidenceBase::equals would had returned false already const Todo t = static_cast<const Todo>(&todo); return ((dtDue() == t->dtDue()) || (!dtDue().isValid() && !t->dtDue().isValid())) && hasDueDate() == t->hasDueDate() && hasStartDate() == t->hasStartDate() && ((completed() == t->completed()) || (!completed().isValid() && !t->completed().isValid())) && hasCompletedDate() == t->hasCompletedDate() && percentComplete() == t->percentComplete(); } }

Incidence::IncidenceType Todo::type() const { return TypeTodo; }

QByteArray Todo::typeStr() const { return "Todo"; } void Todo::setDtDue(const KDateTime &dtDue, bool first) { startUpdates();

int diffsecs = d->mDtDue.secsTo(dtDue);

/*if (mReadOnly) return;
const Alarm::List& alarms = alarms();
for (Alarm *alarm = alarms.first(); alarm; alarm = alarms.next()) {
  if (alarm->enabled()) {
    alarm->setTime(alarm->time().addSecs(diffsecs));
  }
} 

Definition at line 162 of file todo.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:36:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

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