-rw-r--r-- | korganizer/koagendaitem.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 5f9ed92..df7d612 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -58,2 +58,16 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; | |||
58 | 58 | ||
59 | class KOAgendaItemWhatsThis :public QWhatsThis | ||
60 | { | ||
61 | public: | ||
62 | KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; | ||
63 | |||
64 | protected: | ||
65 | virtual QString text( const QPoint& ) | ||
66 | { | ||
67 | return _view->getWhatsThisText() ; | ||
68 | } | ||
69 | private: | ||
70 | KOAgendaItem * _view; | ||
71 | }; | ||
72 | |||
59 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, | 73 | KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, |
@@ -65,2 +79,3 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool | |||
65 | #endif | 79 | #endif |
80 | new KOAgendaItemWhatsThis(this); | ||
66 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase | 81 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase |
@@ -74,3 +89,8 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool | |||
74 | } | 89 | } |
75 | 90 | QString KOAgendaItem::getWhatsThisText() | |
91 | { | ||
92 | if ( mIncidence ) | ||
93 | return KIncidenceFormatter::instance()->getFormattedText( mIncidence ); | ||
94 | return "KOAgendaItem::getWhatsThisText()::internal error"; | ||
95 | } | ||
76 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | 96 | void KOAgendaItem::init ( Incidence *incidence, QDate qd ) |
@@ -506,3 +526,2 @@ void KOAgendaItem::computeText() | |||
506 | QString tipText = mIncidence->summary(); | 526 | QString tipText = mIncidence->summary(); |
507 | QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); | ||
508 | if ( !mIncidence->doesFloat() ) { | 527 | if ( !mIncidence->doesFloat() ) { |