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

KAlarm Library

  • kalarmcal
repetition.h
1/*
2 * repetition.h - represents a sub-repetition: interval and count
3 * This file is part of kalarmcal library, which provides access to KAlarm
4 * calendar data.
5 * Copyright © 2009-2012 by David Jarvie <djarvie@kde.org>
6 *
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Library General Public License as published
9 * by the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 * 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 the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
21 */
22
23#ifndef KALARM_REPETITION_H
24#define KALARM_REPETITION_H
25
26#include "kalarmcal_export.h"
27#ifndef KALARMCAL_USE_KRESOURCES
28#include <kcalcore/duration.h>
29#else
30#include <kcal/duration.h>
31#endif
32
33class KDateTime;
34
35namespace KAlarmCal
36{
37
47class KALARMCAL_EXPORT Repetition
48{
49 public:
53 Repetition();
54
55#ifndef KALARMCAL_USE_KRESOURCES
59 Repetition(const KCalCore::Duration& interval, int count);
60#else
64 Repetition(const KCal::Duration& interval, int count);
65#endif
66
67 Repetition(const Repetition& other);
68
69 ~Repetition();
70
71 Repetition& operator=(const Repetition& other);
72
73#ifndef KALARMCAL_USE_KRESOURCES
75 void set(const KCalCore::Duration& interval, int count);
76#else
78 void set(const KCal::Duration& interval, int count);
79#endif
80
81#ifndef KALARMCAL_USE_KRESOURCES
86 void set(const KCalCore::Duration& interval);
87#else
92 void set(const KCal::Duration& interval);
93#endif
94
98 operator bool() const;
99
103 bool operator!() const { return !operator bool(); }
104
105 bool operator==(const Repetition& r) const;
106 bool operator!=(const Repetition& r) const { return !operator==(r); }
107
109 int count() const;
110
111#ifndef KALARMCAL_USE_KRESOURCES
113 KCalCore::Duration interval() const;
114
116 KCalCore::Duration duration() const;
117
121 KCalCore::Duration duration(int count) const;
122#else
124 KCal::Duration interval() const;
125
127 KCal::Duration duration() const;
128
132 KCal::Duration duration(int count) const;
133#endif
134
136 bool isDaily() const;
137
141 int intervalDays() const;
142
146 int intervalMinutes() const;
147
149 int intervalSeconds() const;
150
155 int nextRepeatCount(const KDateTime& from, const KDateTime& preDateTime) const;
156
161 int previousRepeatCount(const KDateTime& from, const KDateTime& afterDateTime) const;
162
163 private:
164 //@cond PRIVATE
165 class Private;
166 Private* const d;
167 //@endcond
168};
169
170} // namespace KAlarmCal
171
172#endif // KALARM_REPETITION_H
173
174// vim: et sw=4:
KAlarmCal::Repetition
Represents a sub-repetition, defined by interval and repeat count.
Definition: repetition.h:48
KAlarmCal::Repetition::operator!
bool operator!() const
Returns whether no repetition is defined.
Definition: repetition.h:103
KCalCore::Duration
duration.h
operator!=
bool operator!=(const location &loc1, const location &loc2)
operator==
bool operator==(const location &loc1, const location &loc2)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KAlarm Library

Skip menu "KAlarm Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • 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