~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kalarm/akonadi/kaeventformatter.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  kaeventformatter.h  -  converts KAEvent properties to text
 
3
 *  Program:  kalarm
 
4
 *  Copyright © 2010 by David Jarvie <djarvie@kde.org>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program 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
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License along
 
17
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 
18
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef KAEVENTFORMATTER_H
 
22
#define KAEVENTFORMATTER_H
 
23
 
 
24
#include "kaevent.h"
 
25
 
 
26
#include <QString>
 
27
 
 
28
class KAEvent;
 
29
 
 
30
class KAEventFormatter
 
31
{
 
32
    public:
 
33
        // KAEvent parameter identifiers.
 
34
        // Note that parameters stored in Akonadi attributes are not included.
 
35
        enum Parameter
 
36
        {
 
37
            Id,
 
38
            AlarmType,
 
39
            AlarmCategory,
 
40
            TemplateName,
 
41
            CreatedTime,
 
42
            StartTime,
 
43
            TemplateAfterTime,
 
44
            Recurs,             // does the event recur?
 
45
            Recurrence,
 
46
            NextRecurrence,     // next alarm time excluding repetitions, including reminder/deferral
 
47
            SubRepetition,      // is there a sub-repetition?
 
48
            RepeatInterval,
 
49
            RepeatCount,
 
50
            NextRepetition,     // next repetition count
 
51
            LateCancel,
 
52
            AutoClose,
 
53
            WorkTimeOnly,
 
54
            HolidaysExcluded,
 
55
            CopyKOrganizer,
 
56
            Enabled,
 
57
            Archive,
 
58
#ifdef __GNUC__
 
59
#warning ReadOnly, custom properties
 
60
#endif
 
61
            Revision,
 
62
        
 
63
            MessageText,
 
64
            MessageFile,
 
65
            FgColour,
 
66
            BgColour,
 
67
            Font,
 
68
            PreAction,
 
69
            PreActionCancel,
 
70
            PreActionNoError,
 
71
            PostAction,
 
72
            ConfirmAck,
 
73
            KMailSerial,
 
74
            Sound,
 
75
            SoundRepeat,
 
76
            SoundVolume,
 
77
            SoundFadeVolume,
 
78
            SoundFadeTime,
 
79
            Reminder,
 
80
            ReminderOnce,
 
81
            DeferralType,
 
82
            DeferralTime,
 
83
            DeferDefault,
 
84
            DeferDefaultDate,
 
85
        
 
86
            Command,
 
87
            LogFile,
 
88
            CommandXTerm,
 
89
        
 
90
            EmailSubject,
 
91
            EmailFromId,
 
92
            EmailTo,
 
93
            EmailBcc,
 
94
            EmailBody,
 
95
            EmailAttachments
 
96
            
 
97
        };
 
98
 
 
99
        KAEventFormatter() {}
 
100
        KAEventFormatter(const KAEvent& e, bool falseForUnspecified);
 
101
        bool           isApplicable(Parameter) const;
 
102
        QString        value(Parameter) const;
 
103
        const KAEvent& event() const   { return mEvent; }
 
104
        static QString label(Parameter);
 
105
 
 
106
    private:
 
107
        KAEvent mEvent;
 
108
        QString mUnspecifiedValue;
 
109
};
 
110
 
 
111
#endif // KAEVENTFORMATTER_H
 
112
 
 
113
// vim: et sw=4: