• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

alarm.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the kcal library.
00003 
00004   Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
00005   Copyright (c) 2003 David Jarvie <software@astrojar.org.uk>
00006 
00007   This library is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU Library General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This library is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   Library General Public 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
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00030 #ifndef KCAL_ALARM_H
00031 #define KCAL_ALARM_H
00032 
00033 #include <QtCore/QString>
00034 #include <QtCore/QStringList>
00035 #include <QtCore/QList>
00036 
00037 #include <kdatetime.h>
00038 
00039 #include "customproperties.h"
00040 #include "duration.h"
00041 #include "person.h"
00042 #include "listbase.h"
00043 #include "kcal_export.h"
00044 
00045 namespace KCal {
00046 
00047 class Incidence;
00048 
00059 class KCAL_EXPORT Alarm : public CustomProperties
00060 {
00061   public:
00065     enum Type {
00066       Invalid,   
00067       Display,   
00068       Procedure, 
00069       Email,     
00070       Audio      
00071     };
00072 
00076     typedef ListBase<Alarm> List;
00077 
00083     explicit Alarm( Incidence *parent );
00084 
00089     Alarm( const Alarm &other );
00090 
00094     virtual ~Alarm();
00095 
00100     bool operator==( const Alarm &a ) const;
00101 
00107     bool operator!=( const Alarm &a ) const { return !operator==( a ); }
00108 
00116     void setParent( Incidence *parent );
00117 
00123     Incidence *parent() const;
00124 
00134     void setType( Type type );
00135 
00141     Type type() const;
00142 
00152     void setDisplayAlarm( const QString &text = QString() );
00153 
00162     void setText( const QString &text );
00163 
00170     QString text() const;
00171 
00181     void setAudioAlarm( const QString &audioFile = QString() );
00182 
00192     void setAudioFile( const QString &audioFile );
00193 
00200     QString audioFile() const;
00201 
00213     void setProcedureAlarm( const QString &programFile,
00214                             const QString &arguments = QString() );
00215 
00226     void setProgramFile( const QString &programFile );
00227 
00235     QString programFile() const;
00236 
00246     void setProgramArguments( const QString &arguments );
00247 
00255     QString programArguments() const;
00256 
00271     void setEmailAlarm( const QString &subject, const QString &text,
00272                         const QList<Person> &addressees,
00273                         const QStringList &attachments = QStringList() );
00274 
00285     void setMailAddress( const Person &mailAlarmAddress );
00286 
00297     void setMailAddresses( const QList<Person> &mailAlarmAddresses );
00298 
00309     void addMailAddress( const Person &mailAlarmAddress );
00310 
00317     QList<Person> mailAddresses() const;
00318 
00329     void setMailSubject( const QString &mailAlarmSubject );
00330 
00337     QString mailSubject() const;
00338 
00349     void setMailAttachment( const QString &mailAttachFile );
00350 
00361     void setMailAttachments( const QStringList &mailAttachFiles );
00362 
00372     void addMailAttachment( const QString &mailAttachFile );
00373 
00380     QStringList mailAttachments() const;
00381 
00392     void setMailText( const QString &text );
00393 
00400     QString mailText() const;
00401 
00409     void setTime( const KDateTime &alarmTime );
00410 
00416     KDateTime time() const;
00417 
00424     KDateTime endTime() const;
00425 
00429     bool hasTime() const;
00430 
00439     void setStartOffset( const Duration &offset );
00440 
00448     Duration startOffset() const;
00449 
00456     bool hasStartOffset() const;
00457 
00466     void setEndOffset( const Duration &offset );
00467 
00475     Duration endOffset() const;
00476 
00483     bool hasEndOffset() const;
00484 
00499     void shiftTimes( const KDateTime::Spec &oldSpec,
00500                      const KDateTime::Spec &newSpec );
00501 
00509     void setSnoozeTime( const Duration &alarmSnoozeTime );
00510 
00516     Duration snoozeTime() const;
00517 
00527     void setRepeatCount( int alarmRepeatCount );
00528 
00534     int repeatCount() const;
00535 
00547     KDateTime nextRepetition( const KDateTime &preTime ) const;
00548 
00562     KDateTime previousRepetition( const KDateTime &afterTime ) const;
00563 
00568     Duration duration() const;
00569 
00576     void toggleAlarm();
00577 
00585     void setEnabled( bool enable );
00586 
00592     bool enabled() const;
00593 
00594   protected:
00599     virtual void customPropertyUpdated();
00600 
00601   private:
00602     //@cond PRIVATE
00603     class Private;
00604     Private *const d;
00605     //@endcond
00606 };
00607 
00608 }
00609 
00610 #endif

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal