summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.h
Unidiff
Diffstat (limited to 'korganizer/koeventviewer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
new file mode 100644
index 0000000..74f1135
--- a/dev/null
+++ b/korganizer/koeventviewer.h
@@ -0,0 +1,73 @@
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/
19#ifndef KOEVENTVIEWER_H
20#define KOEVENTVIEWER_H
21//
22// Viewer widget for events.
23//
24
25#include <qtextbrowser.h>
26
27#include <libkcal/event.h>
28#include <libkcal/journal.h>
29
30
31using namespace KCal;
32
33class KOEventViewer : public QTextBrowser {
34 Q_OBJECT
35 public:
36 KOEventViewer(QWidget *parent=0,const char *name=0);
37 virtual ~KOEventViewer();
38
39 void setSource(const QString &);
40 void setEvent(Event *event);
41 void addEvent(Event *event);
42 void setTodo(Todo *event, bool clearV = true );
43 void setJournal(Journal *jour, bool clearV = true );
44
45 void appendEvent(Event *event, int mode = 0 );
46 void appendTodo(Todo *event, int mode = 0 );
47 void appendJournal(Journal *jour, int mode = 0 );
48
49 void clearEvents(bool now=false);
50
51 void addText(QString text);
52 void setSyncMode( bool );
53 void setColorMode( int );
54
55 protected:
56 int mColorMode;
57 void addTag(const QString & tag,const QString & text);
58
59 void formatCategories(Incidence *event);
60 void formatAttendees(Incidence *event);
61 void formatReadOnly(Incidence *event);
62
63 private:
64 QTextBrowser *mEventTextView;
65 bool mSyncMode;
66
67 QString mText;
68 Incidence* mCurrentIncidence;
69 signals:
70 void launchaddressbook(QString uid);
71};
72
73#endif