korganizer

koeventviewer.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@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
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef KOEVENTVIEWER_H
25 #define KOEVENTVIEWER_H
26 
27 #include <tdemacros.h>
28 #include <tdeconfig.h>
29 #include <tqtextbrowser.h>
30 
31 namespace KCal {
32  class Calendar;
33  class Incidence;
34 }
35 using namespace KCal;
36 
40 class TDE_EXPORT KOEventViewer : public TQTextBrowser
41 {
42  TQ_OBJECT
43 
44  public:
45  explicit KOEventViewer( Calendar *calendar, TQWidget *parent = 0, const char *name = 0 );
46  virtual ~KOEventViewer();
47 
51  void setSource( const TQString & );
52 
53  virtual bool appendIncidence( Incidence *incidence, const TQDate &date );
54 
58  void setCalendar ( Calendar *calendar );
59 
64  void clearEvents( bool now = false );
65 
70  void addText( const TQString &text );
71 
76  void setDefaultText( const TQString &text );
77 
78  void readSettings( TDEConfig *config );
79  void writeSettings ( TDEConfig *config );
80 
81  public slots:
85  void setIncidence( Incidence *incidence, const TQDate &date );
86  void changeIncidenceDisplay( Incidence *incidence, const TQDate &date, int action );
87  void message( const TQString &link );
88  void contentsContextMenuEvent( TQContextMenuEvent * );
89 
90  private:
91  Calendar *mCalendar;
92  Incidence *mIncidence;
93  TQTextBrowser *mEventTextView;
94  TQString mDefaultText;
95  TQString mText;
96  TQString mAttachLink;
97 };
98 
99 #endif
Viewer widget for events.
Definition: koeventviewer.h:41