summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.h
blob: 6165a9fa894bd270e4cf5b0b870c7fae0b0a4870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef KINCIDENCENFORMATTER_H
#define KINCIDENCENFORMATTER_H

#include <qstring.h>
#include <qobject.h>

#include "incidence.h"
#include "event.h"
#include "todo.h"
#include "journal.h"

using namespace KCal;

class KIncidenceFormatter : public QObject
{
  public:
    static KIncidenceFormatter* instance();
    KIncidenceFormatter();
    ~KIncidenceFormatter();
    QString getFormattedText( Incidence * inc );
 
    void setEvent(Event *event);
    void setTodo(Todo *event );
    void setJournal(Journal*  );

  protected:
    int mColorMode;
    void addTag(const QString & tag,const QString & text);

    void formatCategories(Incidence *event);
    void formatAttendees(Incidence *event);
    void formatReadOnly(Incidence *event);

  private:
    bool mSyncMode;

    QString mText;
    Incidence* mCurrentIncidence; 
    static KIncidenceFormatter* mInstance; 
};

#endif