libkcal

period.h
1/*
2 This file is part of libkcal.
3
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#ifndef KCAL_PERIOD_H
22#define KCAL_PERIOD_H
23
24#include <tqdatetime.h>
25#include "libkcal_export.h"
26
27#include "duration.h"
28
29namespace KCal {
30
35class TDE_EXPORT Period
36{
37 public:
38 Period();
39 Period( const TQDateTime &start, const TQDateTime &end );
40 Period( const TQDateTime &start, const Duration &duration );
41
43 bool operator<( const Period& other );
44
53 bool operator==( const Period &other ) const;
54
61 bool operator!=( const Period &other ) const { return !operator==( other ); }
62
63 TQDateTime start() const;
64 TQDateTime end() const;
65 Duration duration();
66
67 bool hasDuration()const;
68
69 TQString summary() const;
70 void setSummary( const TQString &summary );
71 TQString location() const;
72 void setLocation( const TQString &location );
73
74 private:
75 TQDateTime mStart;
76 TQDateTime mEnd;
77
78 bool mHasDuration;
79 TQString mSummary;
80 TQString mLocation;
81
82 class Private;
83 Private *d;
84};
85
86}
87
88#endif
This class represents a duration.
Definition: duration.h:34
This class represents a period of time.
Definition: period.h:36
bool operator!=(const Period &other) const
Returns true if this period is not equal to the other one.
Definition: period.h:61
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38