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

KAlarm Library

repetition.h
00001 /*
00002  *  repetition.h  -  represents a sub-repetition: interval and count
00003  *  This file is part of kalarmcal library, which provides access to KAlarm
00004  *  calendar data.
00005  *  Copyright © 2009-2012 by David Jarvie <djarvie@kde.org>
00006  *
00007  *  This library is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU Library General Public License as published
00009  *  by the Free Software Foundation; either version 2 of the License, or (at
00010  *  your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful, but WITHOUT
00013  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00015  *  License for more details.
00016  *
00017  *  You should have received a copy of the GNU Library General Public License
00018  *  along with this library; see the file COPYING.LIB.  If not, write to the
00019  *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00020  *  MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef KALARM_REPETITION_H
00024 #define KALARM_REPETITION_H
00025 
00026 #include "kalarmcal_export.h"
00027 #ifndef KALARMCAL_USE_KRESOURCES
00028 #include <kcalcore/duration.h>
00029 #else
00030 #include <kcal/duration.h>
00031 #endif
00032 
00033 class KDateTime;
00034 
00035 namespace KAlarmCal
00036 {
00037 
00047 class KALARMCAL_EXPORT Repetition
00048 {
00049     public:
00053         Repetition();
00054 
00055 #ifndef KALARMCAL_USE_KRESOURCES
00056 
00059         Repetition(const KCalCore::Duration& interval, int count);
00060 #else
00061 
00064         Repetition(const KCal::Duration& interval, int count);
00065 #endif
00066 
00067         Repetition(const Repetition& other);
00068 
00069         ~Repetition();
00070 
00071         Repetition& operator=(const Repetition& other);
00072 
00073 #ifndef KALARMCAL_USE_KRESOURCES
00074 
00075         void set(const KCalCore::Duration& interval, int count);
00076 #else
00077 
00078         void set(const KCal::Duration& interval, int count);
00079 #endif
00080 
00081 #ifndef KALARMCAL_USE_KRESOURCES
00082 
00086         void set(const KCalCore::Duration& interval);
00087 #else
00088 
00092         void set(const KCal::Duration& interval);
00093 #endif
00094 
00098         operator bool() const;
00099 
00103         bool operator!() const                      { return !operator bool(); }
00104 
00105         bool operator==(const Repetition& r) const;
00106         bool operator!=(const Repetition& r) const  { return !operator==(r); }
00107 
00109         int count() const;
00110 
00111 #ifndef KALARMCAL_USE_KRESOURCES
00112 
00113         KCalCore::Duration interval() const;
00114 
00116         KCalCore::Duration duration() const;
00117 
00121         KCalCore::Duration duration(int count) const;
00122 #else
00123 
00124         KCal::Duration interval() const;
00125 
00127         KCal::Duration duration() const;
00128 
00132         KCal::Duration duration(int count) const;
00133 #endif
00134 
00136         bool isDaily() const;
00137 
00141         int intervalDays() const;
00142 
00146         int intervalMinutes() const;
00147 
00149         int intervalSeconds() const;
00150 
00155         int nextRepeatCount(const KDateTime& from, const KDateTime& preDateTime) const;
00156 
00161         int previousRepeatCount(const KDateTime& from, const KDateTime& afterDateTime) const;
00162 
00163     private:
00164         //@cond PRIVATE
00165         class Private;
00166         Private* const d;
00167         //@endcond
00168 };
00169 
00170 } // namespace KAlarmCal
00171 
00172 #endif // KALARM_REPETITION_H
00173 
00174 // vim: et sw=4:
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:50:08 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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