-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 | |||
@@ -57,4 +57,18 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; | |||
57 | //-------------------------------------------------------------------------- | 57 | //-------------------------------------------------------------------------- |
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, |
60 | const char *name,WFlags) : | 74 | const char *name,WFlags) : |
@@ -64,4 +78,5 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool | |||
64 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); | 78 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); |
65 | #endif | 79 | #endif |
80 | new KOAgendaItemWhatsThis(this); | ||
66 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase | 81 | int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase |
67 | setWFlags ( wflags); | 82 | setWFlags ( wflags); |
@@ -73,5 +88,10 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool | |||
73 | yPaintCoord = -1; | 88 | yPaintCoord = -1; |
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 ) |
77 | { | 97 | { |
@@ -505,5 +525,4 @@ void KOAgendaItem::computeText() | |||
505 | 525 | ||
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() ) { |
509 | if ( mIncidence->type() == "Event" ) { | 528 | if ( mIncidence->type() == "Event" ) { |