-rw-r--r-- | korganizer/kolistview.cpp | 28 |
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 | |||
@@ -34,2 +34,3 @@ | |||
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | ||
35 | #include <qregexp.h> | 36 | #include <qregexp.h> |
@@ -49,2 +50,3 @@ | |||
49 | #include <libkdepim/categoryselectdialog.h> | 50 | #include <libkdepim/categoryselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | ||
50 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
@@ -64,2 +66,19 @@ | |||
64 | 66 | ||
67 | |||
68 | class KOListViewWhatsThis :public QWhatsThis | ||
69 | { | ||
70 | public: | ||
71 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | ||
72 | |||
73 | protected: | ||
74 | virtual QString text( const QPoint& p) | ||
75 | { | ||
76 | return _view->getWhatsThisText(p) ; | ||
77 | } | ||
78 | private: | ||
79 | QWidget* _wid; | ||
80 | KOListView * _view; | ||
81 | }; | ||
82 | |||
83 | |||
65 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 84 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
@@ -226,2 +245,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
226 | mListView->setColumnWidthMode(10, QListView::Manual); | 245 | mListView->setColumnWidthMode(10, QListView::Manual); |
246 | new KOListViewWhatsThis(mListView->viewport(),this); | ||
227 | 247 | ||
@@ -297,2 +317,10 @@ KOListView::~KOListView() | |||
297 | } | 317 | } |
318 | QString KOListView::getWhatsThisText(QPoint p) | ||
319 | { | ||
320 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | ||
321 | if ( item ) | ||
322 | return KIncidenceFormatter::instance()->getFormattedText( item->data() ); | ||
323 | return i18n("That is the list view" ); | ||
324 | |||
325 | } | ||
298 | 326 | ||