From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch * Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korganizer/koeventviewer.h | 50 +++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'korganizer/koeventviewer.h') 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 #include - #include +#include + 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 -- cgit v1.2.3