summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index da8b4bc..c5b9a21 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -24,6 +24,7 @@
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qheader.h> 25#include <qheader.h>
26#include <qcursor.h> 26#include <qcursor.h>
27#include <qwhatsthis.h>
27 28
28#include <qvbox.h> 29#include <qvbox.h>
29#include <kdebug.h> 30#include <kdebug.h>
@@ -40,6 +41,7 @@
40#include <libkcal/calendarresources.h> 41#include <libkcal/calendarresources.h>
41#include <libkcal/resourcecalendar.h> 42#include <libkcal/resourcecalendar.h>
42#include <kresources/resourceselectdialog.h> 43#include <kresources/resourceselectdialog.h>
44#include <libkcal/kincidenceformatter.h>
43#ifndef DESKTOP_VERSION 45#ifndef DESKTOP_VERSION
44#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
45#else 47#else
@@ -53,6 +55,22 @@
53#include "kotodoview.h" 55#include "kotodoview.h"
54using namespace KOrg; 56using namespace KOrg;
55 57
58
59class KOTodoViewWhatsThis :public QWhatsThis
60{
61public:
62 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
63
64protected:
65 virtual QString text( const QPoint& p)
66 {
67 return _view->getWhatsThisText(p) ;
68 }
69private:
70 QWidget* _wid;
71 KOTodoView * _view;
72};
73
56KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, 74KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,
57 const char *name) : 75 const char *name) :
58 KListView(parent,name) 76 KListView(parent,name)
@@ -395,6 +413,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
395 mTodoListView->setColumnWidthMode(8, QListView::Manual); 413 mTodoListView->setColumnWidthMode(8, QListView::Manual);
396 414
397 415
416 new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
417
398 mPriorityPopupMenu = new QPopupMenu(this); 418 mPriorityPopupMenu = new QPopupMenu(this);
399 for (int i = 1; i <= 5; i++) { 419 for (int i = 1; i <= 5; i++) {
400 QString label = QString ("%1").arg (i); 420 QString label = QString ("%1").arg (i);
@@ -532,6 +552,14 @@ KOTodoView::~KOTodoView()
532{ 552{
533 delete mDocPrefs; 553 delete mDocPrefs;
534} 554}
555QString KOTodoView::getWhatsThisText(QPoint p)
556{
557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
558 if ( item )
559 return KIncidenceFormatter::instance()->getFormattedText( item->todo() );
560 return i18n("That is the todo view" );
561
562}
535 563
536void KOTodoView::jumpToDate () 564void KOTodoView::jumpToDate ()
537{ 565{