summaryrefslogtreecommitdiffstats
path: root/korganizer/koeventviewer.h
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/koeventviewer.h')
-rw-r--r--korganizer/koeventviewer.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 80b1ef77..c4022d02 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -24,15 +24,13 @@
#ifndef KOEVENTVIEWER_H
#define KOEVENTVIEWER_H
-#include <tqtextbrowser.h>
#include <kdepimmacros.h>
-
#include <kconfig.h>
+#include <tqtextbrowser.h>
+
namespace KCal {
-class Incidence;
-class Todo;
-class Event;
-class Journal;
+ class Calendar;
+ class Incidence;
}
using namespace KCal;
@@ -41,18 +39,23 @@ using namespace KCal;
*/
class KDE_EXPORT KOEventViewer : public QTextBrowser
{
- Q_OBJECT
+ Q_OBJECT
public:
- KOEventViewer( TQWidget *parent = 0, const char *name = 0 );
+ explicit KOEventViewer( Calendar *calendar, TQWidget *parent = 0, const char *name = 0 );
virtual ~KOEventViewer();
/**
Reimplemented from TQTextBrowser to handle links.
*/
void setSource( const TQString & );
-
- virtual bool appendIncidence( Incidence * );
-
+
+ virtual bool appendIncidence( Incidence *incidence, const TQDate &date );
+
+ /**
+ Set the Calendar associated with this viewer.
+ */
+ void setCalendar ( Calendar *calendar );
+
/**
Clear viewer. If \a now is set to true delete view immediately. If set to
false delete it with next call to appendIncidence().
@@ -61,30 +64,35 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser
/**
Add given text to currently shown content.
- */
-
+ */
+
void addText( const TQString &text );
-
+
/**
- Set the default text that is showed when
+ Set the default text that is showed when
there aren't a incidence to show
*/
void setDefaultText( const TQString &text );
-
- void readSettings( KConfig *config);
- void writeSettings ( KConfig *config);
-
+
+ void readSettings( KConfig *config );
+ void writeSettings ( KConfig *config );
+
public slots:
/**
Show given incidence in viewer. Clear all previously shown incidences.
*/
- virtual void setIncidence( Incidence * );
- void changeIncidenceDisplay( Incidence *incidence, int action );
+ void setIncidence( Incidence *incidence, const TQDate &date );
+ void changeIncidenceDisplay( Incidence *incidence, const TQDate &date, int action );
+ void message( const TQString &link );
+ void contentsContextMenuEvent( TQContextMenuEvent * );
+
private:
+ Calendar *mCalendar;
Incidence *mIncidence;
TQTextBrowser *mEventTextView;
TQString mDefaultText;
TQString mText;
+ TQString mAttachLink;
};
#endif