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

KCal Library

  • kcal
freebusy.h
Go to the documentation of this file.
1/*
2 This file is part of the kcal library.
3
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
30
31#ifndef KCAL_FREEBUSY_H
32#define KCAL_FREEBUSY_H
33
34#include "incidencebase.h"
35#include "event.h"
36#include "freebusyperiod.h"
37
38#include <QtCore/QByteArray>
39
40namespace KCal {
41
42class Calendar;
43
50class KCAL_DEPRECATED_EXPORT FreeBusy : public IncidenceBase
51{
52 public:
56 FreeBusy();
57
62 FreeBusy( const FreeBusy &other );
63
69 explicit FreeBusy( const Period::List &busyPeriods );
70
76 explicit FreeBusy( const FreeBusyPeriod::List &busyPeriods );
77
84 FreeBusy( const KDateTime &start, const KDateTime &end );
85
93 FreeBusy( Calendar *calendar, const KDateTime &start, const KDateTime &end );
94
103 FreeBusy( const Event::List &events, const KDateTime &start, const KDateTime &end );
104
108 ~FreeBusy();
109
114 QByteArray type() const;
115
120 //KDE5: QString typeStr() const;
121
129 virtual void setDtStart( const KDateTime &start );
130
138 void setDtEnd( const KDateTime &end );
139
145 virtual KDateTime dtEnd() const;
146
151 virtual void shiftTimes( const KDateTime::Spec &oldSpec,
152 const KDateTime::Spec &newSpec );
153
157 Period::List busyPeriods() const;
158
162 FreeBusyPeriod::List fullBusyPeriods() const;
163
170 void addPeriod( const KDateTime &start, const KDateTime &end );
171
178 void addPeriod( const KDateTime &start, const Duration &duration );
179
187 void addPeriods( const Period::List &list );
188
196 void addPeriods( const FreeBusyPeriod::List &list );
197
201 void sortList();
202
208 void merge( FreeBusy *freebusy );
209
213 FreeBusy &operator=( const FreeBusy &other );
214
220 bool operator==( const FreeBusy &freebusy ) const;
221
222 private:
227 bool accept( Visitor &v ) { return v.visit( this ); }
228
229 //@cond PRIVATE
230 class Private;
231 Private *const d;
232 //@endcond
233};
234
235}
236
237#endif
KCal::Calendar
Represents the main calendar class.
Definition calendar.h:121
KCal::Duration
Represents a span of time measured in seconds or days.
Definition duration.h:53
KCal::Event::List
ListBase< Event > List
List of events.
Definition event.h:55
KCal::FreeBusyPeriod::List
QList< FreeBusyPeriod > List
List of periods.
Definition freebusyperiod.h:54
KCal::FreeBusy::merge
void merge(FreeBusy *freebusy)
Merges another free/busy into this free/busy.
Definition freebusy.cpp:292
KCal::FreeBusy::dtEnd
virtual KDateTime dtEnd() const
Returns the end datetime for the free/busy.
Definition freebusy.cpp:239
KCal::FreeBusy::busyPeriods
Period::List busyPeriods() const
Returns the list of all periods within the free/busy.
Definition freebusy.cpp:244
KCal::FreeBusy::sortList
void sortList()
Sorts the list of free/busy periods into ascending order.
Definition freebusy.cpp:260
KCal::FreeBusy::fullBusyPeriods
FreeBusyPeriod::List fullBusyPeriods() const
Returns the list of all periods within the free/busy.
Definition freebusy.cpp:255
KCal::FreeBusy::addPeriods
void addPeriods(const Period::List &list)
Adds a list of periods to the freebusy object and then sorts that list.
Definition freebusy.cpp:266
KCal::FreeBusy::setDtEnd
void setDtEnd(const KDateTime &end)
Sets the end datetime for the free/busy.
Definition freebusy.cpp:234
KCal::FreeBusy::type
QByteArray type() const
Definition freebusy.cpp:217
KCal::FreeBusy::operator==
bool operator==(const FreeBusy &freebusy) const
Compare this with freebusy for equality.
Definition freebusy.cpp:335
KCal::FreeBusy::FreeBusy
FreeBusy()
Constructs an free/busy without any periods.
Definition freebusy.cpp:76
KCal::FreeBusy::setDtStart
virtual void setDtStart(const KDateTime &start)
Definition freebusy.cpp:228
KCal::FreeBusy::operator=
FreeBusy & operator=(const FreeBusy &other)
Assignment operator.
Definition freebusy.cpp:323
KCal::FreeBusy::shiftTimes
virtual void shiftTimes(const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
Definition freebusy.cpp:310
KCal::FreeBusy::addPeriod
void addPeriod(const KDateTime &start, const KDateTime &end)
Adds a period to the freebusy list and sorts the list.
Definition freebusy.cpp:280
KCal::IncidenceBase::Visitor
This class provides the interface for a visitor of calendar components.
Definition incidencebase.h:113
KCal::IncidenceBase::Visitor::visit
virtual bool visit(Event *event)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
Definition incidencebase.cpp:513
KCal::IncidenceBase::duration
Duration duration() const
Returns the length of the incidence duration.
Definition incidencebase.cpp:448
KCal::IncidenceBase::IncidenceBase
IncidenceBase()
Constructs an empty IncidenceBase.
Definition incidencebase.cpp:111
KCal::Period::List
QList< Period > List
List of periods.
Definition period.h:53
event.h
This file is part of the API for handling calendar data and defines the Event class.
freebusyperiod.h
This file is part of the API for handling calendar data and defines the Period class.
incidencebase.h
This file is part of the API for handling calendar data and defines the IncidenceBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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
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