KCalendarCore

todo.cpp File Reference
#include "incidence_p.h"
#include "todo.h"
#include "recurrence.h"
#include "utils_p.h"
#include "visitor.h"
#include "kcalendarcore_debug.h"
#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()))
 
 Q_D (Todo)
 

Variables

 else
 

Detailed Description

Provides a To-do in the sense of RFC2445.

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

Author
Cornelius Schumacher <schum[email protected]ache[email protected][email protected][email protected].org>
Allen Winter <winte[email protected][email protected][email protected]e.org>

Definition in file todo.cpp.

Function Documentation

◆ Q_D()

Q_D ( Todo  )

Private class that helps to provide binary compatibility between releases.

Todo::Todo() : Incidence(new TodoPrivate()) { }

Todo::Todo(const Todo &other) : Incidence(other, new TodoPrivate(*(other.d_func()))) { }

Todo::Todo(const Incidence &other) : Incidence(other, new TodoPrivate(other)) { }

Todo::~Todo() = default;

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

IncidenceBase &Todo::assign(const IncidenceBase &other) { Q_D(Todo); if (&other != this) { Incidence::assign(other); const Todo *t = static_cast<const Todo *>(&other); d->init(*(t->d_func())); } 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 identical(dtDue(), t->dtDue()) && 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 QByteArrayLiteral("Todo"); }

void Todo::setDtDue(const QDateTime &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));
  }
}

Variable Documentation

◆ else

else
Initial value:
{
d->setDtDue(dtDue)

Definition at line 221 of file todo.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Dec 8 2022 03:57:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.