summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index b21b419..732fc46 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -32,6 +32,7 @@
#include <qdialog.h>
#include <qtextstream.h>
#include <qdir.h>
+#include <qwhatsthis.h>
#include <qregexp.h>
#include <klocale.h>
@@ -47,6 +48,7 @@
#include <libkcal/recurrence.h>
#include <libkcal/filestorage.h>
#include <libkdepim/categoryselectdialog.h>
+#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
@@ -62,6 +64,23 @@
#include "kolistview.h"
+
+class KOListViewWhatsThis :public QWhatsThis
+{
+public:
+ KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+
+protected:
+ virtual QString text( const QPoint& p)
+ {
+ return _view->getWhatsThisText(p) ;
+ }
+private:
+ QWidget* _wid;
+ KOListView * _view;
+};
+
+
ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
{
mItem = item;
@@ -224,6 +243,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->setColumnAlignment(9,AlignLeft);
mListView->setColumnAlignment(10,AlignLeft);
mListView->setColumnWidthMode(10, QListView::Manual);
+ new KOListViewWhatsThis(mListView->viewport(),this);
int iii = 0;
for ( iii = 0; iii< 10 ; ++iii )
@@ -295,6 +315,14 @@ KOListView::~KOListView()
{
delete mPopupMenu;
}
+QString KOListView::getWhatsThisText(QPoint p)
+{
+ KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
+ if ( item )
+ return KIncidenceFormatter::instance()->getFormattedText( item->data() );
+ return i18n("That is the list view" );
+
+}
void KOListView::updateList()
{