summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
authorzautrix <zautrix>2005-02-02 10:58:10 (UTC)
committer zautrix <zautrix>2005-02-02 10:58:10 (UTC)
commitd2f6c50fb3b236e37aaa46ade819ab163f19868a (patch) (side-by-side diff)
tree02b2c7bbcd6d78140def0650fa4b440199e04ef7 /korganizer/koagendaitem.cpp
parent5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (diff)
downloadkdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.zip
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.gz
kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.bz2
qwt added
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp23
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
@@ -56,6 +56,20 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
//--------------------------------------------------------------------------
+class KOAgendaItemWhatsThis :public QWhatsThis
+{
+public:
+ KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { };
+
+protected:
+ virtual QString text( const QPoint& )
+ {
+ return _view->getWhatsThisText() ;
+ }
+private:
+ KOAgendaItem * _view;
+};
+
KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday,
const char *name,WFlags) :
QWidget(parent, name), mIncidence(incidence), mDate(qd)
@@ -63,6 +77,7 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
#endif
+ new KOAgendaItemWhatsThis(this);
int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase
setWFlags ( wflags);
mAllDay = allday;
@@ -72,7 +87,12 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
xPaintCoord = -1;
yPaintCoord = -1;
}
-
+QString KOAgendaItem::getWhatsThisText()
+{
+ if ( mIncidence )
+ return KIncidenceFormatter::instance()->getFormattedText( mIncidence );
+ return "KOAgendaItem::getWhatsThisText()::internal error";
+}
void KOAgendaItem::init ( Incidence *incidence, QDate qd )
{
mIncidence = incidence;
@@ -504,7 +524,6 @@ void KOAgendaItem::computeText()
}
QString tipText = mIncidence->summary();
- QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
if ( !mIncidence->doesFloat() ) {
if ( mIncidence->type() == "Event" ) {
if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) {