author | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 10:58:10 (UTC) |
commit | d2f6c50fb3b236e37aaa46ade819ab163f19868a (patch) (side-by-side diff) | |
tree | 02b2c7bbcd6d78140def0650fa4b440199e04ef7 /korganizer/kolistview.cpp | |
parent | 5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (diff) | |
download | kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.zip kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.gz kdepimpi-d2f6c50fb3b236e37aaa46ade819ab163f19868a.tar.bz2 |
qwt added
-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 @@ #include <qdir.h> +#include <qwhatsthis.h> #include <qregexp.h> @@ -49,2 +50,3 @@ #include <libkdepim/categoryselectdialog.h> +#include <libkcal/kincidenceformatter.h> #ifndef DESKTOP_VERSION @@ -64,2 +66,19 @@ + +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 ) @@ -226,2 +245,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->setColumnWidthMode(10, QListView::Manual); + new KOListViewWhatsThis(mListView->viewport(),this); @@ -297,2 +317,10 @@ KOListView::~KOListView() } +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" ); + +} |